Package: todonepy
IntroductionMove your ToDo’s to ToDone’s!ToDonePyis a command-line interface for managing your to do list. It provides a root command,to, and three subcommands:to doadds a new task to your list at different priorities.to doingshows you what you should be doing.to doneremoves a completed tast from your list.Docs and CodeThe documentation lives athttps://ToDonePy.readthedocs.io/.The code lives athttps://github.com/rbpatt2019/ToDonePy/.InstallationThis project has been released onPyPI, so it can be installed withpip:pipinstall-UToDonePyAlternatively, you can install the project manually by cloning therepo, and using the included Makefile.gitclonehttps://github.com/rbpatt2019/ToDonePy/makeinstallIf you would like to contribute to development, the install instructions are slightly different. Please see the section oncontributing.UsageThe base commandtoThe base commandtohas a few useful features of its own. To see what version of the command you are using, call:to--versionAs with any good command-line tool, you can get some basic help by calling:to--helpYou can get help on any subcommand by calling–helpafter that subcommand. For example, to get help withto doing, call:todoing--helpUnder the hood,tocreates a Filer object that holds the information on the file you use for tracking you’re TODOs. If you don’t specify a file to use, it will default to$HOME/.TODO.tsv. If you would like to specify a different file to use, than call the command with the–file/-fflag like so:to--file/path/to/your/TODO.tsvsubcommandNoteIf you plan to use a file other than the default, I recommend setting it by creating the environmental variable,TODO_LIST.Regardless of whether you use the default or not, callingtowith any of the subcommands -do,doing, ordone- will check to see if the file exists. If it does exist,tothen pass the path on to the subcommand. If it doesn’t exist, thentocreates an empty file which it then passes on to the subcommand.As a final note, it is worth emphasising that the contex object is only created whentois invoked with a subcommand. So, after a clean install, callingto –helporto –versionwill NOT create yourTODO.tsvfile, even if you pass the–file/-fflag. However, callto do, and it will pop into existence.Adding new tasks withto doTo begin tracking your TODOs, call the command as follows:todoranktaskstois the base command. It must be invoked to use any part of the tool. Thedosubcommand is how you add tasks to yourTODO.tsv. Afterto do, there are two mandatory arguments:rankandtasks. The first argument isrank.rankshould be a number indicating how important this task is. 1 is very important, 2 less so, etc. Though nothing explicitly bans you from using as many ranks as you want, I would reccomed using 3 for high, medium, and low priority.The second argument istasks. Here, specify what it is you need to do. If your task takes more than one word to describe, then you need to include it in quotes.taskssupports an indefinite number of arguments, from 1 to as many as you want.NoteAll tasks specified will be added at the same rank, so only combine tasks you want to give the same priority.So, if you wanted to remind yourself to write an abstract for that paper you have been delaying and to email your boss, call:todo1'Write my abstract''Email boss'This will createTODO.tsvif it does not already exist, and add ‘Write my abstract’ and ‘Email boss’, both with a rank of one, toTODO.tsv.to doalso logs the date and time the task was added, so that you always know how old a task is.Sometimes, you want to sort your tasks as you add them. You can do that with the–sort/-soption. This specifies how to sort your list after a new task is added. It must be one of:[rank, date, both, none].bothsorts by rank and then date, andnonedoes not sort, simply appending tasks to the end of your list. It defaults tonone, on the grounds its better not to do something unless you ask.Explicit is better than implicit, as they say. If you just wanted to sort by date after adding a new task, then you could call:to--sortdodate1'Important work'Note–sortfollows the root commandtoas it directly impacts the file and is an option accessible to all subcommands.Keeping track of tasks withto doingOnce you have added some TODOs to your list, you need to make sure you stay on top of them. To see what needs to be done, call:todoingThis should echo the 5 tasks at the top of yourTODO.tsvto the terminal.You can specify how to sort your tasks by passing the–sort/-sflag with one of:[rank, date, both, none]. It defaults tonone, thus preserving the order in yourTODO.tsv. Any call to sort will also change the order currently in yourTODO.tsv, not just the order they are echoed.Also, specifying the–number/-nflag will let you change how many tasks are returned, and it defaults to 5. So, if you want to return 3 tasks sorted by rank, call:to-srankdoing-n3NoteRemember,-sis a root command option!Maybe you prefer a graphic reminder instead of echoing in the terminal - I find this useful for spawning reminders while I am coding in VIM.ToDonePyhas that covered, too! Just call:todoing--reminderto trigger a notification window. By default, it stays up for 5 seconds. Currently, you can not set the time, though that’s in the works!NoteThe graphic flag makes a system call tonotify-send. If you don’t have that installed, the command will fail. It should be installed on most Linux systems, though.Sometimes, you might want to correct an error, change a priority, or in some way edit youtTODO.tsv. In these cases, you can callto doingin editor mode:todoing--editThis will openTODO.tsvin your system editor. Where you would see something like below, if you have been following along:IDRankDateTask11YYYY-MM-DDHH:MMWritemyabstract21YYYY-MM-DDHH:MMEmailboss31YYYY-MM-DDHH:MMImportantworkNothing fancy, just a plain tsv withIDin the first column,rankin the second column, the date/time of addition in the third, andtaskin the fourth. Now, you can make all the changes you want, then save and close the file to return to the command line.Calling–editwill trump any calls tosortornumbermade in the same command.This call opens the default editor on your system, usually defined by the environmental variable EDITOR for Linux systems. If this variable is undefined, then it defaults to VIM - which should be your choice anyways! :P If that command is not found, then it will thros an OSError.Completing your tasks withto doneAfter the end of a productive work session, you have completed a task from your list. Boom! Time well spent. To remove it from yourTODO.tsv, call:todonetasksAs withto do,to donesuports an indefinite number of tasks, as long as all multi-word tasks are enclosed in quotes. For example, if you emailed your boss that finished abstract, then you can remove those tasks like so:todone'Write my abstract''Email boss'Ifto donefinds these tasks in yourTODO.tsv, it’ll remove them! If it can’t find the tasks, it will print a message saying which ones couldn’t be removed.Under the hood,to donecreates a temp file, then performs a string match to each line of yourTODO.tsv. If a perfect match to ‘’task’’ is not in a line, that line is written to the temp file. If ‘’task’’ is in a line, that line is skipped. This way, the temp file ends up containing only those tasks that aren’t completed. Once every line is checked, the temp file replacesTODO.tsvwith its contents. Task deleted!WarningIf two different tasks contain the same text, they will both be deleted!Known BugsTest hang when testingRecent ChangesPlease see theCHANGELOGNext StepsAddition of TODOs from file parsingSupport removal of tasks by task ID numberFull, OS-independent graphic interface