Crates.io | to_done |
lib.rs | to_done |
version | 1.0.0 |
source | src |
created_at | 2020-01-27 05:12:40.04669 |
updated_at | 2020-01-27 05:20:25.10669 |
description | A simple, command line todo application |
homepage | |
repository | https://github.com/AlexanderDavid/todo |
max_upload_size | |
id | 202330 |
size | 48,504 |
I have been searching for a nice way to store todos as plaintext on my machine. But then I realized it might be a nice side project. This is a simple command line todo list manager written in Rust.
Todos are stored, by default, in the file located at $HOME/.config/todo/todo
.
They're stored in plain text in the form of [Optional Priority [0-9]] {Optional Date} TEXT
.
To add a todo call the todo new
command followed by the todo text. For
example, to add a new todo to take out the trash you would execute
todo new "Take out the trash"
. This would create a new todo in the datafile.
Todo items can also have a numerical priority. This priority is an integer
between 0 and 9. 0 represents the most important whereas 9 represents the least
important. To add a new todo with a priority you can use either the -p
or
--priority
flags. For example, if it is really important that you take that
trash out you would execute todo new "Take out the trash" -p 0
.
Due dates are supported. These are parsed using the Chrono
English crate. This means that you
can include natural english in your todo items. The due date is passed in using
either the -d
or --due
flags. If you needed to take out the trash before
tomorrow you could do todo new "Take out trash" -d tomorrow
. You can also do
more useful things like saying todo new "Take out trash" -d 3hr
to specify the
task is due 3 hours from now. You can also give the todo items both a priority
and a due date by just passing both options
Todo items can be viewed in the terminal by using the todo view
command. This
is formatted into a table using the Pretty Tables crate.
Todo items can be sorted by either due date (ascending or descending), or
priority (ascending or descending) by using the --sort
option with d, dd, p, pd
respectively.