A simple activity tracker for Windows.
Project description
time-on-fire
A simple activity tracker written in Python for Windows 10.
Why? There are time trackers already.
I didn't find a simple time tracker for Windows. A lot of them are for teams/are paid/have a lot of features that I didn't need (like tracking time spent on projects, graphs, analytics, goals, grouping activities and so forth). Most of the time I just needed to check what I was doing today, or to see the average screen time of my apps this week. For these simple tasks, time-on-fire is much better suited, allowing me to do them in a single keystroke: tof report and tof report 2022-07-10:2022-07-16 -m avg respectively. It's deliberately crude and simple, containing only 3 commands (only one of which takes an argument and an option). If you want a GUI and more advanced features, check out ActivityWatch. It's crossplatform, free and open source.
Quickstart
Installation рџ’ѕ
Execute
pip install time-on-fire
in your terminal, and wait till pip finishes the installation. (or py -m pip install tof if didn't work)
Tracking рџ”Ћ
To start tracking your activities, execute tof track. Your activities (apps, foreground processes) are now being saved into a database.
Hit Ctrl+C when you're done. Just don't forget to stop recording before you turn off your computer, as the last activity won't be saved!
You can add a --debug flag when you execute the track command, to see the transitions between activities (e.g. 1.exe 11:00 -> 2.exe 12:00)
You can clear the database with tof clear_db.
Creating reports рџ“Љ
Use the report command to create reports of your activities.
Arguments:
date_range
A date in YYYY-MM-DD format, or a range of dates in YYYY-MM-DD|YYYY-MM-DD format. Default is today.
Options:
--mode, -m
One of the three modes: total, avg and raw.
total- Total screen time per process in range.avg- Average screen time per day per process in range.raw- Raw records (id, date, process name, start time, end time) in range.
Default is total.
Examples:
tof report
returns a table summarizing your today activity;
tof report 2022-05-05|2022-05-18 -m avg
returns a table, containing the average screen time of each process per day, from
5th to 18th of May;
tof report 2022-04-01 -m raw
returns raw database records that were made on 1st of April.
Config вљ™пёЏ
Do you have some app that pops up when idling and messes up your records (a reminder or an alarm, a floating dock, any process that's sometimes or always in the foreground, but you don't want to track its screen time)?
Good news, you can configure time-on-fire to ignore these processes!
How to find the config:
Execute pip show tof (or py--m pip show tof) and look for a Location row. Go to this path.
Inside site-packages folder (where you just navigated) look for a folder named (or contains) time-on-fire, then navigate inside.
There will be a time_on_fire folder (inside of time-on-fire), inside of which you'll find config.py, our configuration file!
It looks like this (without comments):
POLLING_DELAY = 0.2
IGNORE_PROCESSES = ["ShellExperienceHost.exe", "mbamtray.exe", "ueli.exe", "explorer.exe"]
POLLING_DELAY is how fast the script polls for the current foreground process.
IGNORE PROCESSES is a list of processes that the script will ignore.
Notes
- If, for example, you switch from Chrome to desktop, it will still count as Chrome's screen time, because
explorer.exedoes not only pop up at desktop, but also when clicking the taskbar or just idling. I have no reliable way of knowing whether the user switched to desktop or it's popping by itself (it could last from 3 seconds to 15 minutes during testing). Let me know if you have a fix. - The inner
time_on_firefolder is written with underscores, because it's a package, and Python packages shouldn't have an underscore. The outer folder is a repository (either on GitHub or PyPI).
That's it. That's the documentation. It's that simple.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file time-on-fire-0.1.0.tar.gz.
File metadata
- Download URL: time-on-fire-0.1.0.tar.gz
- Upload date:
- Size: 46.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37c9e60c434ce05e76ed827462c2f8999ac89108967d8150a03993a73e5a0f66
|
|
| MD5 |
d9370aa0fdc80d2e1ca45a72357914d0
|
|
| BLAKE2b-256 |
42083a1720c5f9355d9ac6227ac69d6e7629c78f78e3f6b44f8b982b42f7f001
|
File details
Details for the file time_on_fire-0.1.0-py3-none-any.whl.
File metadata
- Download URL: time_on_fire-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
669ebe297822cd7c8e5e7485b3534751efc6668c38853663a672dd707c7e88e6
|
|
| MD5 |
0726c295b91b51d098475c2c12bde3c2
|
|
| BLAKE2b-256 |
6bc02a34dd998d5d8ddcfb1153b4d7b939ec4f381e55822e86a87b22b34f578e
|