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.1
  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.1
  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.1.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.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: modification_timekeeper-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 041ce5152dfd30832da8dd2901ac3c038aef45b38d3fc93fef8361f4140ebb4b
MD5 d38daea84293d02172504df4d8706b87
BLAKE2b-256 b083076e915ea8275a41ff40bf2771301b2664e5b13fd4e01b2ce2fba9aed090

See more details on using hashes here.

Provenance

The following attestation bundles were made for modification_timekeeper-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for modification_timekeeper-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3b14fb2e7f162f532a9bad20093269a91b2bb904dff2b5ef3962699f4274521
MD5 b1eb9919ca8942ac720584556e622f7b
BLAKE2b-256 2be1a095a68ee82a3f3840e8bae738e7d51e9fbaea1ebb0ee5e9fd3b402535ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for modification_timekeeper-0.1.1-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