OpenTechStrategies / SimpleBook

A fork of the Collection Extension to print books from MediaWiki instances
1 stars 1 forks source link

Allow style configuration #56

Open slifty opened 3 years ago

slifty commented 3 years ago

I would like to propose an improvement to the mw2pdf API which allows for style configuration.

Below is a proposed spec and implementation plan:

Specification

The command will take in an optional --styleConfigPath paramter, which will accept a file path pointing to a json file containing style data. That content will be loaded and validated to ensure it is the proper type.

The config can specify custom style information for the following:

  1. The "title page" (title layout + style, subtitle layout + style, logo image layout)
  2. The table of contents (title, ToC fonts; no layoud style modifications)
  3. The page numbers (just the font; I don't think we will allow configurable location for this phase.)

Note that there is no concept of logo image yet, and that will be a separate issue, but I'm including a reference in this issue because ultimately that needs to be configurable as well.

Implementation