Skip to main content

Extract time-tracking data from LogSeq journal CLOCK entries

Project description

logseq-tmsh

Extract time-tracking data from LogSeq journal CLOCK entries.

logseq-tmsh reads your LogSeq graph's daily journal files and sums up time from org-mode CLOCK: blocks, letting you query what you worked on today, this week, or any date range.

Install

pip install logseq-tmsh
# or
uv tool install logseq-tmsh

Quick Start

# Show version
ltmsh --version

# Configure once
ltmsh configure

# Show today's work
ltmsh today

# Show this week
ltmsh week

# Show a custom range (dates in YYYY-MM-DD format)
ltmsh range --from 2024-01-01 --to 2024-01-31

# Human-readable output
ltmsh today --pretty

# Filter by tag (AND logic)
ltmsh today --tag ori --tag meeting

# Pretty-print JSON
ltmsh today --indent 2

Scanning Old Tasks

By default, all journal files are scanned — not just files within the queried period. This is intentional: in LogSeq, a task created years ago accumulates CLOCK entries in its original file, so restricting the file scan to the query window would silently miss recently-clocked work on old tasks.

# Correctly finds time logged today on a task created in 2023
ltmsh today

For large vaults where you know your active tasks are recent, use --scan-from to skip old files and speed up queries:

# Only scan files dated 2025-01-01 or later
ltmsh today --scan-from 2025-01-01
ltmsh week --scan-from 2025-01-01
ltmsh range --from 2026-04-01 --to 2026-04-17 --scan-from 2025-01-01

You can also set a permanent default in ~/.logseq-tmsh/config.toml:

[paths]
journals = "/path/to/logseq/journals"
scan_from = "2025-01-01"   # omit to scan all files (default)

Output Fields

title, status, time_period, time_total, time_override, started, completed, tags, refs, has_running_clock, description, source_file, source_date

Configuration

~/.logseq-tmsh/config.toml — created by ltmsh configure.

License

MIT

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

logseq_tmsh-0.2.1.tar.gz (65.3 kB view details)

Uploaded Source

Built Distribution

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

logseq_tmsh-0.2.1-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file logseq_tmsh-0.2.1.tar.gz.

File metadata

  • Download URL: logseq_tmsh-0.2.1.tar.gz
  • Upload date:
  • Size: 65.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for logseq_tmsh-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e73a6c14bca5888ce17237f9c98f48d131b6f01bc98d884d8632389ede592e4c
MD5 f76bbd8427e8ca0bf902c274bb85e9ed
BLAKE2b-256 a158cde2bc248199fa666845b4fa563ae319e48b464a99834b6c3181fecd39b1

See more details on using hashes here.

File details

Details for the file logseq_tmsh-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: logseq_tmsh-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for logseq_tmsh-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea860711c7f21c6bafa07264b928e124ead972a8a70111dee352a617ec44fee1
MD5 9a617e96e9df1b6d4ed238b226242eb3
BLAKE2b-256 a8bd27617924f7f68c8d6277fff2e6fdfdbf1a91591df0fba4fe22043e2ae0fc

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