We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Tracking your time with Timewarrior

00:00

Formal Metadata

Title
Tracking your time with Timewarrior
Title of Series
Number of Parts
287
Author
Contributors
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Time tracking is a task many people have to deal with. Be it for writing bills for your client, creating time reports for your company, or simply because you are curious what you are doing with your time all day. Timewarrior is a tool that lets you track your time easily from the command line – it does its job then gets out of your way. The presentation wants to give you an overview of what Timewarrior can do for you (and what not), and how you can adapt Timewarrior to your needs. The talk is aimed at new users, but everyone is welcome to join the Q&A session afterwards.
DiagramEngineering drawing
Software developerGEDCOMMoment of inertiaControl flowGame theoryTotal S.A.Software developerInformation technology consultingProcess (computing)Physical systemScripting languageSoftware maintenanceInformationObject (grammar)Computer programmingGastropod shellSoftwareTraffic reportingSheaf (mathematics)Multiplication signHome pageControl flowData managementExtension (kinesiology)Online helpElectronic mailing listElectronic visual displayType theoryTrailRevision controlSurfaceDampingError messageTotal S.A.Row (database)Directory serviceSystem callCASE <Informatik>Order (biology)Open sourceINTEGRALDatabaseFile formatFeedbackMeeting/Interview
Core dumpDistribution (mathematics)Source codeRepository (publishing)Extension (kinesiology)Content (media)Web pageThetafunktionAsynchronous Transfer ModeExplosionJava appletTask (computing)TwitterHome pageRepository (publishing)
Computer animationMeeting/Interview
Multiplication signTrailComputer programmingSoftware testingWeb pageLatent heatHookingINTEGRALFormal languageFunction (mathematics)Scripting languageWrapper (data mining)Cartesian coordinate systemExtension (kinesiology)CodeSimilarity (geometry)Task (computing)File formatArithmetic progressionMeeting/Interview
Flow separationTrailTask (computing)Multiplication signBitMultiplicationThread (computing)Single-precision floating-point formatExtension (kinesiology)Parallel portGoodness of fitDataflowLine (geometry)Meeting/Interview
2 (number)Meeting/Interview
Meeting/Interview
Meeting/Interview
Engineering drawing
Computer animation
Transcript: English(auto-generated)
Hello Ufosdam, thank you for having me.
First, allow me to introduce myself. My name is Thomas Lauf and in my day job I work as a software developer for TNG technology consulting. But here I speak to you as a member of the Gothenburg Bitfactory, where I am the maintainer of Time Warrior. A short disclaimer here, although we call ourselves Gothenburg Bitfactory, we are not from Gothenburg.
We are a team of open source enthusiasts from around the world. And also my employer TNG is not affiliated with Time Warrior, but they let me use some of my time and resources on the project. So, time tracking. Do you track your time? Do you have to track your time? Well, I do. I need to write my timesheets for my employer.
And so time tracking is a necessity for me, but one I do not want to spend too much time on. And therefore I use Time Warrior for that. Time Warrior in a nutshell is free and open source software that lets you track your time from the command line. Let me show you. When you've installed Time Warrior, all you need to track your time is a shell.
So any shell will do. Here I have one. And simply typing the command gives you short feedback what's currently been tracked. So here it tells me it's tracking a break. Okay, currently I'm doing a recording, so I want to start time tracking for that.
Therefore I use the start command. And I add some additional information to make it useful. So I add a label. And I also do not want to start my time tracking right now, but a little bit earlier.
So let's say 1300. And with that I'm done. I've closed my first interval, I've started a new one. There is also no running program or background process involved. The shell is free to use again for whatever I was doing before.
Of course, when I'm done with my work, I can stop my time tracking with the stop command and take a look at what I've recorded. So there's a summary command which gives me a nice overview about my track time.
So I have three intervals here in my database. Here's my break. And here's the interval I've recorded last. Of course, Time Warrior does not only have commands to add new intervals and to display them, but also intervals to modify them so you can add additional information and also correct them in case you've made an error.
So, for example, here, the last one doesn't have an annotation, so let's add one. And let's call this annotation report talk.
And one thing I want to point out here is Time Warrior has a very flexible command line. So the order of the command line arguments is quite free. So I could also put them in the other way around. And also I can give a shortened version of the command.
As long as it is unique enough that Time Warrior can identify it, it's fine. So I could also just write a no for annotate. And now I've annotated this one with record talk. And for the sake of the demonstration, let's now assume I've made an error here.
I did not start this one at 10, but at 9. So let's move this interval to 9 o'clock.
And also I want to lengthen it because the end time was correct. So let's lengthen. Now let's move on by one hour. Let's take a look at the summary again.
Also the shortened version also works here. So I just need to type in here and it also gives me the summary with all the information displayed. And well, that's it for a display.
Of course, this only scratches the surface of the command line set of Time Warrior. There's many more, as you can see here in the help. All the commands, Time Warrior makes it easy for you to add and handle your time tracking.
One thing I want to point out last is reporting. So when you have this summary here, you could, for example, use this to create a timesheet just by copy pasting all the times and information from here into your timesheet.
But that's a bit cumbersome. So what can Time Warrior offer here? Well, for one, it has an export command which allows you to export this information as JSONs. So you have now all the tracked intervals here as JSON objects which contain the information.
Here's the first one, here's the break and here's the last one. And now you could maybe write some script or another program which takes this and transforms it into the format you need for your timesheet.
But this does not stop here. Another cool feature of Time Warrior is that it allows you to integrate such programs or scripts directly into Time Warrior itself so you can use them just like commands. For example, I want to have the totals for every label summed up.
So currently there is no command totals, as I'm told here. But I have a script which does the job and can consume such information as listed here.
And if I copy this one now into my extensions directory. So here's my script, totals.py. It's a Python script. And I now copy it into the extensions directory of Time Warrior.
And I try the command again, Time Warrior totals. I get my totals sum. So here, one hour for break and three hours, 36 minutes for foster. So, wrapping up.
Time Warrior has a rich and flexible command line which makes it easy to track your time. It is non-obtrusive, it does the job and then gets out of your way. There are no background processes or permanently running programs involved. And it also enables you to create your own reports by writing your own extension
and including it into the program itself. So if you want to try Time Warrior, there are packages already available for many systems or package managers.
And also, here I want to point at the homepage of Time Warrior where we not only can download it, but you also have this tools section where there's a huge list of extensions and also programs and other stuff people have added. So there's a huge ecosystem also to explore.
So, many thanks to everyone who contributed here. Many thanks to our supporters and users of Time Warrior. And many thanks to you, especially, for your attention. As said, our homepage is timewarrior.net.
You can find our repository on GitHub. And also, you can follow us on Twitter. See you around and foster them and enjoy your stay.
Sorry, to JIRA Time Sheets? Well, as I've shown, you can export as a JSON. I don't know how JIRA Time Sheets, what it requires as input.
So if it does not really consume the JSON, and I suppose it cannot really, then you need some extra script to do some necessary mangling to transform it into the format you need. But you could take a look at the tools page on timewarrior.net.
I think there is some exporter for JIRA, maybe. But yeah, in short, you most likely will need some adapter to transform the output to the desired format.
So, I've seen another question.
Is it possible to let it track time spent in a specific program? Well, if you put in the commands, when you start using the program and when you stop the program, it would.
To do it automatically, you need to add the program so it sends or triggers time warrior to be started and stop time tracking.
So, that leads also to another question about integration with Task Warrior. Yes, there is a hook script for Task Warrior. So whenever you put a task into progress or out of progress, the respective time warrior command is triggered.
So, in a way, if you want to track the usage of some programs, you would need to have something similar. Maybe add a wrapper script that wraps your program and says, okay, I'm starting the tracking of the program, starting the program.
And whenever the program finished, it again stops time tracking.
So, so far, I cannot see some other questions here. Some people are typing.
Okay, yeah, about the code. The application itself is written in C, C++. There is Python code involved, but this is mainly for the testing. So all our end-to-end tests are done in Python. So, that's, and the, you can tell the hook script from Task Warrior to time warrior is also Python script.
But this is not necessarily to be Python, the hook script, also the extensions.
So you could write extensions and also those hooks, what is it, any scripting language. It just needs to, well, if it's a hook script, it needs to be able to trigger the time warrior command, of course. If it's an extension, well, it just needs to be able to parse the output from time warrior
and itself output, then the right format or produce the right output or more or less trigger the correct API commands and whatsoever. But wrapping up, the time warrior is C++.
Shall I read the next question? Is it possible to track several tasks in parallel?
Yes and no. Well, if you track, well, you have to do it, you cannot do multiple starts and then it has two threads in parallel. So the idea in time warrior is that you track your time as a flow of consecutive intervals which are non-overlapping.
So you cannot have two intervals running parallel. What you can do is when you identify your tracking with tags, so you can give your intervals multiple tags and then you just start your first tracking.
Then you start another trick by starting an interval with both tags and then you can stop the other one.
So in a way, it is possible, but currently it may require a bit. So you have to start your interval again with the added up task.
There is some feature request to ease this a bit that you can easily just amount them on. On the other way around, if you have a time tracking with three tags running and you do stop with one of those tags, then you stop tracking with one tag
and you continue tracking with the two remaining tags. So in that way, it is possible to do parallel time tracking, but it's stored as a single line of intervals and no parallel ones.
It's mainly because to keep things easier in the database, not to have multiple threads and then you have to figure out which to stop and what goes where. But yeah, there could be some improvements here with starting them
and actually there is, well, we have something in the pipeline for that. Could it work with Ledger? Unfortunately, I do not know Ledger. So if it's something that can consume interval data,
so if you have some import there where you can say, okay, I have tracked this interval, this interval, this interval, then you could write an extension and forward the data from time to ledger.
But unfortunately, my knowledge of Ledger is very limited, so I cannot answer this question in depth, but good.
How much time do we have left? Thirty seconds. Thirty seconds. So, Thomas, thank you very much for your talk. You're welcome and thank you everyone for being at Fostum, for supporting Fostum
and yeah, let me end with a famous quote from Tom Green. Everybody, don't forget to be awesome. Have a nice day at Fostum. Thank you so much. Thank you so much. Bye, everyone.
Thank you, Thomas. I appreciate it. Bye, everyone. Bye. This should be.