Support customized export command
fyuniv opened this issue · 8 comments
Is it possible to add a feature for customized exporting like Typora? Since Pandoc support default.yaml, this feature will make exporting more powerful. Thank you!
What exactly do you want to customize that you currently cannot? Have you read the README?
What exactly do you want to customize that you currently cannot? Have you read the README?
My bad, I didn't know that the defaults.yml will be automatically handled by Panwriter. Now I feel much better to recommend it to others.
Other things that I was thinking about is to run some simple commands, such as, git commit, or hugo, in Panwriter. Can this feature be added in future versions? Thank you!
run some simple commands, such as, git commit, or hugo, in Panwriter
hm.. I was thinking of keeping PanWriter focused on the writing experience and calling pandoc... but if enough people are interested in this, could think of a way to add it that doesn't bloat the code and the GUI too much...
run some simple commands, such as, git commit, or hugo, in Panwriter
hm.. I was thinking of keeping PanWriter focused on the writing experience and calling pandoc... but if enough people are interested in this, could think of a way to add it that doesn't bloat the code and the GUI too much...
Thank you in advance! The reason I asked for customized commands is to make the editor self-contained for creating and publishing webpages or slides. It will help new users of markdown to get work done without running command in command line or using another App.
We could read out a special key from the document's YAML metadata, which would override the default export command, which is currently simply pandoc
, so you could do:
---
export: './run.sh'
---
# my markdown doc
but it would then be up to the run.sh
to handle all the same arguments pandoc accepts (potentially passing them on to pandoc).
Also not sure of the security implications of this... users could be easily tricked into opening a malicious document in PanWriter, clicking file -> export, and having arbitrary code executed on their system, we probably would have to put a warning dialog up once per document (and also show that when using a pandoc filters or a custom writer).
Hey any news on this feature or any related PR ? If I have some time, I may try to land a PR in after the month of May, anyone willing to help me with that ?
No code written yet, but discussion or even PRs welcome! So far I've been mostly waiting on feedback on whether the proposal in my last comment here would satisfy users' needs...
On my end it would satisfy me as long as I can use a custom template, although I would probably work on panwriter's preview feature to try and support custom pandoc templates too but I hvae no idea how hard or even if that is currently doable, I'm not familiar with the tech stack used by panwriter to preview markdown.