mirror of
https://github.com/TangentFoxy/.lua-files.git
synced 2025-01-15 15:34:20 +00:00
automatic_naming more usable
This commit is contained in:
parent
82cfb9ecc7
commit
6a8f8e4c74
@ -96,6 +96,7 @@ Example:
|
||||
- `manually_specified_sections`: (Optional) Boolean, must be `true`. Technically not required as the script is capable of figuring out you are using this variation, but *should be* included.
|
||||
- `sections`: Array of Strings: A complete URL for each story.
|
||||
- `section_titles`: (**Required**) Array of Strings: The titles to be used for Table of Contents / headings. (Must be in the same order as `sections`.)
|
||||
- `automatic_naming`: (Optional) Boolean: Will match a single line against common patterns denoting the beginning of a chapter and add a heading on such lines. It's the same as `sections.automatic_naming` above.
|
||||
|
||||
Example:
|
||||
```json
|
||||
|
@ -89,6 +89,10 @@ local function load_config(config_file_text)
|
||||
config.sections = {} -- I've decided to allow empty sections (defaults to 1 section, for single story ebooks)
|
||||
end
|
||||
|
||||
if config.automatic_naming then
|
||||
config.sections.automatic_naming = true
|
||||
end
|
||||
|
||||
-- detecting manually specified sections and flagging it to the rest of the script
|
||||
if config.sections[1] then
|
||||
config.sections.start = 1
|
||||
|
Loading…
Reference in New Issue
Block a user