Currently we have a range of cli options but it would be useful if naming and approach was consistent.
The current options are:
| value type |
cli argument |
cli alias |
| boolean |
help |
h |
| boolean |
notitle |
T |
| boolean |
stdout |
s |
| boolean |
all |
a |
| boolean |
update-only |
u |
| boolean |
dryrun |
d |
| string |
title |
t |
| string |
maxlevel |
m |
| string |
minlevel |
n |
| string |
entryprefix |
|
Thinking about it would be nice to have hierachy to the settings as such I would propose we aim for something along the lines of the below proposal.
| file option |
value type |
cli argument |
cli alias |
comment |
|
boolean |
help |
h |
|
|
boolean |
stdout |
s |
|
|
boolean |
update-only |
u |
|
|
boolean |
dryrun |
d |
|
|
enum |
output-content |
o |
options of toc, complete (default) |
footnote.content |
string |
footnote-content |
- |
|
footnote.padding.after |
int |
footnote-padding-after |
- |
default 1 |
footnote.padding.before |
int |
content-padding-before |
- |
default 0 |
heading.anchor.position |
enum |
heading-anchor-position |
|
options of above, below, none (default) |
heading.level.max |
int |
heading-level-max |
maxlevel, m |
|
heading.level.min |
int |
heading-level-min |
minlevel, n |
default 1 |
toc.items.format |
string |
toc-items-format |
- |
options of ordered, unordered (default) |
toc.items.indentation.width |
int |
toc-items-indentation-width |
- |
default 2 |
toc.items.indentation.type |
enum |
toc-items-indentation-type |
- |
default space |
toc.items.min |
int |
toc-items-min |
mintocitems |
default 1 |
toc.items.padding.after |
int |
toc-items-padding-after |
- |
default 1 |
toc.items.padding.before |
int |
toc-items-padding-before |
- |
default 1 |
toc.items.source |
enum |
toc-items-source |
all |
options of all, after (default) |
toc.items.style |
string |
toc-items-style |
entryprefix |
only applies to unordered format |
toc.location |
enum |
toc-location |
- |
options of top (default), after |
toc.padding.after |
int |
toc-padding-after |
- |
default 1 |
toc.padding.before |
int |
toc-padding-before |
- |
default 1 |
toc.title.content |
string |
toc-title-content |
- |
|
toc.title.padding.after |
int |
toc-title-padding-after |
- |
default 0 |
toc.title.padding.before |
int |
toc-title-padding-before |
- |
default 0 |
toc.title.remove |
boolean |
toc-title-remove |
T, notitle |
default false |
The key thing is cli arguments & file properties should be able to be automatically mapped between one another.
The idea here would be that each word in the string settings corresponds to an object in a config file.
Aliases would not be used for settings which impacts the toc generated but rather limited to only the options impacting how it runs.
Currently we have a range of cli options but it would be useful if naming and approach was consistent.
The current options are:
helphnotitleTstdoutsallaupdate-onlyudryrundtitletmaxlevelmminlevelnentryprefixThinking about it would be nice to have hierachy to the settings as such I would propose we aim for something along the lines of the below proposal.
helpstdoutupdate-onlydryrunoutput-contenttoc,complete(default)footnote.contentfootnote-contentfootnote.padding.afterfootnote-padding-after1footnote.padding.beforecontent-padding-before0heading.anchor.positionheading-anchor-positionheading.level.maxheading-level-maxmaxlevel,mheading.level.minheading-level-minminlevel,n1toc.items.formattoc-items-formatordered,unordered(default)toc.items.indentation.widthtoc-items-indentation-width2toc.items.indentation.typetoc-items-indentation-typespacetoc.items.mintoc-items-minmintocitems1toc.items.padding.aftertoc-items-padding-after1toc.items.padding.beforetoc-items-padding-before1toc.items.sourcetoc-items-sourceallall,after(default)toc.items.styletoc-items-styleentryprefixunorderedformattoc.locationtoc-locationtop(default),aftertoc.padding.aftertoc-padding-after1toc.padding.beforetoc-padding-before1toc.title.contenttoc-title-contenttoc.title.padding.aftertoc-title-padding-after0toc.title.padding.beforetoc-title-padding-before0toc.title.removetoc-title-removeT,notitlefalseThe key thing is cli arguments & file properties should be able to be automatically mapped between one another.
The idea here would be that each word in the string settings corresponds to an object in a config file.
Aliases would not be used for settings which impacts the toc generated but rather limited to only the options impacting how it runs.