Skip to main content

timecount

Work time tracking for hackers.

Requirements

Python >= 3.8

Install

Install the timecount python package via pip from pypi.org:

pip install --user timecount

Getting Started

Simply create an executable file ~/timelog (it doesn't matter where you put it) with the following example content:

#!/usr/bin/env python3
from timecount import process
from timecount.tctypes import (
    EmploymentContract,
    Balance,
    Day,
    HoliDay,
    SickDay,
    VacationDay,
)

# fmt: off
entries = [

    EmploymentContract(begin="01-04-2020", hours_per_week=30, vacation_days_per_year=23),
    Balance(remove_vacation_days=7, note="Contract starts with April, thus remove 3 Month."),
    Balance(reduce_week_target_by_days=2, note="You need to balance for two work days here, because you start in the middle of the week."),

    Day("01-04-2020", (12.30, 20.00), (20.30, 01.15), "Configure Workstation"),
    Day("02-04-2020", (14.30, 00.30), "Configure Workstation"),
    Day("03-04-2020", (10.30, 15.00), "Configure Workstation"),
    Day("06-04-2020", (10.00, 14.30), (17.00, 22.15) , "Pair Programming Daniel."),

    Day("07-04-2020", (10.30, 14.30), (15.30, 21.45) , "Pair Programming Daniel."),
    SickDay("08-04-2020", "Covid19")
    Day("09-04-2020", (11.00, 15.00), (19.30, 22.00) , "Meeting; Try test automation."),

    HoliDay("10-04-2020", (12.00, 13.00), "Karfreitag; Tooling"), # I worked on this holiday..
    Day("11-04-2020", (11.00, 14.00), (21.15, 00.00), "Tooling, Testing."),
    Day("12-04-2020", (11.15, 13.15), "Configure Workstation; Tooling;"),

    HoliDay("13-04-2020", (11.00, 16.00), "Ostermontag; Slack Channel Catchup; System Setup; Tooling"),
    Day("14-04-2020", (11.00, 14.00), (15.30, 18.30), "Tooling; SlackMeetings;"),

   # Continue with your logs ...
]

process(entries)

Now run ~/timelog in your terminal to see the results.

For convenience I suggest creating a symlink for the timelog file in your ~/bin directory, so you can call timelog from anywhere in your terminal:

ln -s ~/timelog ~/bin/timelog

Entry Types

For a list of EntryTypes and their arguments, see tctypes.py.

Examples

Look in ./tests for a more complete example.

Release files for timecount 0.3.0

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

Built distribution (wheel)

Table of built distributions (wheels) for timecount 0.3.0
File Interpreter ABI Platform
timecount-0.3.0-py3-none-any.whl Python 3 none any Details

Release files / timecount-0.3.0-py3-none-any.whl

Download URL timecount-0.3.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d2a6323c7a79dd16e89a4ed87aba470f1c689a2faad6dbc845d5d985151bc95
BLAKE2b-256 checksum
How to use checksums
8430600f8debb46283fe25f3f09d3f8e0c4080a7be901e59f83cbb7c4b54838d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

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