jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.54k stars 3.38k forks source link

Improve infrastructure for CLI options #10163

Open jgm opened 1 month ago

jgm commented 1 month ago

Adding a CLI option is now a somewhat complex process, involving changes in a number of separate places.

Some day it would be nice to create a slick system so everything can be in one place. I note that with --link-images, for example, not all of these things got done, and that might not be the only case.

jgm commented 1 month ago

For example, there is code in T.P.App.OutputSettings to set WriterOptions from Opts, and much of it is duplicated in pandoc-server.

jgm commented 1 month ago

Maybe pandoc-lua-engine could use generics to provide a compile-time check that it was marshalling all the fields of WriterOptions.