Skip to content

Allow custom file/directory locations #20

@dannyadair

Description

@dannyadair

At the moment there are some naming conventions:

The YAML settings documents, pages, images and templates have to be called exactly that, so does variants.
So do special settings like compress_pdf and svg2pdf_backend.
That is all fine and we don't have to go meta on it.

Technically configurable but in my opinion also ok to prescribe:

  • style and theme have to be called exactly that
  • highlight_color has to be called exactly that (and the tag it replaces has to be <highlight>)
  • bake.py has to be called exactly that, and has to define a process_document() function taking a PDFBakerDocument

However:

  • documents are just names, and for each document a directory has to exist by that name
  • config.yml must be the filename of the document configuration - it must exist in that directory
  • pages are just names, and for each page there has to be a .yml file inside pages/
  • images are file names, and for each image a corresponding file has to be inside images/
  • templates are file names, and for each template a corresponding file has to be inside images/
  • the build directory is always build on the same level as the main config file
  • the dist directory is always dist on the same level as the main config file

(I may have overlooked other naming conventions.)

That's a little bit restrictive and black magic - some of these files might already exist in other locations and shouldn't have to move.

Therefore:

  • For every document, allow to split so it has a "name", "file" and/or "config_file" - the latter two being relative or absolute paths (but "relative" to the main config file).
  • For every page, allow to split up so it has a "name" and a "file" (again relative/absolute path to the config file)
  • For every image, allow to split up - that's already possible for providing "type" - so it also has a "file" (again relative/absolute path to the image file)
  • For every template, allow to split up so it has a "name" and a "file" (again relative/absolute path to the template file)
  • Allow the configuration of the build directory in the main configuration file (name or path)
  • Allow the configuration of the dist directory in the main configuration file (name or path)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions