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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file worklog_markdown-0.1.0.tar.gz.
File metadata
- Download URL: worklog_markdown-0.1.0.tar.gz
- Upload date:
- Size: 46.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f027c8c0880bdffdcd7302974df01881e730c3329437c00e22169881055a5a68
|
|
| MD5 |
3be1a9a5b76c3b2a6739c2e7c80c6a0b
|
|
| BLAKE2b-256 |
b4e77b8dbb7778a2900eb4ab934a26926f4daa3df3c10b61a9c277978f3d4e32
|
File details
Details for the file worklog_markdown-0.1.0-py3-none-any.whl.
File metadata
- Download URL: worklog_markdown-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5fee8a992740d4aaf400986d446d1a20d6ab7dd44096c98eba538e19225673e
|
|
| MD5 |
6e2ae961aafc68a35414f4ea588ea309
|
|
| BLAKE2b-256 |
506894defec1d725864daf9dc5a517bc916b81190652cd76ff2a5e3fe8635bac
|