Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing cli options in lua filter #5221

Closed
hason opened this issue Jan 13, 2019 · 2 comments · Fixed by #7784
Closed

Missing cli options in lua filter #5221

hason opened this issue Jan 13, 2019 · 2 comments · Fixed by #7784

Comments

@hason
Copy link

hason commented Jan 13, 2019

I want to react to certain options (e.g. --top-level-division) in Lua filter. What about create a global variable PANDOC_OPTIONS for all options or PANDOC_WRITER_OPTIONS for options which were provided to the writer?

@tarleb
Copy link
Collaborator

tarleb commented Jan 13, 2019

Making writer options available to filters could be useful. We should probably do this for JSON filters as well as for Lua filters. JSON filters should be kept as powerful as Lua filters when possible.

@jgm
Copy link
Owner

jgm commented Jan 18, 2019

If we do this, should we provide the raw argv strings or rather a structured Opt?

Note that Text.App.Opt.Opt provides Generic and ToJSON instances.

tarleb added a commit to tarleb/pandoc that referenced this issue Dec 30, 2021
tarleb added a commit to tarleb/pandoc that referenced this issue Dec 30, 2021
tarleb added a commit to tarleb/pandoc that referenced this issue Dec 30, 2021
tarleb added a commit to tarleb/pandoc that referenced this issue Dec 30, 2021
tarleb added a commit to tarleb/pandoc that referenced this issue Dec 31, 2021
tarleb added a commit to tarleb/pandoc that referenced this issue Dec 31, 2021
tarleb added a commit to tarleb/pandoc that referenced this issue Dec 31, 2021
tarleb added a commit to tarleb/pandoc that referenced this issue Jan 1, 2022
API changes:

- The function T.P.Filter.applyFilters now takes a filter
  environment of type `Environment`, instead of a ReaderOptions value.
  The `Environment` type is exported from `T.P.Filter` and allows to
  combine ReaderOptions and WriterOptions in a single value.

- Global, exported from T.P.Lua, has a new type constructor
  `PANDOC_WRITER_OPTIONS`.

Closes: jgm#5221
tarleb added a commit to tarleb/pandoc that referenced this issue Jan 1, 2022
API changes:

- The function T.P.Filter.applyFilters now takes a filter
  environment of type `Environment`, instead of a ReaderOptions value.
  The `Environment` type is exported from `T.P.Filter` and allows to
  combine ReaderOptions and WriterOptions in a single value.

- Global, exported from T.P.Lua, has a new type constructor
  `PANDOC_WRITER_OPTIONS`.

Closes: jgm#5221
tarleb added a commit to tarleb/pandoc that referenced this issue Jan 1, 2022
API changes:

- The function T.P.Filter.applyFilters now takes a filter
  environment of type `Environment`, instead of a ReaderOptions value.
  The `Environment` type is exported from `T.P.Filter` and allows to
  combine ReaderOptions and WriterOptions in a single value.

- Global, exported from T.P.Lua, has a new type constructor
  `PANDOC_WRITER_OPTIONS`.

Closes: jgm#5221
@jgm jgm closed this as completed in #7784 Jan 1, 2022
jgm pushed a commit that referenced this issue Jan 1, 2022
API changes:

- The function T.P.Filter.applyFilters now takes a filter
  environment of type `Environment`, instead of a ReaderOptions value.
  The `Environment` type is exported from `T.P.Filter` and allows to
  combine ReaderOptions and WriterOptions in a single value.

- Global, exported from T.P.Lua, has a new type constructor
  `PANDOC_WRITER_OPTIONS`.

Closes: #5221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants