|Last change on this file since 42:cff2c17bc1d4 was 42:cff2c17bc1d4, checked in by , 9 years ago|
|File size: 2.7 KB|
From where does it come from?
Stamper was born strongly inspired by the original stamp tool written by Sascha Welter (aka betabug).
The idea is quite simple:
You stamp a time in a text file, recording that time as the time when you started working on something:
2014-08-13 09:45 start
You stamp again once you have finished, providing something like an id (to identify a customer, project, whatever) and a description of what you did:
2014-08-13 10:45 stamper writing documentation
Those times are saved into a text file and afterwards, with a little bit of python magic, you get some reports about the amount of time dedicated per day or id (for example).
Enter the JSON
Betabug's stamp tool records those times as lines in a text file. This is quite convenient because you can look into the file with traditional tools like cat, head or tail, or even open it with your favourite editor, and get information about the times you've spent working on something.
But this comes at a cost, it needs some ugly parsing of the .txt file in the python code that calculates the statistics and reports, making it difficult/slow to perform certain tasks.
And here it comes JSON:
(extracted from http://json.org)
Using a .json file instead of a txt file, we can export/import python data structures (like lists or dicts) easily into a text-like file. This means that we can still edit the file using a text editor, or check its contents using cat, head or tail, but we can forget about the parsing of the entries.