Templateless markdown template engine
Project description
markright v1.1.1
Templateless markdown template engine
Install
pip install markright
Python usage
Create a README.md file containing:
Existing value: ­<!---foo--><!---/foo-->
Missing value: ­<!---bar-->bar<!---/bar-->
Create python script markright_test.py with code like:
from markright import mark
data = {
"foo": "foo"
}
mark("README.md", data)
mark("README.md", data, True) # if you want to keep missing variables in the markup
Run your script python ./markright_test.py and you will get README.md looks pretty awsome after rendering, for example on gitlab :
Existing value: ­<!---foo-->foo<!---/foo-->
Missing value: ­<!---bar-->bar<!---/bar-->
If you forgot to keep the missing variables, you will get the result:
Existing value: ­<!---foo-->foo<!---/foo-->
Missing value: ­<!---bar--><!---/bar-->
Restarting the script does not require clearing the template, just run the script again with new data!
CLI Usage
markright -h # for help
markright -f README.md -d data.json # take data from json file
markright -f README.md -d data.ini # take data from [markright] section of ini file
markright -f README.md -d '{"foo": "bar"}' # data from json string
markright -f README.md -d data.json --dirt # if you want to keep missing variables
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
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 markright-1.1.1.tar.gz.
File metadata
- Download URL: markright-1.1.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f56f44045461a547b548366130735f79e18db4b5f7d7ee91028d1c5792cabf0
|
|
| MD5 |
a66c92e5fce9dc11e7e3aca3da6c1e57
|
|
| BLAKE2b-256 |
4bb5345c5276a8e350c3b469508bb3ac8ae0ef26c508c3e6198b344403b02ef2
|
File details
Details for the file markright-1.1.1-py3-none-any.whl.
File metadata
- Download URL: markright-1.1.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16bf9b536804f4d4bf13f8aa4d05665c36fb2512aebc85d1e562b286f286605a
|
|
| MD5 |
cf3a97ea4753d31de35939643f193cd1
|
|
| BLAKE2b-256 |
88dfcc102515042374551b4d58e2c9739a68cf460f442a5ac5c0082aef597eba
|