Up: Component summary Component

Pandoc

Executes Pandoc with user given switches. Use to convert markdown, or any other wiki style structured document to other presentation types, like LaTeX, HTML, or PDF. Markdown is a ascii friendly way of formatting text for inline code, or e-mail environments. In addition this component can convert CSV to markdown tables! But note, there are several markdown flavours to be selected from.

Pandoc markdown syntax

Try Pandoc online

Version 1.0
Bundle tools
Categories Reporting
Authors Ville Rantanen (ville.rantanen@helsinki.fi)
Issue tracker View/Report issues
Requires pandoc ; ncsv ; pandoc (DEB) ; ncsv (python)
Source files component.xml pandoc_anduril.bash
Usage Example with default values

Inputs

Name Type Mandatory Description
in Array<BinaryFile> Mandatory File to read. Specify the format in parameters. See parameter concatenate.
header Array<TextFile> Optional Header to be added with the -H switch. Multiple files concatenated.
before Array<TextFile> Optional Text to be added with the -B switch. Multiple files concatenated.
after Array<TextFile> Optional Text to be added with the -A switch. Multiple files concatenated.
attachment Array<BinaryFile> Optional Files (e.g. images) to be copied in the document folder before conversion. Keys are used as filenames

Outputs

Name Type Description
out Array<BinaryFile> File of the format specified in the parameters.

Parameters

Name Type Default Description
CSVFormat string "%g" CSV conversion number formatting, e.g. %0.3f.
basename string "document" Output file name. Extension added automatically. This name is used as the document key in the output array
concatenate boolean true Concatenate inputs as one outputdocument. If false, in array keys are used as basename, multiple outputs created.
copyAttachments boolean false Copy attachment files in the output folder. Typically required e.g. with HTML output.
from string "markdown" Input file format. In addition to Pandoc formats, may be CSV, which is parsed with nicecsv.
switches string "" Switches passed on to pandoc.
to string "HTML" Output file format. This string is the extension of the output file. To use the --to=FORMAT switch, add it in the switches parameter.

Test cases

Test case Parameters IN
in
IN
header
IN
before
IN
after
IN
attachment
OUT
out
csv_to_html properties in (missing) (missing) (missing) (missing) out

from=CSV,

csv_to_markdown properties in (missing) (missing) (missing) (missing) out

from=CSV,
to=md,
CSVFormat=%.3f,

Test network

Display TestNetwork
Generated 2019-02-08 07:42:18 by Anduril 2.0.0