Glossary

Document

Output file generated by this library. Given the flexibility of this library it can be any type of file: PDF, .docx, .pptx, …, but also non-traditional documents, such as XML, javascript code, …

Document specification

Folder structure that defines how this library will generate a given document. This specification defines, among other things, the structure of the document, the data source(s) for each fragment, how the data is transformed and which workflow will be followed. When compiling a document specification along with a document parameter a document is generated.

Document parameter

Dictionary with the necessary info to generate a document given a document specification. This dictionary will be provided to each fragment context generation to return its context. In the parameter augmentation stage this dictionary can be optionally complemented with further information.

Fragment

Pieces that structure a document specification. Each fragment can be, for example, a section of a document or a figure. Fragments can include other fragments in an arbitrarily complex tree structure. Each fragment has a template file and, usually, a source file to generate its context. The root fragment that includes the rest is called the main template and is defined on the config.conf file.

Workflow

List of plugins used in each stage to determine how a particular document is generated. One workflow could consist of latex templates, python source files and pdflatex processing, while another could be rmarkdown files processed by pandoc.

Parameter augmentation

Document parameter update with additional information related to the given information, with the intent to avoid fetching the information on each fragment. For instance, if we have a document parameter with a country ISO code, it may be useful to augment it with the country’s name and other related data that will be used in many document fragments.

Source parsing

The parsing of fragment source files to retrieve the metadata associated (the data fetcher, for example) and the context generation logic. Each plugin can implement in any way it sees fit, but usually the metadata should be a data structure and the context generation a function.

Metadata retrieval

Part of source parsing, in this stage the metadata associated with a fragment is retrieved, to be used in the context generation stage. This includes, most prominently, the data fetcher, but also other information (see documentation).

Context

Dictionary with the necessary information to “fill” the templates. This context is generated in the context generation stage and joined together to be used in the template rendering stage.

Context generation

Fragment generation stage that generates the context that will be used in the template rendering stage. This context can be generated with different plugins implementing different programming languages.

Data fetching

Fragment generation stage that retrieves the necessary data to perform the context generation. This data can be obtained from multiple sources, depending on the data fetcher plugin used.

Template

File defining how the document (or fragment) will look like, separating the logic generating the actual data. They are used in the template rendering stage, usually using a template language (e.g. jinja2).

Template rendering

Document generation stage that combines the templates with the context obtained from the context generation stage to create a document. This document might be further refined via postprocessing.

Postprocessing

Document generation stage that further processes the document generated by the template rendering stage. For example, a pdflatex postprocessing will compile a latex document into a PDF file.