Python 2.7 or Python 3.4 on Linux or Mac OS X.
todotxt-machine 1.1.8 and earlier drew its user interface using only raw terminal escape sequences. While this was very educational it was difficult to extend with new features. Version 2 and up uses urwid to draw its interface and is much more easily extendable.
pip install todotxt-machine
Download or clone this repo and run the
git clone https://github.com/AnthonyDiGirolamo/todotxt-machine.git cd todotxt-machine ./todotxt-machine.py
todotxt-machine Usage: todotxt-machine todotxt-machine TODOFILE [DONEFILE] todotxt-machine [--config FILE] todotxt-machine (-h | --help) todotxt-machine --version todotxt-machine --show-default-bindings Options: -c FILE --config=FILE Path to your todotxt-machine configuraton file [default: ~/.todotxt-machinerc] -h --help Show this screen. --version Show version. --show-default-bindings Show default keybindings in config parser format Add this to your config file and edit to customize
You can tell todotxt-machine to use the same todo.txt file whenever it
starts up by adding a
file entry to the
If you want to archive completed tasks, you can specify a done.txt file
archive entry. You can also set you preferred colorscheme or even
define new themes. Here is a short example:
[settings] file = ~/todo.txt archive = ~/done.txt auto-save = True show-toolbar = False show-filter-panel = False enable-borders = False enable-word-wrap = True colorscheme = myawesometheme
Pictured above are the following themes from left to right:
Here is a config file with a complete colorscheme definition:
[settings] file = ~/todo.txt colorscheme = myawesometheme [colorscheme-myawesometheme] plain=h250 selected=,h238 header=h250,h235 header_todo_count=h39,h235 header_todo_pending_count=h228,h235 header_todo_done_count=h156,h235 header_file=h48,h235 dialog_background=,h248 dialog_color=,h240 dialog_shadow=,h238 footer=h39,h235 search_match=h222,h235 completed=h59 context=h39 project=h214 creation_date=h135 due_date=h161 priority_a=h167 priority_b=h173 priority_c=h185 priority_d=h77 priority_e=h80 priority_f=h62
You can add colorschemes by adding sections with names that start with
colorscheme-. Then under the
[settings] section you can say which
colorscheme you want to use.
The format for a color definitions is:
Foreground and background colors are follow the 256 color formats defined by urwid. Here is an excerpt from that link:
High colors may be specified by their index
h255or with the shortcuts for the color cube
#fffor gray scale entries
g0(black from color cube) ,
g100(white from color cube).
You can see all the colors defined here.
I recommend you leave the foreground out of the following definitions by adding
a comma immediately after the
selected=,h238 dialog_background=,h248 dialog_color=,h240 dialog_shadow=,h238
If you want to use your terminal's default foreground and background color use blank strings and keep the comma:
Let me know if you make any good colorschemes and I'll add it to the default collection.
You can customize any key binding by adding a setting to the
[keys] section of
your config file
For a list of the default key bindings run:
You can easily append this to your config file by running:
todotxt-machine --show-default-bindings >> ~/.todotxt-machinerc
When you edit a key binding the in app help will reflect it. Hit
? to view the help.
ctrl-ysuspends the application. Run
stty dsusp undefto fix.
With tmux the background color in todotxt-machine can sometimes be lost at the end of a line. If this is
happening to you set your
$TERM variable to
See the log here