more complete examples

This commit is contained in:
Tangent / Rose / Nebula Rosa 2024-11-06 17:11:15 -07:00
parent d58f161e9e
commit eeffe27258
2 changed files with 9 additions and 7 deletions

View File

@ -45,7 +45,8 @@ Example:
"sections": { "sections": {
"start": 1, "start": 1,
"finish": 4, "finish": 4,
"naming": "Chapter" "naming": "Chapter",
"automatic_naming": true
}, },
"page_counts": [1, 5, 3, 3] "page_counts": [1, 5, 3, 3]
} }

View File

@ -29,7 +29,8 @@ Configuration example(s):
"sections": { "sections": {
"start": 1, "start": 1,
"finish": 4, "finish": 4,
"naming": "Chapter" "naming": "Chapter",
"automatic_naming": true
}, },
"page_counts": [1, 5, 3, 3] "page_counts": [1, 5, 3, 3]
} }
@ -94,17 +95,17 @@ local function get_config()
-- print("config done") -- print("config done")
if not config.authors then if not config.authors then
config.authors = {} -- at least have an empty table so it doesn't error below config.authors = {} -- at least have an empty table so it doesn't error below TODO verify that this is actually true
end
if config.author then -- old style single author will be prepended to authors list
table.insert(config.authors, 1, config.author)
end end
if not config.keywords then if not config.keywords then
config.keywords = {} -- TODO test if it will work empty config.keywords = {} -- TODO test if it will work empty
end end
if config.author then -- old style single author will be prepended to authors list
table.insert(config.authors, 1, config.author)
end
-- detecting manually specified sections and flagging it to the rest of the script -- detecting manually specified sections and flagging it to the rest of the script
if config.sections[1] then if config.sections[1] then
config.sections.start = 1 config.sections.start = 1