Skip to content

Improved configuration #86

@mbloch

Description

@mbloch

I'd like to propose a new way of organizing configuration settings.

The current script uses JSON records exported from a spreadsheet for configuration. There are some limitations with this system: the comments (in the "notes" field) are hard to read; some of the fields only apply to a handful of settings; all the settings are duplicated between the default and NYT configurations; it's a tabular structure, so there's no good way to include nested objects like the list of fonts.

Here's a proposal for better configurability. Maintain a main configuration file containing all of the configurable default settings. The Times would then maintain an organization-specific set of override settings in a separate file. Other organizations would maintain their own files. There could be additional files with settings that are specific to different types of projects. The settings would be applied in a cascade.

Instead of the current array of JSON records, I'd like to consider switching to YAML, which allows for comments and nested objects.

Here's a link to a Gist showing one way that YAML config files might look:
https://gist.github.com/mbloch/c7f0db9d9d8c34efbbb33539c23ff037

The config settings could either be loaded at run time or baked into customized versions of the script as part of a build process.

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