Package: tld-task
tld.pytldis a tool for people who want to do things, but who might also want a
bit of flexibility.tld(pronounced "told", based off of Steve Losh'st.pybut with a LD
twist) is a simple command line tool that works like a (somewhat) minimal list
manager.  Calling$pythontld.pyThisisamessage.will create a file calledtasksin the current directory and put "This is a
message." (and some identifier) in that file. Calling it again will print
the contents of the file.$pythontld.py3-Thisisamessage.The3at the start of the output is an identifier, and can be referenced.
Calling$pythontld.py-f3will mark this message as "done" and move it to a file.tasks.donein the
current directory.For more options, call$pythontld.py-hor see the options description on the github pagehttps://github.com/davidlowryduda/tld.Why use tld?Steve Losh designed t.py to do thesimplest thing that could possibly work:
you can add, edit, remove, and finish elements from a list. It's simple, messy,
and has almost no features to distract you from getting in the way of doing
things. It's easy to say "I'll just organize my list a bit" and spend 15
minutes tagging, coloring, setting priorities, and so forth.And if that works for you, great! Then t.py is enough.tlddoes everything t.py does, except with a few more features (and a bit less
purity). In particular,tldsupports simple date annotations, simple tagging,
and philosophically isn't against complete organization.Where t.py encourages you to use different aliases to different tasklists for
different one level of organization,tldallows one to use tags in fewer
lists.It's FlexibleDo you want to edit a bunch of items at once? Open the list in a text editor,
andtldwill handle the rest.Do you want to view the list on a computer that doesn't havetldinstalled?
Open the list in a text editor.Do you want to synchronize your list across multiple computers? Keep your lists
in aDropboxfolder or agithubrepository.It Plays Nice with Version Controltldfollows the lead of other systems which keep lists in a plain text file.
This is a great idea.tldalso followst.py's use of random IDs to order the items in the list.
When list managers append new items to the end of the list and multiple users
edit a list, then merge conflicts will occur and require manual handling.If order really matters, then this makes sense. But if order really matters,
then you shouldn't be usingtld.tlduses random IDs (actually SHA1 hashes) to order the list. Once a list has
a couple of items in it, adding more is far less likely to cause merge
conflicts.Installing tldtldrequiresPython3.6+ and a bash-like shell. It works on Linux, OS X,
and Windows (with the linux subsystem).Installing and setting uptldwill take about one minute.First,downloadthe newest version or clone the github repository
(git clone https://github.com/davidlowryduda/tld).You can also use pip through a command likepython3-mpipinstall--user--upgradetld-taskIf you use pip, then you can replace 'python3 ~/path/to/tld.pywithtld`
in the examples below.Next, decide where you want to keep your lists.  I put mine in~/notes/tasks(I keep notes created from other note utilities in~/notes/too). Create that
directory (or whatever directory you plan on using).mkdir-p~/notes/tasksSet up an alias to runtld.  Put something like this in your~/.bashrcfile:aliastld='python3 ~/path/to/tld.py --task-dir ~/notes/tasks --list tasks'Make sure you runsource ~/.bashrcor restart your terminal window to make
the alias take effect. Nowtldis ready to use.Using tldtldis quick and easy to use, especially when used in combination with other
tools. Commandline usage is available throughtld -hortld --help, and is
a good reference once you grok the workflow.Add an ItemTo add an item, usetld [item description]:$tldTellmywifeIloveher.
$tldProvetheRiemannHypothesis.
$tld"Read Steve Losh's .vimrc."List Your ItemsListing your items is even easier -- just usetld:$tld1-ReadSteveLosh's.vimrc.
a-TellmywifeIloveher.
b-ProvetheRiemannHypothesis.tldwill list all of your unfinished items and their IDs. Do you not want to
see the IDs? Use the "quiet" option by usingtld -qortld --quiet.Finish an ItemAfter you're done with something, usetld -f IDto finish it:$tld-fb
$tld1-ReadSteveLosh's.vimrc.
a-TellmywifeIloveher.You can usetld -r IDto "remove" an item (which won't mark it as "finished".
Items marked "finished" can be listed. Items that are "removed" are just gone).Edit an ItemSometimes you might want to change the wording of an item.  You can usetld -e ID [new description]to do that:$tld-e1Cleanmy.vimrc.
$tld5-Updatemy.vimrc.
a-TellmywifeIloveher.Yes, you can use sed-style substitution stringss/old/repl.$tld-e5s/Update/Clean/
$tld
a-TellmywifeIloveher.
e-Cleanmy.vimrc.List "Finished" ItemsHave you marked lots of items as "finished" and you want to review them?
You can view these items withtld --done.$tld--done
b-ProvetheRiemannHypothesis.Annotate Items with DatesDo you want to be able to remember when you added an item to the list? Usetld --date [description]when you add the item to the list.$tld--dateWriteREADME.
$tld1-WriteReadme.5-Updatemy.vimrc.
a-TellmywifeIloveher.tlddoesn't show these dates by default --- too much clutter. To see dates,
usetld --showdates.$tld--showdates2018-06-01|1-WriteREADME.|5-Updatemy.vimrc|a-TellmywifeIloveher.You can use--datein yourtldalias, and this information will only affect
the output when used with--showdates.Annotate Items with TagsUsetld --tag [TAG] [description]when you add an item to the list to add a
tag.$tld--tagshoppingBuymilk.
$tld1-WriteREADME.5-Updatemy.vimrc9-Buymilk.
a-TellmywifeIloveher.To see the tags, use--showtags.$tld--showtags1-WriteREADME.5-Updatemy.vimrc9-Buymilk.|tags:shopping
a-TellmywifeIloveher.Delete the List if it's EmptyWhy keep an empty list around? You can have the list delete itself automatically
if empty. You can use the--delete-if-emptyoption in your alias:aliastld='python3 ~/path/to/tld.py --task-dir ~/notes/tasks --list tasks --delete_if-empty'Tips and Trickstldmight be simple, but it can do a lot of interesting things.Count Your ItemsCounting your item is simple using thewcprogram:$tld|wc-l4Tags, Grep, Awk, and SedIf I have too many aliases, I forget them. I use tags and grep as a primary
level of organization. To remember what tags exist, just print them withtld --showtagsortld --showtags | grep tags. Then print out the relevant
items through grep withtld --showtags | grep shopping.$tld--showtags|grepshopping9-Buymilk.|tags:shoppingTo make it look pretty, you can cut out the tag by showing evertying before '|'
with something like awk.$tld--showtags|grepshopping|awk-F'|''{print $1}'9-Buymilk.If you have too many tags and too many items, then perhaps having multiple lists
is a good idea for you. But you can list all the unique collections of tags
relatively easily with classic tools and sed.$tld--tagshoppingBuychocolatesyrup.
$tld--tagmusicBuyPhoenixalbum.
$tld--showtags|greptags|sed-e's/.*tags: //'|sort|uniq
music
shoppingMultiple ListsYou can follow thet.pyphilosophy of organizing tasks into different lists by
adding additional aliases. For examplealiasg='python ~/path/to/tld.py --task-dir ~/notes/tasks --list groceries'aliasm='python ~/path/to/tld.py --task-dir ~/notes/tasks --list music-to-buy'aliasw='python ~/path/to/tld.py --task-dir ~/notes/tasks --list wines-to-try'Distributed BugtrackingLike the idea of distributed bug trackers like [BugsEverywhere][], but don't
want to use such a heavyweight system?  You can usetldinstead.Add another alias to your~/.bashrcfile:alias b='python ~/path/to/tld.py --task-dir . --list bugs'Now when you're in your project directory you can usebto manage the list of
bugs/tasks for that project.  Add thebugsfile to version control and you're
all set.Even people withouttldinstalled can view the bug list, because it's plain
text.On Compatability with t.pytldcan read and operate on lists made witht.py, butt.pydoes not handle
the date and tag annotations fromtld. If you never use those, then they're
interoperable (and you're essentially usingt.pyanyway).In the future, additional metadata may be implemented intld, which may
further widen this gap.Why Make tld?I used Steve Losh'st.pyfor a long time before deciding to make a few
changes. When I read through his code, I thought it was pretty elegant. So I
thought it would be a good learning experience to rebuild it in roughly the same
order, but with a few changes in mind.So really, this project is an exercise in programming that I did over about a
week to fit my whims and desires.Those who find themselves here should really check outt.py. By adding new
features, I satisfy my whims --- but more features ruin the simple purity of the
originalt.py.Bugs and ContributionsIf you happen to use it and find a bug, let me know.For more featureful list managers, you might checko outtodo.txtandTaskWarrior. They have lots of features and lots of knobs that one can tweak
and prettify.If you want to contribute code totld, that's great!  Fork therepoand send me a pull request.
But I've been doing this as a learning experience, and know that I might
experiment with contributed code too.