Skip to main content

Tool for keeping the modified time in front matter up to date.

Project description

Modification Timekeeper

Keep modification time in a Markdown file's YAML front matter up to date.

Usage as a pre-commit hook

Add the following to your .pre-commit-config.yaml file:

- repo: https://github.com/stefmolin/modification-timekeeper
  rev: 0.1.2
  hooks:
    - id: modification-timekeeper

You can also configure the name of the last modified field (--field-name), which field to put the modified field after it it doesn't already exist (--after-key), whether to use UTC (--as-utc), and the number of seconds after which the modified time in the file is considered stale (--tolerance):

- repo: https://github.com/stefmolin/modification-timekeeper
  rev: 0.1.2
  hooks:
    - id: modification-timekeeper
      args: [--field-name=modified, --after-key=publication_date, --as-utc, --tolerance=30]

Be sure to check out the pre-commit documentation for additional configuration options.

Contributing

Please consult the contributing guidelines.

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

modification_timekeeper-0.1.2.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

modification_timekeeper-0.1.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file modification_timekeeper-0.1.2.tar.gz.

File metadata

  • Download URL: modification_timekeeper-0.1.2.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for modification_timekeeper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 432eb086574774cca71576d4bd2c7a4b21490b9dec46af12251f64187a16f016
MD5 fbb36b1c20c7864216c40dbfc33e0e1d
BLAKE2b-256 8fef6b3a6f777161a60ac7b262fb4121b3c8b28a894cb43556f098f802b66706

See more details on using hashes here.

Provenance

The following attestation bundles were made for modification_timekeeper-0.1.2.tar.gz:

Publisher: pypi-publish.yml on stefmolin/modification-timekeeper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modification_timekeeper-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for modification_timekeeper-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 73bf2b4987cc6c4b75779b8ca191630646b094a00e0dea41cf82cc8158b7bfb6
MD5 d4be7cfad84b98d083558cd8de9de3ae
BLAKE2b-256 d7706e76acbc0fb8dd18c9d3dd76930beec8e5d301437bd5ffdcea26702bdd87

See more details on using hashes here.

Provenance

The following attestation bundles were made for modification_timekeeper-0.1.2-py3-none-any.whl:

Publisher: pypi-publish.yml on stefmolin/modification-timekeeper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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