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.2.0.tar.gz (47.1 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.2.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: worklog_markdown-0.2.0.tar.gz
  • Upload date:
  • Size: 47.1 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.2.0.tar.gz
Algorithm Hash digest
SHA256 6b9a2c5c35984b05e99dea0deb938f1e56dd898990a37191734666d623902d73
MD5 a36446a952f3dca9cd69653763026319
BLAKE2b-256 4b750f144bad4c1d380c461cb37e5c66c840043b2130a3ec532a338e7eb30bc2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: worklog_markdown-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c6228a30f935f4e2620f282e550af95838647a56afed9ccf47c2c1037ec00e6
MD5 a88b60c400e3fc8b614f2a32d3e3a1f9
BLAKE2b-256 b384c5f9a77330168d1c0f9f226dd23ed3d1ceaa2ff92504ebade09ce902e6ca

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