Fri 30 Jul 2010 04:30:33 PM UTC, comment #3:
Max Vozeler <max@hinterhof.net>
sender-time Sent at 15:38 (GMT+02:00). Current time there: 6:29 PM.
Hello MiKaël,
gna.org won't allow me to add comments to the task, it says
my user account is not authorized. Something to change maybe?
I would add more comments, but I will just send them in this
email instead, maybe we can later paste the conversation into
the gna.org task ticket.
On Sat, Jul 24, 2010 at 06:48:28PM +0200, MiKaël NAVARRO wrote:
> I have written a wrapper script 'yagtd-cli.py' allowing to run commands
> non-interactively (see help: $ yagtd-cli.py --help).
>
> This wrapper dynamically inspect main GTD class:
> - to find all implemented commands (with associated docstring),
> - and create an option to yagtd-cli.py script.
>
> But, the syntax is somewhat different:
> $ yagtd-cli.py --list "" todo.txt
> $ yagtd-cli.py --add "Text @work p:customer2" todo.txt
> $ yagtd-cli.py --order "5" todo.txt
>
> P.S.:
> - All commands option need a string argument or an empty string "";
> - An auto-save is done automatically before exiting the script;
> - Multiple commands can be submitted, but the order is not preserved (yet).
>
> Could you test this script (attached to this task #7119)?
> Thanks in advance.
yagtd-cli.py has been working perfectly for me over the last
two days, thank you very much!
The syntax is working fine for me. Although I must admit that
I find it a bit difficult to remember having to apply correct
quoting of the command arguments.
That's why I've been using a small shell function which IMHO
gives a typing-friendlier interface:
y() {
cmd=$1; shift; args="$*"
yagtd-cli.py --${cmd} "$args" ~/todo.txt
}
This allows me to say:
$ y add Tasktext @context p:project
$ y listall
Perhaps some of that typing-friendlyness could be put into
yagtd-cli syntax directly. But then I'm also very happy using
something like the above, so consider me one happy user. :)
Also I like the --help output a lot.
Thanks and best regards,
Max
|