sigmavirus24 / Todo.txt-python

Python port of Gina Trapani's popular todo.txt-cli project
GNU General Public License v3.0
46 stars 17 forks source link

Can't get actions / plugins to work #1

Open ibayer opened 12 years ago

ibayer commented 12 years ago

Hey,

first of all thanks for porting todo.txt! I like the concept and plan to write some actions myself but currently I can't get them to run ( I used the master branch).

config script:

# === EDIT FILE LOCATIONS BELOW ===

# Your todo.txt directory
export TODO_DIR="$HOME/.todo"

# Your todo/done/report.txt locations
export TODO_FILE="$TODO_DIR/todo.txt"
export DONE_FILE="$TODO_DIR/done.txt"
export REPORT_FILE="$TODO_DIR/report.txt"
export TMP_FILE="$TODO_DIR/todo.tmp"
export USE_GIT=False  # or 1

# You can customize your actions directory location
#export TODO_ACTIONS_DIR="$HOME/.todo.actions.d"
export TODO_ACTIONS_DIR="$TODO_DIR/.todo.actions.d"

I copied the plug-ins from bash todo.txt into $TODO_DIR/.todo.actions.d and made them executable. But I can't use them and they don't show up if I run todo.py -h same holds true for your mstave.py. As far as I can tell load_actions() is not executed.

Best, Immanuel

sigmavirus24 commented 12 years ago

Can you tell me which version you're running? That will help me diagnose the problem better. Thanks.

ibayer commented 12 years ago

On 10/01/2012 03:12 PM, Ian Cordasco wrote:

Can you tell me which version you're running? That will help me diagnose the problem better. Thanks.


Reply to this email directly or view it on GitHub: https://github.com/sigmavirus24/Todo.txt-python/issues/1#issuecomment-9031237 Latest version from the master branch. Thanks

sigmavirus24 commented 12 years ago

Thanks, I'll take a look a bit later bit probably at the latest tomorrow.

sigmavirus24 commented 12 years ago

So, I forgot to mention that for any add-ons originally written for todo.txt-cli, (todo.sh) these are all bash scripts. The version on the master branch doesn't support getting the help from those commands unfortunately. For something like mstave.py, you need to add an extra line to your config, ACTIONS="list,of,names", e.g., ACTIONS="mstave". This should load the functions from there and include them in todo.py help.

ibayer commented 12 years ago

Thanks for your fast response it seems to work now. What tricked me for a while is that todo.py -h and todo.py --help ( the don't list the new actions) give a different output then todo.py help, is this intentional?

Best, Immanuel

sigmavirus24 commented 12 years ago

Not so much intentional as the only way it works with the script right now. Future plans (which are undocumented) are to make them one as in todo.sh. Sorry it is unclear.

ibayer commented 12 years ago

Okay, fair enough. Just wanted to make sure it's know.

sigmavirus24 commented 12 years ago

I'm going to leave this open to remind myself to work on unifying the -help and help outputs if you don't mind.

ibayer commented 12 years ago

Sure, I have one more question. What's the best branch to work with, it looks to me that rewrite differs a lot from master. Is rewrite stable enough to work with?

ibayer commented 12 years ago

I just cloned master to run it in my IDE (PyDev). Running todo.py created a .todo in my home folder, I would rather avoid that the development version writes outside of the git folder and would prefer that the config file is in the repro too. How are you doing this?

sigmavirus24 commented 12 years ago

rewrite is stable enough to work from since it's a branch off of development. You can use ./todo.py -d dest_folder and alias that so that you don't have to remember. Also, you could have a config file somewhere with the todo directory and do: ./todo.py -c /path/to/config in which you specify the correct .todo dir.

ibayer commented 12 years ago

Great, I will switch to rewrite. Thanks for the remarks they are very useful.

On 10/02/2012 04:05 PM, Ian Cordasco wrote:

rewrite is stable enough to work from since it's a branch off of development. You can use ./todo.py -d dest_folder and alias that so that you don't have to remember. Also, you could have a config file somewhere with the todo directory and do: ./todo.py -c /path/to/config in which you specify the correct .todo dir.


Reply to this email directly or view it on GitHub: https://github.com/sigmavirus24/Todo.txt-python/issues/1#issuecomment-9071833

sigmavirus24 commented 12 years ago

Anytime.