AnthonyDiGirolamo / todotxt-machine

an interactive terminal based todo.txt file editor with an interface similar to mutt
https://pypi.python.org/pypi/todotxt-machine/
GNU General Public License v3.0
245 stars 37 forks source link

Added configuration file #10

Closed fdlm closed 10 years ago

fdlm commented 10 years ago

This is the first step to make todotxt-machine configurable through a file. The most important thing (for me) was to be able to set the location of the todo.txt file, since the hard-coded default didn't suit me, and I do not want to call the program with a command line parameter every time.

Using this patch, the todo.txt file must be either specified by a command line parameter, or in the configuration file ~/.todotxt_machinerc. The command line parameter overrides any configuration setting. The configuration is a simple .ini style text file that can be read by Python's ConfigParser, which is part of the standard library, as far as I know. The current configuration file would look like this:

[files]
todo=~/path/to/your/todo.txt

Colours or custom keybindings could be the next options added to the configuration file, or the location of done.txt.

AnthonyDiGirolamo commented 10 years ago

This looks great, I'd love to add colors to it next and get them out of the todo class. ConfigParser seems like a very good choice for this. Thanks for introducing me to it! I'm still learning python and hadn't seen it before now. todotxt-machine is my first python app.