Skip to main content

Templateless markdown template engine

Project description

markright v­1.1.1

Templateless markdown template engine

Install

pip install markright

Python usage

Create a README.md file containing:

Existing value: &shy;<!---foo--><!---/foo-->

Missing value: &shy;<!---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: &shy;<!---foo-->foo<!---/foo-->

Missing value: &shy;<!---bar-->bar<!---/bar-->

If you forgot to keep the missing variables, you will get the result:

Existing value: &shy;<!---foo-->foo<!---/foo-->

Missing value: &shy;<!---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

markright-1.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

markright-1.1.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

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

Hashes for markright-1.1.1.tar.gz
Algorithm Hash digest
SHA256 9f56f44045461a547b548366130735f79e18db4b5f7d7ee91028d1c5792cabf0
MD5 a66c92e5fce9dc11e7e3aca3da6c1e57
BLAKE2b-256 4bb5345c5276a8e350c3b469508bb3ac8ae0ef26c508c3e6198b344403b02ef2

See more details on using hashes here.

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

Hashes for markright-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 16bf9b536804f4d4bf13f8aa4d05665c36fb2512aebc85d1e562b286f286605a
MD5 cf3a97ea4753d31de35939643f193cd1
BLAKE2b-256 88dfcc102515042374551b4d58e2c9739a68cf460f442a5ac5c0082aef597eba

See more details on using hashes here.

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