close #29 different file name option

This commit is contained in:
Tangent / Rose / Nebula Rosa 2024-11-06 17:17:58 -07:00
parent eeffe27258
commit e9a155cf04
2 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,7 @@ The JSON config spec has two major variations ("Book" and "Anthology").
The following is shared: The following is shared:
- `authors`: (Optional) Array of Strings: Author names. First in the list is used as a byline in the final output. (Legacy: An `author` string works as well. If this exists, it will be first.) - `authors`: (Optional) Array of Strings: Author names. First in the list is used as a byline in the final output. (Legacy: An `author` string works as well. If this exists, it will be first.)
- `title`: (Optional) String: Title of book. - `title`: (Optional) String: Title of book.
- `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.)
- `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.)
@ -39,6 +40,7 @@ Example:
{ {
"authors": ["Name"], "authors": ["Name"],
"title": "Book", "title": "Book",
"base_file_name": "Book",
"keywords": ["erotica", "fantasy"], "keywords": ["erotica", "fantasy"],
"base_url": "https://www.literotica.com/s/title-ch-", "base_url": "https://www.literotica.com/s/title-ch-",
"first_section_url": "https://www.literotica.com/s/title", "first_section_url": "https://www.literotica.com/s/title",

View File

@ -23,6 +23,7 @@ Configuration example(s):
{ {
"authors": ["Name"], "authors": ["Name"],
"title": "Book", "title": "Book",
"base_file_name": "Book",
"keywords": ["erotica", "fantasy"], "keywords": ["erotica", "fantasy"],
"base_url": "https://www.literotica.com/s/title-ch-", "base_url": "https://www.literotica.com/s/title-ch-",
"first_section_url": "https://www.literotica.com/s/title", "first_section_url": "https://www.literotica.com/s/title",
@ -269,7 +270,7 @@ local function get_base_file_name(config)
base_file_name = "Book" base_file_name = "Book"
end end
return make_safe_file_name(base_file_name) return make_safe_file_name(config.base_file_name or base_file_name)
end end
-- NOTE deprecated (order of operations had to be changed, see #25) -- NOTE deprecated (order of operations had to be changed, see #25)