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.

Metadata

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 Actions
timecount-0.3.0-py3-none-any.whl Python 3 none any Details for timecount-0.3.0-py3-none-any.whl

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

Security for timecount 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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