Further modularization? #11353
Replies: 3 comments 2 replies
-
|
I'm all for making it possible to compile pandoc, or as much as possible of pandoc, to wasm. Someone already had success doing this: have you studied this? https://github.com/haskell-wasm/pandoc-wasm
Our current setup already separates all of the Lua functionality from the rest of pandoc, so that is covered. Stripping out HTTP support is more intrusive, since this is built into [EDIT: forgot we'd already discussed this a bit in #10387 .] |
Beta Was this translation helpful? Give feedback.
-
|
As for splitting off |
Beta Was this translation helpful? Give feedback.
-
|
On the other hand, a case could be made for creating a separate package for reading/writing docx, which defines docx-specific types and a parser and renderer for them. Pandoc could then use this package's API, but the package could also be used independently. This is the approach I've followed for some recent format additions: for djot and asciidoc, I created separate packages that each define an AST that is specific to the format; pandoc's readers just use these packages. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This question was triggered by three discussions that I had lately: in all three cases the subject were document conversions in the browser, and how to use pandoc components in a more modular fashion.
I'll use OJS as an example to illustrate the issue: most submissions happen in docx format, but having the document in HTML would be very convenient. Pandoc's docx converter is often "good enough" for this, so it would make sense to use that. However, shipping pandoc as part of OJS is not an option, as far as I've heard. It would be nice to have a small, specialized subset of pandoc, ideally compiled to wasm, so that it works in the browser.
One solution could be to pack selected readers and writers as separate packages, e.g.,
pandoc-docx-reader. The downside would be the increased maintenance burden that comes with more packages. We could write tools to make it easier, but still.There might also be a need for more interfaces to make pandoc easier to use with other software, but I don't have a clear grasp yet of what would be needed. Issue #6611 might be an example, but there's probably more.
I hope to have some time to work on this over the course of next year.
Roping in some people who might have more to say: @cscheid @frederik @ronste
Beta Was this translation helpful? Give feedback.
All reactions