You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes I'd like to change a bit the behavior of a filter/writer of mine just changing some of the command line options of pandoc. In other words, I'd like to pass arguments to filters via the pandoc CLI.
These are the ways I know to pass parameters to filters/readers/writers:
environment variables, that can be accessed through pandoc.system.environment() in lua;
the only problem is that they must be set before you call pandoc;
meta values with -M KEY[=VAL] or --metadata=KEY[:VAL] syntax on the command line;
you may abuse that option to pass parameters to filters, but you must remove those meta values
from the output doc's meta if that is their only goal;
variables with -V KEY[=VAL] or --variable=KEY[:VAL], but they are meant for templates;
(custom extensions names as a way to pass boolean values?)
Environment variables are the best fit, but I'd like an option like -V/--variable for lua filters/readers/writers.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Sometimes I'd like to change a bit the behavior of a filter/writer of mine just changing some of the command line options of pandoc. In other words, I'd like to pass arguments to filters via the pandoc CLI.
These are the ways I know to pass parameters to filters/readers/writers:
environment variables, that can be accessed through
pandoc.system.environment()
in lua;the only problem is that they must be set before you call pandoc;
meta values with
-M KEY[=VAL]
or--metadata=KEY[:VAL]
syntax on the command line;you may abuse that option to pass parameters to filters, but you must remove those meta values
from the output doc's meta if that is their only goal;
variables with
-V KEY[=VAL]
or--variable=KEY[:VAL]
, but they are meant for templates;(custom extensions names as a way to pass boolean values?)
Environment variables are the best fit, but I'd like an option like
-V
/--variable
for lua filters/readers/writers.Beta Was this translation helpful? Give feedback.
All reactions