Skip to main content

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, or mkdocs;
  • ${TARGET} — current target, e.g. site, or pdf.

Metadata

Release files for foliantcontrib.runcommands 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for foliantcontrib.runcommands 1.0.1
File Size Uploaded
foliantcontrib.runcommands-1.0.1.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for foliantcontrib.runcommands 1.0.1
File Interpreter ABI Platform
foliantcontrib.runcommands-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 kB

Release files / foliantcontrib.runcommands-1.0.1.tar.gz

Download URL foliantcontrib.runcommands-1.0.1.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
562a95f1bc5404cf6238dcf44ef84bf212d0da455b9d180db44541529868b5da
BLAKE2b-256 checksum
How to use checksums
5a44d0da6d9721a47af9e51ed5e29a373217d6d0419e740c5793df8e5f97ac8c
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / foliantcontrib.runcommands-1.0.1-py3-none-any.whl

Download URL foliantcontrib.runcommands-1.0.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
daf6de0c4fb576039b6de93843b2e3e964dbf7c0056667fa894732f8d045db25
BLAKE2b-256 checksum
How to use checksums
e59b22d7e92133809a358571f7dffcde2858aec0894af899f653e83fce06bfc2
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page