Skip to main content

Python program that tracks total time spent on projects and saves sessions. It supports multiple projects.

Project description

⌛ HourTrack


Badge Workflow Badge License Badge Language Badge Pull Requests Badge Issues


Contents

📖 Description

💻 Windows, Linux and Mac compatible. 💻

A Python script to track time spent on various projects. This script allows you to start, stop, and monitor time tracking for different projects, as well as output data to files.

It is very lightweight since it doesnt have to be running in the background.

This script is going to help you track:

  • Total time spent on different projects
  • Work sessions information
  • Time spent on each session

🚀 Quick start

pipx install hourtrack
hourtrack start myProject

✨ Features

  • Supports multiple projects: Track time for multiple projects.
  • Start/Stop tracking: Start and stop tracking time for a project.
  • List projects: List all projects being tracked.
  • Delete project: Delete a project and all its data.
  • Reset project: Reset a project's data.
  • Export data: Export data to a .txt file.
  • ...

📦 Installation

From PyPI

pipx install hourtrack

pipx is optional but recommended, you can use pip instead.

Optional installation alternative

git clone https://github.com/P-ict0/HourTrack.git
cd HourTrack
pipx install .  # You can also use `pip`

📲 Usage

For help:

hourtrack --help

Start tracking: Start tracking session for a project. If the project does not exist, it will be created.

hourtrack start <project>

Stop tracking: Stop current session for a project, saving the time spent.

hourtrack stop <project>

Reset project: Reset a project's data.

hourtrack reset <project>

Delete project: Delete a project and all its data.

hourtrack delete <project>

List projects: List all/active projects.

hourtrack list <all|active> [--format <smart|full|short|hours>]

Project Status: Show the status of a specific project or show current active session. With option to output to a file.

# Project status
hourtrack status <project> [--format <smart|full|short|hours>] [-o <outputPath>]
# Active session
hourtrack status [--format <smart|full|short|hours>]

⚙ Options

Command Requirement Default Description
hourtrack --help None None For help
hourtrack start <project> Project name None Start tracking session for a project. If the project does not exist, it will be created.
hourtrack stop <project> Project name None Stop current session for a project, saving the time spent.
hourtrack reset <project> Project name None Reset a project's data.
hourtrack delete <project> Project name None Delete a project and all its data.
hourtrack list <all|active> [--format <smart|full|short|hours>] list all, format smart List all/active projects.
hourtrack status [<project>] [--format <smart|full|short|hours>] [-o <outputPath>] None None Show the status of a specific project or show current active session if project is not specified. With option to output to a file.

💻 Development

git clone https://github.com/P-ict0/HourTrack.git
cd HourTrack
python -m venv venv
pip install -r requirements.txt
source venv/bin/activate # Windows: .\venv\Scripts\activate.ps1

# Run the script
python src/hourtrack.py --help

👥 Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your suggested changes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hourtrack-1.0.3.tar.gz (46.8 kB view details)

Uploaded Source

Built Distribution

hourtrack-1.0.3-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file hourtrack-1.0.3.tar.gz.

File metadata

  • Download URL: hourtrack-1.0.3.tar.gz
  • Upload date:
  • Size: 46.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for hourtrack-1.0.3.tar.gz
Algorithm Hash digest
SHA256 6f472efd7cbe136c42d7c01f50fbdaa25e72895d126cf5f570695c2756e1314f
MD5 8e212ce733efbaedd94fda354e85aeee
BLAKE2b-256 7ca80f60864b237605644c99a425fc071fb847f14bba067485cd97d28aa6228a

See more details on using hashes here.

File details

Details for the file hourtrack-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: hourtrack-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for hourtrack-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6e412cfb6c9d26622cb8eaf92f5004cf566f6e49cb8d2d103f8e78a1d2cc2a90
MD5 0a6c3b0dfd4901263e960ed3e5cca8b8
BLAKE2b-256 1bc988d97b3d1abcc1204fa3b53e3d23b3f2872e2081a22afd94d6abc73db32a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page