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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bedfb86c4a7d31ee748df913cecc86f336b358752052934ebeccac53c375d963
|
|
| MD5 |
2c96174c2c6b1db179f6b7f7e4bd7e2c
|
|
| BLAKE2b-256 |
9329cbad518754fa0062f2d74b90728c5151732aeec55a6be5ecc9f7d6dce928
|
Provenance
The following attestation bundles were made for modification_timekeeper-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on stefmolin/modification-timekeeper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modification_timekeeper-0.1.0.tar.gz -
Subject digest:
bedfb86c4a7d31ee748df913cecc86f336b358752052934ebeccac53c375d963 - Sigstore transparency entry: 206672782
- Sigstore integration time:
-
Permalink:
stefmolin/modification-timekeeper@b4904d4297368acf82a87174e9d2f7f14bb60572 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/stefmolin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@b4904d4297368acf82a87174e9d2f7f14bb60572 -
Trigger Event:
push
-
Statement type:
File details
Details for the file modification_timekeeper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: modification_timekeeper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9896d632d3de149050792d77a8ad33aad08e2545ba3a2e3eb59d618cdc26347
|
|
| MD5 |
bb3a8bcb2c146b607aebcb796f11de90
|
|
| BLAKE2b-256 |
80926036d40b09fc5afc45c0a30c5f51d5f061873b22380f7b353cc3d41517fe
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
modification_timekeeper-0.1.0-py3-none-any.whl -
Subject digest:
d9896d632d3de149050792d77a8ad33aad08e2545ba3a2e3eb59d618cdc26347 - Sigstore transparency entry: 206672784
- Sigstore integration time:
-
Permalink:
stefmolin/modification-timekeeper@b4904d4297368acf82a87174e9d2f7f14bb60572 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/stefmolin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@b4904d4297368acf82a87174e9d2f7f14bb60572 -
Trigger Event:
push
-
Statement type: