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.0
  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.0
  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.0.tar.gz (15.6 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.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: modification_timekeeper-0.1.0.tar.gz
  • Upload date:
  • Size: 15.6 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.0.tar.gz
Algorithm Hash digest
SHA256 bedfb86c4a7d31ee748df913cecc86f336b358752052934ebeccac53c375d963
MD5 2c96174c2c6b1db179f6b7f7e4bd7e2c
BLAKE2b-256 9329cbad518754fa0062f2d74b90728c5151732aeec55a6be5ecc9f7d6dce928

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for modification_timekeeper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9896d632d3de149050792d77a8ad33aad08e2545ba3a2e3eb59d618cdc26347
MD5 bb3a8bcb2c146b607aebcb796f11de90
BLAKE2b-256 80926036d40b09fc5afc45c0a30c5f51d5f061873b22380f7b353cc3d41517fe

See more details on using hashes here.

Provenance

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