improved ReadMe and new chapter detection pattern

This commit is contained in:
Tangent / Rose / Nebula Rosa 2024-11-07 18:38:14 -07:00
parent 9eb20662ce
commit d33dc72f12
2 changed files with 3 additions and 1 deletions

View File

@ -49,6 +49,7 @@ The following is shared:
- `base_file_name`: (Optional) String: Alternate final file name. (Default: "`title` by `author`" or just "`title`".) - `base_file_name`: (Optional) String: Alternate final file name. (Default: "`title` by `author`" or just "`title`".)
- `keywords`: Array of Strings: Keywords/Tags. (I'm not sure what the difference is in the final output so it goes in both.) - `keywords`: Array of Strings: Keywords/Tags. (I'm not sure what the difference is in the final output so it goes in both.)
- `sections`: **See "Book"/"Anthology" variations.** (I call LitErotica's stories sections - because they are often part of a larger whole.) - `sections`: **See "Book"/"Anthology" variations.** (I call LitErotica's stories sections - because they are often part of a larger whole.)
- `section_titles`: (Optional) Array of Strings: The titles to be used for Table of Contents / headings. (If `sections.naming` is specified, `section_titles` will be ignored.)
- `page_counts`: Array of Integers: The number of pages on LitErotica per "story". (I call them sections because this script was made to put together story series originally.) - `page_counts`: Array of Integers: The number of pages on LitErotica per "story". (I call them sections because this script was made to put together story series originally.)
#### Variation: Book #### Variation: Book
@ -82,7 +83,7 @@ Example:
#### Variation: Anthology #### Variation: Anthology
- `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. - `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. - `sections`: Array of Strings: A complete URL for each story.
- `section_titles`: (Optional) Array of Strings: The titles to be used for Table of Contents / headings. (Must be in the same order as `sections`.) - `section_titles`: (**Required**) Array of Strings: The titles to be used for Table of Contents / headings. (Must be in the same order as `sections`.)
Example: Example:
```json ```json

View File

@ -212,6 +212,7 @@ local function concatenate_pages(config)
local naming_patterns = { local naming_patterns = {
"^Prologue$", "^Prologue$",
"^Chapter %d+$", "^Chapter %d+$",
"^%*%*CHAPTER ",
} }
local line = page_file:read("*line") local line = page_file:read("*line")
while line do while line do