Skip to main content

It's a Python script that allows you to track the time spent working in your projects or tasks. At the moment, this script doesn't have external dependencies so it's ready to run.

Installation:

$ pip install time-tracker-cli

How to use:

Help menu:

$ time-tracker-cli -h

usage: time-tracker-cli [-h] [-p PATH] [-r] project

positional arguments:
  project               project name

optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  Path to the JSON data file
  -r, --report          Calculate and display a report of the time spent in the project

Start/end working session:

$ time-tracker-cli -p "~/Documents/my_project_time_tracker_data.json" "my_project"

The file or project within the file will be created automatically if it doesn't exist.

Behavior

The script saves "timestamps" for the working sessions in a JSON file with the following structure:

{
   "projects": [
       {
           "project_name": "a_project_name",
           "sessions": [
              {
                  "start": "dd/mm/yy - H:M:S" ,
                  "end": "dd/mm/yy - H:M:S"
              }
           ]
       }
   ]
}

Unfinished sessions will have a null value in the end field.

Report

To calculate the time spent working in a project, run:

$ time-tracker-cli -r -p "~/Documents/my_project_time_tracker_data.json" "my_project" 

Time spent working on project: 'my_project'
1 day, 7:52:19
Ongoing sessions: True
Time spent in ongoing session: 0:04:10.492647

TODO:

  • Add more functions to estimate the time spent working in a project (total, mean per day).
  • Add an argument to request a "report" of the time spent working in a project.
  • Add more documentation.
  • Add a simple GUI (optional).
  • Define behavior for unfinished sessions.

GUI version

Check out Time Tracker

Metadata

Release files for time-tracker-cli 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for time-tracker-cli 1.0.1
File Size Uploaded
time-tracker-cli-1.0.1.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for time-tracker-cli 1.0.1
File Interpreter ABI Platform
time_tracker_cli-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / time-tracker-cli-1.0.1.tar.gz

Download URL time-tracker-cli-1.0.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
377cfc8ca0cf8c0f2e60a15e8784c6779ecfaf72c6554f167811f5a8c7f18f20
BLAKE2b-256 checksum
How to use checksums
592bbebfa7f0c6230ad900754da745fb2d1157f68e646e1a009ecac46f6da814
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.16.14-arch1-1

Release files / time_tracker_cli-1.0.1-py3-none-any.whl

Download URL time_tracker_cli-1.0.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4086206243720f1da116398efaa635115f467098801f61c5281805561e9fe36
BLAKE2b-256 checksum
How to use checksums
c9c258cf868a7445a38137741316f4e04ba2103f9d62b26f2e20296432a11a6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.2 Linux/5.16.14-arch1-1

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page