Skip to content

Command Line Interface

Hello World Example

echo Hello World >
baseprinter -b=baseprint

The above example generates a Baseprint document snapshot in the baseprint subdirectory. The snapshot contains a Baseprint JATS XML file named article.xml.


To use Baseprinter from the command line, it can be run in two ways:

  • as a OCI (Docker) container, or
  • from locally installed packages.

For installation instructions, refer to the Baseprinter start page.


usage: baseprinter [-h] [-b BASEPRINT] [-o OUTDIR] [-C DIRECTORY] [--skip-pdf]
                   [-m MONITOR] [-d DEFAULTS]
                   [infiles ...]

positional arguments:
  infiles               pandoc input files

  -h, --help            show this help message and exit
  -b BASEPRINT, --baseprint BASEPRINT
                        baseprint output directory
  -o OUTDIR, --outdir OUTDIR
                        HTML/PDF output directory
                        run from this directory
  --skip-pdf            Do not generate PDF
  -m MONITOR, --monitor MONITOR
                        paths to monitor
  -d DEFAULTS, --defaults DEFAULTS
                        pandoc default option settings


The non-option arguments for input files (infiles ...) are passed through to pandoc. Pandoc will concatenate multiple input files. Pandoc can convert Markdown, LaTeX, and many other source file formats.

Command Line Options


Options for -d and --defaults for defaults files are also passed through to pandoc. For more information, see the Defaults files section of the Pandoc User's Guide.


Refer to the How to Auto-Refresh with Baseprinter guide.