Generate PDF (using pandoc and LaTeX)

Hi!
I use a self-developed set of LaTeX and Pandoc templates to generate PDF documents from MD using Pandoc. The document configuration goes into MD document yaml header. This way all I need to generate a PDF from my markdown document is to run single command.

I’ve just installed latest NC on my RaspberryPi3 (using NextCloudPi) and would like to integrate my document workflow into NC.
Is this possible to add a button or keyboard shortcut to the markdown editor app (or even just context menu to NC’s file browser) which will just run the Pandoc command on the current file using Pandoc installed on my Raspbian?
I spend few hours looking for ways of implementing that but seems that accessing shell from NC is not possible.
Could you suggest the simplest solution (I have some programming skills)? I use my NC for internal purposes only.

EDIT: Would it be any easier if I had a local Pandoc server running on my RPi so that I could pack the md file and other resources into tar and run equivalent to:

curl -X POST \
-F "tar=@your-template.tgz" \
-F "tpl=mytemplate.tex" \
-F "m=@my-markdown-content.md" > out.pdf

Thanks!

So finally I developed my own Pandoc interface.
I used Checksum plugin and changed it so that instead of generatig checksum it converts file formats.
I am not a web developer so this is as minimalistic as possible, just to work on my internal server.
I published it here https://github.com/mstankie/nextcloud-pandoc, in case someone may need similar system, but this in just for internal use on own risk.

There is flow for make pdf but I think it work only with LibO so I will test your solution. Thanks

Hope it will work, but it may be a bit rusty now. -Haven’t used it for quite long. M

niedz., 13 wrz 2020, 17:05 użytkownik Andreas K via Nextcloud community <noreply@nextcloud.com> napisał: