facile_rs.run_markdown_pipeline¶
Copy the content of Markdown files to a Grav CMS repository.
Description¶
This script copies the content of markdown files in the PIPELINE_SOURCE to a Grav CMS repository given by GRAV_PATH. The Grav repository is created by the Git-Sync Plugin.
The pages need to be already existing in Grav and contain a pipeline and a source field in their frontmatter.
The script will find all pages which match the provided PIPELINE and will overwrite content part of the page with the
markdown file given by source.
If source is codemeta.json, the content will be added to the frontmatter entry codemeta rather than overwriting
the page content.
Twig templates digesting the metadata can be found in the file Twig_templates.md in this directory.
After running the script, the changes to the Grav CMS repository can be committed and pushed, and the Git-Sync Plugin
will update the public pages.
See openCARP citation info or code of conduct for examples.
Usage¶
usage: run_markdown_pipeline.py [-h] [--grav-path GRAV_PATH]
[--pipeline PIPELINE]
[--pipeline-source PIPELINE_SOURCE]
[--log-level LOG_LEVEL] [--log-file LOG_FILE]
Named Arguments¶
- --grav-path
Path to the grav repository directory.
- --pipeline
Name of the pipeline as specified in the GRAV metadata.
- --pipeline-source
Path to the source directory for the pipeline.
- --log-level
Log level (ERROR, WARN, INFO, or DEBUG)
- --log-file
Path to the log file
Module Contents¶
Functions¶
Data¶
API¶
- logger = 'getLogger(...)'¶
- create_parser(add_help=True)¶
- main()¶
- main_deprecated()¶