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

Consider Pandoc #9

Open
matt-dray opened this issue Jul 11, 2023 · 0 comments
Open

Consider Pandoc #9

matt-dray opened this issue Jul 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@matt-dray
Copy link
Owner

matt-dray commented Jul 11, 2023

Of course, we could just go from docx to md using Pandoc. You can do that in R like:

rmarkdown::pandoc_convert(
  docx_path,
  to = "markdown",
  output = "output.md", 
  options = c("--extract-media=.")  # pull images out (but not charts?)
)

But Pandoc doesn't support Govspeak directly.

We want more control over bespoke stuff like table formatting and anchor links for images (#8), for example. We also might want to warn users (#7) when they use inappropriate markup (e.g. italics shouldn't be used). Govspeak is quite simple, so converting the unzipped docx to an md with our limited markup requirements shouldn't be too tedious.

@matt-dray matt-dray added the enhancement New feature or request label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant