A lightweight Python script for recording time spent working on projects. It is designed for a single user on a Linux system.
- Single user.
- Runs in a separate terminal while you work.
- Doesn't require any external libraries.
- Uses a single database table.
- Easily configured and managed using two simple JSON files.
- Easy to install and run.
- Download the files or clone from Github
- You must have Python installed on your system
- Tested with Python 3.8.10 on Ubuntu/Linux
- Not tested on Windows
If you just want to see how the program works, you can run it in test mode. Simply locate the following code in the stt.py file and change test=False
to test=True
.
if __name__ == "__main__":
stt = SimpleTimeTracker(test=False);
stt.track();
print("Goodbye!")
In a terminal, enter "python local/path/stt.py"
To use STT outside of test mode:
- Navigate to the directory where you installed Simple Time Tracker.
- At the terminal prompt, enter: "python setup.py"
- In the
__data__
directory, modifyprojects.json
andactivities.json
to suit your needs. - If you changed the
test
parameter in stt.py toTrue
, change it back toFalse
. - Enjoy!
[
{
"name": "Project 0",
"status": "active",
"description":"Flyweight test project"
},
{
"name": "Project 1",
"status": "active",
"description": "Lightweight test project"
}
]
Each project to be tracked must have an entry with "name" and "status" keys. Only projects with "status" set to "active" are displayed to the user. For projects that the user doesn't want displayed, status can be set to anything other than "active". Projects can be added at will or deleted without affecting existing data. Additional keys can be added with no effect on the program or the data.
[
"activity 0",
"activity 1",
"activity 2",
"activity 3",
"activity 4"
]
The activities.json file is just a list. It can be modified at any time without affecting the program operation or existing data.
Creating reports from STT data is completely flexible and can be output in a variety of formats. No reports have been hard-coded into the program, but sample reports and the code to create them can be found in stt-reports.ipynb, which can be viewed in this repository or on Google Colab
Tests are located in the tests folder, but must run in the root directory.