Package: ti
ti – A silly simple time trackertiis a small command line time-tracking application.
Simple basic usage looks like this:$ ti on my-project
$ ti finYou can also give it human-readable times:$ ti on my-project 30mins agotisports many other cool features. Read along to discover.Wat?tiis a simple command line time tracker. It has been completely rewritten
in Python (originally a bash script) and has (almost) complete test coverage. It
is inspired bytimed, which is a nice project
that you should check out if you don’t liketi.tialso takes
inspiration from the simplicity oft.If a time-tracking tool makes me think for more than 3-5 seconds, I lose my line
of thought and forget what I was doing. This is why I createdti. Withti, you’ll be as fast as you can type, which you should be good with anyway.The most important part abouttiis that it provides just a few commands to
manage your time-tracking and then gets out of your way.All data is saved in a JSON file ,``~/.ti-sheet``. (This can be changed using the$SHEET_FILEenvironment variable.) The JSON is easy to access and can be
processed into other more stylized documents. Some ideas:Read your JSON file to generate beautiful HTML reports.Build monthly statistics based on tags or tasks.Read your currently working project and display it in your terminal prompt.
Maybe even with the number of hours you’ve been working.It’syourdata.Oh and by the way, the source is a fairly small Python script, so if you know
Python, you may want to skim over it to get a better feel of how it works.Note: If you have used the previous bash version ofti, which was horribly
tied up to only work on Linux, you might notice the lack of plugins in this
Python version. I am not really missing them, so I might not add them. If anyone
has any interesting use cases for it, I’m willing to consider.UsageHere’s the minimal usage style:$ ti on my-project
Start working on my-project.

$ ti status
You have been working on my-project for less than a minute.

$ ti fin
So you stopped working on my-project.onandfincan take a time (format described further down) at which to
apply the action:$ ti on another-project 2 hours ago
Start working on another-project.

$ ti s
You have been working on another-project for about 2 hours.

$ ti fin 30 minutes ago
So you stopped working on another-project.Also illustrating in the previous example is short aliases of all commands,
their first letter. Like,sforstatus,oforon,fforfin, etc.Put brief notes on what you’ve been doing:$ ti note waiting for Napoleon to take over the world
$ ti n another simple note for demo purposesTag your activities for fun and profit:$ ti tag impGet a log of all activities with thelog(orl) command:$ ti logCommand referenceRunti-h(or--helporhelpor justh)
to get a short command summary of commands.onShort:oSyntax:ti (o|on) <name>[<time>...]Start tracking time for the project/activity given by<name>. For example:ti on conquesttellstito start tracking for the activityconquestnow.
You can optionally specify a relative time in the past like so:ti on conquest 10mins agoThe format of the time is detailed further below.finShort:fSyntax:ti (f|fin)[<time>...]End tracking for the current activitynow. Just like withoncommand
above, you can give an optional time to the past. Example:ti fin 10mins agotellstithat you finished working on the current activity at, well, 10
minutes ago.statusShort:sSyntax:ti (s|status)Gives short human-readable message on the current status, i.e., whether anything
is being tracked currently or not. Example:$ ti on conqering-the-world
Start working on conqering-the-world.
$ ti status
You have been working on `conqering-the-world` for less than a minute.tagShort:tSyntax:ti (t|tag)<tag>...This command adds the given tags to the current activity. Tags are not currently
used within thetitime tracker, but they will be saved in the JSON data
file. You may use them for whatever purposes you like.For example, if you have a script to generate a HTML report from yourtidata, you could tag some activities with a tag likeredorimportantso
that activity will appear in red in the final HTML report.Use it like:ti tag red for-joeadds the tagsredandfor-joeto the current activitiy. You can specify
any number of tags.Tags are currently for your purpose. Use them as you see fit.noteShort:nSyntax:ti (n|note)<note-text>...This command adds a note on the current activity. Again, like tags, this has no
significance with the time tracking aspect ofti. This is for your own
recording purposes and for the scripts your write to process yourtidata.Use it like:ti note Discuss this with the other team.adds the noteDiscuss this with the other team.to the current activity.logShort:l1Syntax:ti (l|log) [today]Gives a table like representation of all activities and total time spent on each
of them.Time formatCurrently only the following are recognized. If there is something that is not
handled, but should be, please open an issue about it or a pull request
(function in question isparse_time)nseconds ago can be written as:nseconds agonsecond agonsecs agonsec agons agoain place ofnin all above cases, to mean 1 second.E.g.,10s ago,a sec ago25 seconds ago,25seconds ago.nminutes ago can be written as:nminutes agonminute agonmins agonmin agoain place ofnin all above cases, to mean 1 minute.E.g.,5mins ago,a minute ago,10 minutes ago.nhours ago can be written as:nhours agonhour agonhrs agonhr agoaoranin place ofnin all above cases, to mean 1 hour.E.g.,an hour ago,an hr ago,2hrs ago.Wherenis an arbitrary number and any number of spaces betweennand the
time unit are allowed (including zero spaces).StatusThe project is in beta. If you find any bug or have any feedback, please do opena GitHub issue.Gimme!You can downloadtifrom the source on
GitHub.Put it somewhere in your$PATHand make sure it has executable permissions.Installpyyamlusing the commandpip install--userpyyaml.Installcoloramausing the commandpip install--usercolorama.After that,tishould be working fine.Also, visit theproject page on GitHubfor
any further details.Who?Originally created and fed by Shrikant Sharat
(@sharat87).
Now forked and maintained by Trevor Bekolay
(@tbekolay) and friends on GitHub.LicenseMIT License.Release History0.1.2 (November 19, 2017)This release fixes several Python 3.6 compatibility bugs.0.1.1 (January 7, 2017)This release fixes a few bugs with command line handling.
If you run into any issues with this release, pleasefile an issue!0.1.0 (June 27, 2016)First release oftion PyPI!
Thanks to all of the original authors,
particularly Shrikant Sharat,
who has turned over development oftito me, Trevor Bekolay.