add a task using bash script #19

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@ecarter

ecarter commented Feb 22, 2012

Very minor but I've found it useful while trying out Atea as a daily todo app.

Usage:

tasks.sh -a "[github] Contribute to Atea project - 5m"

I currently have tasks.sh in my PATH with task-add aliased to tasks.sh -a

Great project!

add a task using bash script
Usage: tasks.sh -a "[github] Contribute to Atea project - 5m"
@pkamenarsky

This comment has been minimized.

Show comment
Hide comment
@pkamenarsky

pkamenarsky Feb 22, 2012

Owner

That's a cool idea - but what happens if I do it this way:

tasks.sh -o -a "asdasd"

Nothing gets added! That's why I wanted to switch to getopts or whatever the bash parsing thing is called so that random-order arguments are possible: #5

Glad you like Atea! :)

Owner

pkamenarsky commented Feb 22, 2012

That's a cool idea - but what happens if I do it this way:

tasks.sh -o -a "asdasd"

Nothing gets added! That's why I wanted to switch to getopts or whatever the bash parsing thing is called so that random-order arguments are possible: #5

Glad you like Atea! :)

@ecarter

This comment has been minimized.

Show comment
Hide comment
@ecarter

ecarter Feb 22, 2012

Agreed, this is definitely not a fully implemented solution in the current pull request.

I'll take a look at updating this to support multiple flags. The functionality seems expected and shouldn't be much trouble.

There's a lot of potential in a robust Atea shell tool.

ecarter commented Feb 22, 2012

Agreed, this is definitely not a fully implemented solution in the current pull request.

I'll take a look at updating this to support multiple flags. The functionality seems expected and shouldn't be much trouble.

There's a lot of potential in a robust Atea shell tool.

@pkamenarsky

This comment has been minimized.

Show comment
Hide comment
@pkamenarsky

pkamenarsky Feb 22, 2012

Owner

Agreed, a good shell script would definitely aid a lot in automating things even further.

When / if Atea gets support for configurable todo file syntax,I guess it would also be possible to use the todo.txt cli shell script.

Owner

pkamenarsky commented Feb 22, 2012

Agreed, a good shell script would definitely aid a lot in automating things even further.

When / if Atea gets support for configurable todo file syntax,I guess it would also be possible to use the todo.txt cli shell script.

@databyte

This comment has been minimized.

Show comment
Hide comment
@databyte

databyte Feb 29, 2012

I using zsh and have this:

export TODO=~/Dropbox/Documents/todo.txt
function todo() { if [ $# -eq 0 ]; then cat $TODO; else echo "$@" >> $TODO; fi }
function todone() { sed -i -e "/$*/d" $TODO; }

I'm sure it could be fancier but this works for me.

todo          # lists all current tasks
todo testing  # adds testing
todone test   # marks anything starting with test as done

I using zsh and have this:

export TODO=~/Dropbox/Documents/todo.txt
function todo() { if [ $# -eq 0 ]; then cat $TODO; else echo "$@" >> $TODO; fi }
function todone() { sed -i -e "/$*/d" $TODO; }

I'm sure it could be fancier but this works for me.

todo          # lists all current tasks
todo testing  # adds testing
todone test   # marks anything starting with test as done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment