Lo-fi Command Line Timesheets
12/04/07 17:37 |
Unix
I am an avid user of the Todo.txt
command line task list script and have been
using it a lot recently since I went
all freelance.
In the same vein I've been looking for something that could keep track of my time-sheets for me. Now, I know there are some excellent apps out there already that do this, but I wanted something an order of magnitude simpler. In fact, all I needed to do was keep track of which days I had worked for a particular client.
So I came up with timesheet.sh, it's a simple script that you run from a unix command line. It creates a text file named after the current month (if there isn't one already) and in the text file you'll see the month's calendar courtesy of the tool 'cal' - the current day will be replaced by a couple of # symbols (marking it as 'worked').
All that I need to do every day when I'm doing work for this particular client is remember to type ./timesheet.sh in the terminal and the text file gets updated. When it comes to a new month the script simply creates a new file and carries on as if nothing had happened.
Here's how the file April currently looks for me...
I also added the ability to mark holidays (HH) and sick days (SS), you can see here that Good Friday and Easter Bank Holiday Monday are marked as holidays.
To do this you can just do ./timesheet.sh holiday or ./timesheet.sh sick
Of course, if you're not around to do this you can retrospectively do it in your fave text editor (which is probably called vi ;)
I'm not sure if this is of any use to anyone, but I thought I'd throw it out there and see. I had planned to extend it, but it does what I want for now so I haven't... If you do come up with any cool new ways of using it please let me know :)
Some things it could easily be modified to do include; tracking multiple clients (either using different file names or a directory structure), adding extra symbols for different events (including possibly, hours worked), counting up the number of days worked per week and over the month and perhaps even generating a .txt invoice (how cool, er, I mean retro, would that be?).
Anyway, the script is available for download below, remember you'll probably need to make it executable before you can run it.
Download timesheet.sh
In the same vein I've been looking for something that could keep track of my time-sheets for me. Now, I know there are some excellent apps out there already that do this, but I wanted something an order of magnitude simpler. In fact, all I needed to do was keep track of which days I had worked for a particular client.
So I came up with timesheet.sh, it's a simple script that you run from a unix command line. It creates a text file named after the current month (if there isn't one already) and in the text file you'll see the month's calendar courtesy of the tool 'cal' - the current day will be replaced by a couple of # symbols (marking it as 'worked').
All that I need to do every day when I'm doing work for this particular client is remember to type ./timesheet.sh in the terminal and the text file gets updated. When it comes to a new month the script simply creates a new file and carries on as if nothing had happened.
Here's how the file April currently looks for me...
I also added the ability to mark holidays (HH) and sick days (SS), you can see here that Good Friday and Easter Bank Holiday Monday are marked as holidays.
To do this you can just do ./timesheet.sh holiday or ./timesheet.sh sick
Of course, if you're not around to do this you can retrospectively do it in your fave text editor (which is probably called vi ;)
I'm not sure if this is of any use to anyone, but I thought I'd throw it out there and see. I had planned to extend it, but it does what I want for now so I haven't... If you do come up with any cool new ways of using it please let me know :)
Some things it could easily be modified to do include; tracking multiple clients (either using different file names or a directory structure), adding extra symbols for different events (including possibly, hours worked), counting up the number of days worked per week and over the month and perhaps even generating a .txt invoice (how cool, er, I mean retro, would that be?).
Anyway, the script is available for download below, remember you'll probably need to make it executable before you can run it.
Download timesheet.sh
|