Skip to main content

A CLI for time tracking

Project description

titr

titr (pronounced 'titter') is a time tracker app I've built for myself, which allows me to efficiently log my working hours, as well as automatically log calendar events from Outlook.

For over two years I've been in the daily habit of recording a detailed log of my work modes, which as allowed me to collect metrics for how my time is divided between deep work, email, shallow work, meetings, etc. These metrics are insightful, and also practically useful as I am required to report on a weekly basis how my time was split between different tasks, e.g. 75% task A, 25% task B.

Entering the data in Excel at the end of the workday is tedious, especially given that each entry requires me to fill out the date, task, and work mode. Even with shortcuts (ctrl + ;) and auto-complete, it still takes about 2.5 minutes to remember what I did and manually enter the data, generally about 8 entries per day.

The goal of titr is to reduce the cost of acquiring daily time-tracking data by using a keyboard-only command-line interface. A secondary benefit is to encourage the use of time block planning, which I have been doing using Outlook.

Installation & Setup

pip install titr

Requirements

  • Python 3.10
  • pip install pyperclip to enable copying data to clipboard
  • pip install pywin32 to enable integration with Outlook

Configuration

Configuration is stored in default.ini, which will be created in your working directory the first time you run titr at the command line. You will be asked to enter your email if you want to connect titr to Outlook. Your email address is stored locally and is not transmitted anywhere.

Usage

Type help at the command line to get a list of commands. titr has been designed to minimize the number of keystrokes required to input data. The pattern for new entries is duration <category> <account> <comment>.

  • Duration of a time entry must be a float, and is always requried.
  • Category must be an integer, and must be one of your pre-set categories.
  • Accounts must be a single character (non case-sensitive)
  • Anything not registered as a category or account will be interpreted as a comment.

Some example time entries:

  • 1 = One hour on the default account and default category
  • .5 2 i = Half an hour on category 2 (deep work) and account i (incidental)
  • .5 t write a readme = half an hour on default category on account t (titr) with comment "write a readme"

Change the date for all subsequent entries using the d or date command:

  • d -1 = set the date to yesterday
  • d 2022-05-06 = set the date to May 6th, 2022
  • date = set the date to today

Type p or preview to see the that will be entered in the database. Type s <duration> to scale the time entries to add up to however long you were supposed to be working.

Once ready to copy data to Excel, type clip, and then paste into your workbook.

Extracting data from Outlook

Type o or outlook at the command line to have titr look for Outlook calendar events for whatever date you've set. If the duration, category, and subject of the calendar event are to your liking, simply press <enter> to add to your time log. Otherwise enter data like you normally would at the prompt, and any user-inputs will override what's in Outlook. For example, if your meeting was scheduled for 1 hour but went on for 1.5, simply type 1.5 at the prompt and everything else will populate. If you skipped your meeting (good job), enter 0 to skip the entry.

It's recommended to set hotkeys to categorize your Outlook events based on your work-modes, and have these match the categories dictionary in titr. For example <ctrl>+<F2> sets the category to "Deep Work" in Outlook, which should be category 2 in titr.

See some of the options in default.ini if you want all day events or events with a status of out of office to be included.

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

titr-0.10.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

titr-0.10.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file titr-0.10.0.tar.gz.

File metadata

  • Download URL: titr-0.10.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.6

File hashes

Hashes for titr-0.10.0.tar.gz
Algorithm Hash digest
SHA256 8b961277e8b6f4b04f463f7853f95e9456f35c30e2210b9b2e50fe1710186666
MD5 d8108b8b28021207d979e805929ee5f9
BLAKE2b-256 a24f4b60d83036417a89bcf533de4723613d710c19739e001ff2bc377ab82c46

See more details on using hashes here.

File details

Details for the file titr-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: titr-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.5 CPython/3.10.6

File hashes

Hashes for titr-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be277b126b713f3e2faea024636c46816cd9452408ffe7aecd5fd5651c9a5d97
MD5 44652316b391979584112f1247a2720b
BLAKE2b-256 44d42bf073ef4934baa00928fa1f03d40461f3010ec0c5b459b25e39167afc31

See more details on using hashes here.

Supported by

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