Better handling of missing files #3

Closed
opened 2020-02-05 11:23:13 +00:00 by liska · 0 comments
Owner

Currently several cases of missing files will simply trigger exceptions. I assume that some errors in the configuration will even trigger unexpected exceptions. The following behaviour should be implemented:

  • config.yml
    Enforce reasonable defaults
  • defaults.yml
    This should only cause an exception if the template actually contains replacement fields. In addition the replacement fields should be tested for defaults. Each field must have a default value in the configuration (also because these defaults are used to control the actual replacement process
  • outline.yml
    If this file is missing we should infer the outline from the books directory:
    • Use the directories as subbooks in alphabetical order.
    • if a main directory is present treat it as the main book.
Currently several cases of missing files will simply trigger exceptions. I assume that some errors in the configuration will even trigger unexpected exceptions. The following behaviour should be implemented: * [x] `config.yml` Enforce reasonable defaults * [ ] `defaults.yml` This should only cause an exception if the template actually contains replacement fields. In addition the replacement fields should be tested for defaults. Each field must have a default value in the configuration (also because these defaults are used to control the actual replacement process * [ ] `outline.yml` If this file is missing we should infer the outline from the `books` directory: - Use the directories as subbooks in alphabetical order. - if a `main` directory is present treat it as the main book.
liska self-assigned this 2020-02-05 11:23:13 +00:00
liska 2020-02-05 11:23:13 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: GLAREAN-Doku/glarean-books#3
No description provided.