Run external application on markdown source in ikiwiki
Posted
by
student
on Pro Webmasters
See other posts from Pro Webmasters
or by student
Published on 2012-01-22T12:08:41Z
Indexed on
2012/03/21
17:39 UTC
Read the original article
Hit count: 231
Can I add a button to each wiki page in ikiwiki which launches an external application (on the client side) or script with the markdown code of the current page as input?
Edit: I didn't realize that it might be complicated to do it on client side as Zenklys' answer suggested. So perhaps I should describe more concretely what I have in mind:
I want to have two buttons:
- "Get LaTeX" and 2. "Get pdf".
Clicking on "Get LaTeX should generate a LaTeX file and the browser should simply open or download that file. Analogously for the pdf.
It would even be ok, to have a button "Generate LaTeX" instead, which generates the LaTeX code and changes after the generation to "Get LaTeX" which simply points to the LaTeX file.
So it is not really necessary to do the generation of the files on client side. Would be ok, if this is done (on a temporary folder) on server side.
For the LaTeX resp. pdf generation I want to use a custom wrapper script for pandoc, let's call it mymarkdown2latex resp. mymarkdown2pdf.
© Pro Webmasters or respective owner