Skip to content

mecaneer23/Ndo

Repository files navigation

Ndo - an ncurses todo application

Codacy Badge

A curses implementation of a todo list helper. Most of the keybindings are similar to Vim-bindings so Vim users should feel relatively comfortable.

Shopping List

OS Support

  • Ndo is optimized for Linux, as most Vim users use Linux.
  • MacOS is also supported however some keyboard shortcuts use different modifier keys.
  • In Windows, general editing is available using the following external package, although some keyboard shortcuts might not work.

Setup

Magnify, copy, and paste

pip install pyfiglet pyperclip

Curses for Windows

pip install windows-curses

Running

python3 todo.py [options] [filename]

Or with Docker:

./docker_build.sh
./docker_run.sh filename

Flags

Positional arguments:

Argument Description
filename Provide a filename to store the todo list in. Default is todo.txt.

Options:

Option Description
--bullet-display, -b Boolean: determine if Notes are displayed with a bullet point in front or not. Default is False.
--enumerate, -e Boolean: determines if todos are numbered when printed or not. Default is False.
--ui {curses,ansi,tkinter,none}, -g {curses,ansi,tkinter,none} UiType: determine how todos should be rendered. Default is ansi. If none is passed, print state of a todolist to stdout without a user interface.
--help, -h Show this help message and exit.
--help-file HELP_FILE Allows passing alternate file to specify help menu. Default is README.md.
--indentation-level INDENTATION_LEVEL, -i INDENTATION_LEVEL Allows specification of indentation level. Default is 2.
--relative-enumeration, -r Boolean: determines if todos are numbered when printed. Numbers relatively rather than absolutely. Default is False.
--simple-boxes, -x Boolean: allow rendering simpler checkboxes if terminal doesn't support default ascii checkboxes. Default is False.
--strikethrough, -s Boolean: strikethrough completed todos - option to disable because some terminals don't support strikethroughs. Default is False.
--title TITLE, -t TITLE Allows passing alternate header. Default is filename.

Controls

Key (arranged alphabetically) Description
- Insert blank line
/ Search for a sequence
Alt+g/Alt+Shift+g Select all todos above/below
Alt+k/j Move todo up and down
Backspace Combine with previous todo
Ctrl+a Select all todos
Ctrl+r Redo change
Ctrl+x, k Toggle toggle and entry modes
Delete Toggle between Todo and Note
Enter Toggle a todo as completed
Numbers Move a number of lines
Shift+k/j Select/deselect multiple todos
Shift+o Add a todo on current line
Tab/Shift+Tab Indent/unindent selected todo
a Display selected todo as an alert
b Make selected todo bigger (magnify)
c Change selected todo color
d Remove selected todo
g/Shift+g Jump to top/bottom of todos
h Show a list of controls
i Edit an existing todo
k/j Move cursor up and down
o Add a new todo
p New todo from clipboard
q, Ctrl+c, Esc Quit
s Sort top-level todos various ways
u Undo change
y Copy todo to clipboard

View a todo list online

Go to this link and upload your file

Contributing

Use the following linters and formatters:

Python files

  • pylint
  • black
  • ruff
  • mypy
  • vulture

Markdown files

  • markdownlint

Troubleshooting

Docker error

Cannot connect to the Docker daemon at ... Is the Docker daemon running?

systemctl start docker

Bugs

  • Long todos don't render properly in strikethrough mode (in certain terminals)