Preprocessor for Foliant to run arbitrary external commands.
Project description
RunCommands
RunCommands is a preprocessor that allows to execute a sequence of arbitrary external commands.
Installation
$ pip install foliantcontrib.runcommands
Usage
To enable the preprocessor, add runcommands to preprocessors section in the project config, and specify the commands to run:
preprocessors:
- runcommands:
commands:
- ./build.sh
- echo "Hello World" > ${WORKING_DIR}/hello.txt
targets:
- pre
- tex
- pdf
- docx
commands
: Sequence of system commands to execute one after the other.
targets
: Allowed targets for the preprocessor. If not specified (by default), the preprocessor applies to all targets.
Supported environment variables
You may use the following environment variables in your commands:
${PROJECT_DIR}— full path to the project directory, e.g./usr/src/app;${SRC_DIR}— full path to the directory that contains Markdown sources, e.g./usr/src/app/src;${WORKING_DIR}— full path to the temporary directory that is used by preprocessors, e.g./usr/src/app/__folianttmp__;${BACKEND}— currently used backend, e.g.pre,pandoc, ormkdocs;${TARGET}— current target, e.g.site, orpdf.
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 foliantcontrib.runcommands-1.0.1.tar.gz.
File metadata
- Download URL: foliantcontrib.runcommands-1.0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
562a95f1bc5404cf6238dcf44ef84bf212d0da455b9d180db44541529868b5da
|
|
| MD5 |
27791685b803f42331a57e8a4f9fa0db
|
|
| BLAKE2b-256 |
5a44d0da6d9721a47af9e51ed5e29a373217d6d0419e740c5793df8e5f97ac8c
|
File details
Details for the file foliantcontrib.runcommands-1.0.1-py3-none-any.whl.
File metadata
- Download URL: foliantcontrib.runcommands-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daf6de0c4fb576039b6de93843b2e3e964dbf7c0056667fa894732f8d045db25
|
|
| MD5 |
5c3a7b233412030f6ee0f4c4a17e78d8
|
|
| BLAKE2b-256 |
e59b22d7e92133809a358571f7dffcde2858aec0894af899f653e83fce06bfc2
|