This commit is contained in:
JMARyA 2023-11-06 09:58:08 +01:00
parent c4f493966a
commit a9269e7dd1
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 97 additions and 57 deletions

24
README.md Normal file
View file

@ -0,0 +1,24 @@
# mdpatch
Patch the frontmatter of markdown files
# Usage
```
Usage: mdpatch [OPTIONS] <markdown>
Arguments:
<markdown> Markdown File
Options:
-p, --patch <PATCH> Apply JSON Patch file. If set to '-' read from stdin
--merge <FILE> Merge Markdown frontmatter. If set to '-' read from stdin
-a, --add Only patch add operations
-m, --modify Only patch modify operations
-d, --delete Only patch delete operations
-v, --verbose Print out what changes will be made to the document
-n, --dryrun Dont modify the input file. Only print what would be done
-o, --output <OUTPUT> Write patched file to output path. Dont modify the input file directly. If set to '-' output to stdout
--notest Ignore tests in JSON Patch files
-x, --exclude <JSONPATH> Exclude json path from patch
-k, --keys <JSONPATH> Only include the specified json paths in patch
```