Skip to content

Settings

Settings provide a way to customize SeReTo according to your needs.

The location where the configuration file is stored is determined by using click.get_app_dir function, to provide the most appropriate location for the specific operating system. For example, on Linux, the configuration file is stored in ~/.config/sereto/settings.json and on Windows, it is likely stored in C:\Users\<username>\AppData\Local\sereto\settings.json.

Settings consist of the following fields:

projects_path

The path to the directory where the projects are located.

templates_path

The path to the directory where the templates are located.

render

Defines recipes and tools which are used when rendering the TeX files or converting between different formats (e.g. from Markdown to TeX).

The render field consists of the following:

report_recipes

List of RenderRecipes, which define the tools used to render a report.

Example:

{
    "name": "default-report",
    "tools": [
        "latexmk"
    ]
}
RenderRecipe(
    name="default-report",
    tools=[
        "latexmk"
    ]
)

finding_recipes

List of RenderRecipes, which define the tools used to render a finding.

Example:

{
    "name": "default-finding",
    "tools": [
        "latexmk-finding"
    ]
}
RenderRecipe(
    name="default-finding",
    tools=[
        "latexmk-finding"
    ]
)

sow_recipes

List of RenderRecipes, which define the tools used to render a statement-of-work.

Example:

{
    "name": "default-sow",
    "tools": [
        "latexmk"
    ]
}
RenderRecipe(
    name="default-sow",
    tools=[
        "latexmk"
    ]
)

target_recipes

List of RenderRecipes, which define the tools used to render a target.

Example:

{
    "name": "default-target",
    "tools": [
        "latexmk-target"
    ]
}
RenderRecipe(
    name="default-target",
    tools=[
        "latexmk-target"
    ]
)

convert_recipes

List of ConvertRecipes, which define the tools used to convert between different formats.

Example:

{
    "name": "convert-md",
    "input_format": "md",
    "output_format": "tex",
    "tools": [
        "pandoc-md"
    ]
}
ConvertRecipe(
    name="convert-md",
    input_format=FileFormat.md,
    output_format=FileFormat.tex,
    tools=[
        "pandoc-md"
    ]
)

tools

List of RenderTools, which are the commands with their parameters. Tools are referenced in recipes by their name.

The following variables are always available and will be automatically substituted for their value before running the command:

  • %DOC%: path to the current file without the extension
  • %DOC_EXT%: path to the current file with the extension
  • %DOCFILE%: filename without extension
  • %DOCFILE_EXT%: filename with extensions
  • %DIR%: path to the directory, where the current file is located
  • %TEMPLATES%: path to the directory, where the templates are located

Example:

{
    "name": "latexmk",
    "command": "latexmk",
    "args": [
        "-xelatex",
        "-interaction=batchmode",
        "-halt-on-error",
        "--shell-escape",
        "%DOC%"
    ]
}
RenderTool(
    name="latexmk",
    command="latexmk",
    args=[
        "-xelatex",
        "-interaction=batchmode",
        "-halt-on-error",
        "--shell-escape",
        "%DOC%"
    ]
)

categories

A list of categories that can be used to group findings.