relsqui / doily

A script for managing daily writing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make a goal-tracking plugin.

relsqui opened this issue · comments

This is squarely in the realm of "serves my personal needs and if other people find it useful, cool."

Basically this is this: ls .local/share/doily/dailies/ | tail -n 1 | sed 's#^#.local/share/doily/dailies/#' | xargs grep "^ *\*" except with an absolute path instead of relative. And maybe a configuration option to change the regex if you want to mark your goals in other ways.

One neat thing is that you can pretty easily go back multiple days by changing the tail argument. If you don't want the absolute last one (because it's today) for example. Or loop and go back until you find something.

Wait, I think this is why I was going to add a search command. Maybe that's all I need. Or the ability to set aliases? That is definitely definitely not ripe yet.

Okay, here's the generalized working one, since I'm sticking it in an alias anyway. The first bit of course won't be necessary within doily. dir="$HOME/.local/share/doily/dailies"; grep "^ *\*" $dir/$(ls $dir | tail -n 1)