Skip to main content

Work log parser and time aggregator

Project description

worklog

Parse Obsidian-style Markdown work logs and produce time-summary tables, broken down by project and day.

Installation

Requires Python 3.11+. Install with pip or pipx:

pip install worklog-md

Install with uv:

uv sync

The worklog command is then available via uv run worklog.

Work log format

Each file is a Markdown document. Days are delimited by H1 headings containing an ISO date. Entries live under a ## Work Log subsection (configurable).

# 2026-01-05

## Work Log

- 8:30 - 9:30 Morning standup [project:: Alpha]
- 10:00 - 11:30 [[Feature branch|Feature work]] [project:: Beta]
- 1h Code review [project:: Alpha]
- 20m Email triage [project:: Alpha] [worklog:: skip-comments]
- 30m Off-the-record meeting [project:: Beta] [worklog:: skip]

Entry formats

Time can be expressed as a clock range or a duration:

Format Example
Clock range 8:30 - 9:30
Hours 1h
Minutes 20m
Hours and minutes 1h30m or 1h 30m

Inline tags

All tags use Obsidian's inline field syntax [key:: value].

Tag Effect
[project:: Name] Required. Associates the entry with a project column.
[worklog:: skip-comments] Time is counted but the description is omitted from the comments cell.
[worklog:: skip] Entry is ignored entirely — no time, no comments.

Obsidian wiki-links

Wiki-links in descriptions are resolved automatically:

  • [[some page\|human readable]]human readable
  • [[some page]]some page

Obsidian comments

%% ... %% blocks (both inline and multi-line) are stripped before parsing.

Configuration

The config file can be TOML, JSON, or YAML. All keys are optional.

[schema]
# Explicit project list determines column order and filters out anything else.
# Omit to auto-detect all projects that appear in the log files.
projects = ["Alpha", "Beta"]

# Cell values: "hours" (default, decimal) or "minutes" (integer)
time_unit = "hours"

[parser]
# H2 heading that marks the work log section. Default: "Work Log"
work_log_heading = "Work Log"

Usage

worklog [OPTIONS] FILES...

| Option | Short | Description | | --- | --- | --- | --- | | --config PATH | -c | Config file path (.config/worklog.toml by default) | | --format TEXT | -f | Stdout format: markdown (default), csv, tsv | | --output PATH | -o | Write to file; format inferred from extension |

Supported output extensions: .csv, .tsv, .md, .xlsx.

Examples

Print a Markdown table to stdout:

uv run worklog 2026-01.md -c worklog.toml

Combine multiple log files:

uv run worklog jan.md feb.md mar.md -c worklog.toml

Export to Excel:

uv run worklog 2026-01.md -c worklog.toml -o report.xlsx

Write CSV to stdout:

uv run worklog 2026-01.md -c worklog.toml -f csv

Output schema

Column Content
date ISO date string (YYYY-MM-DD)
<project> Total hours (or minutes) logged for that project on that day
comments Descriptions from all entries, grouped by project: [Alpha] task A; task B | [Beta] task C

Running tests

uv run pytest

Project layout

worklog/
  models.py      — LogEntry and DayLog dataclasses
  parser.py      — Markdown parser (comment stripping, wiki-link resolution, entry parsing)
  aggregator.py  — Builds the pandas DataFrame from parsed day logs
  cli.py         — Typer CLI (entry point: worklog command)
tests/
  test_parser.py
  test_aggregator.py

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

worklog_markdown-0.3.0.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

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

worklog_markdown-0.3.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file worklog_markdown-0.3.0.tar.gz.

File metadata

  • Download URL: worklog_markdown-0.3.0.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for worklog_markdown-0.3.0.tar.gz
Algorithm Hash digest
SHA256 fec8a739cc57b2dc5d1e93e8a4dfe6903240a42d124f61f23b592b0a1a22776d
MD5 90c4dec0b864aae20285e3bfb773f304
BLAKE2b-256 051d40a2fc9d80109444a30aa841358224a905a9c05a8b34db61dbc96949c95a

See more details on using hashes here.

File details

Details for the file worklog_markdown-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: worklog_markdown-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for worklog_markdown-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47c3993c0b4febd0b6a370cbb78ce84bbe7f300ae06a49b48a5bc75f906bc1d1
MD5 f29847f843acb29e80a053cdaf1c5783
BLAKE2b-256 ec81ef46a75b9ad079ba469b55d8d43edb2c5311b931b2848f6da3321dde2879

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