Manipulate YAML front matter.
Project description
py-frontmatter
To manipulate front matter in document file.
Installation
pip install py-frontmatter
Usage
% cat note.md
---
title: Hacker's note
tags: [a, b]
---
# header
text
To retrieve front matter as JSON:
% frontmatter get note.md | jq
{
"title": "Hacker's note",
"tags": [
"a",
"b"
]
}
To replace the front matter:
% echo '{"title": "My note", "tags": ["a", "b", "c"]}' | frontmatter set note.md
% cat ~/today/note.md
---
title: My note
tags:
- a
- b
- c
---
# header
text
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
py_frontmatter-0.2.0.tar.gz
(8.5 kB
view hashes)
Built Distribution
Close
Hashes for py_frontmatter-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d19912c00b9223f271766d205e60e77741af1d9736b0c55a55be99359aed440 |
|
MD5 | b2936ca5c51ba58d5df1f0f6af50f133 |
|
BLAKE2b-256 | 10012b4934ea6d76a7963c36eaa16c437776a6367c845df67cc23ae756ec9a8e |