A python 3 script to display and edit text-based to-do lists with a simple user interface. Its idea is to provide an interface to easily mark tasks as done, decompose tasks into sub-tasks, and emphasize important things.
Needs python 3 and tkinter. Start python in a terminal to check the version:
$ python
Python 3.7.1
>>> import tkinter
If there is no error, everything should be good. Otherwise you need to install tkinter. On Ubuntu:
$ apt-get python3-tk
On Archlinux/Manjaro:
$ sudo pacman -S tk
Then download the project with:
$ git clone [email protected]:eyuku/pydone.git
or by downloading the archive.
In the folder where you downloaded the files, run
$ python PyDone.py example &
to open the example list, or
$ python PyDone.py <file> &
to open an arbitrary file. If the file doesn't exist it will be created, and if no filename is given, an empty list opens and will be saved under the name 'pydone_default'. The file is a simple text file with the exact content displayed in the interface (minus the formatting).
- Lines containing
[]
,[ ]
or[x]
are list items. The box doesn't need to be at the beginning of the line, but only what follows it will change color. PressingCtrl
+Space
will mark the task on the current line as done/undone. Done tasks are greyed out. - Other lines (except the ones starting with
--
) are considered as category titles. - Indentation with tabs (again not necessarily at the beginning of the line) is used to describe subtasks. The parent task is greyed out as long as all its direct subtasks are not marked as done, so that the current tasks stand out.
- A new task with can be inserted under the current line with
Alt
+a
. Its box will be at the same level as the current line. Similarly, a child task can be inserted withAlt
+c
.
//
can be used to add a deadline. Everything following//
will be highlighted until the end of the line or until the next--
.--
can be used to add a tag. Everything following--
will be highlighted until the end of the line or until the next//
.- Tags are highlighted with a default color, except for custom tags. Any line starting with
--
is considered as a custom tag definition. The syntax is--tag = color
. The tag can be any number of words. Available colors names for tkinter can be found for example there. It the color is not recognized, the definition is ignored. Several tag definitions can be on the same line, with no separation. Spaces around--
and=
don't matter. An empty color name removes completely the highlighting. - For each
!
anywhere on the line, the task or title gains one level of urgency and its color changes to be more and more visible. Three levels are defined. - Tasks marked as done are completely greyed out, including deadlines and tags. Tasks hidden because their sub-tasks are not done still display deadline and tag highlighting.
Pressing Ctrl
+s
will overwrite the open file or write in ‘pydone_default' if no filename was given. It also refreshes the display so that colors are updated. An unsaved file is indicated by a star in the window title.
Ctrl
+s
: saves and apply formatting rules.Ctrl
+Space
: toggles done/to do on the current line.Alt
+a
: insert new task under the current line, at the same level.Alt
+c
: insert new task under the current line, with one more level of indentation.Alt
+t
: Add one level of indentation to the current line.Alt
+T
: Remove one level of indentation to the current line.
- The file to be opened can be specified by
-f
,--file
, or is the first leftover argument. - A theme can be loaded with the option
-t
or--t
. &
is just there to free the terminal after starting the program.
Example:
$ python PyDone.py -t themename -f filename &
A theme is a file written in python dictionnary format. See the for an example.
To be completed.
Do whatever with this code, just be aware that's my first experience of python!