EDIT: For the latest working script and examples of converted files scroll to my latest posts.
I have a bash script which converts MD to PDF using pandoc. I also automated it for Path Finder using AppleScript and Keyboard Maestro. But I want to do it right in Devonthink. I’ve seen the script in DTPO, converting files to PDF, but don’t know how to make it work with the shell script I have. Here it is:
$ export PATH=/Library/TeX/texbin:$PATH $ /usr/local/bin/pandoc "Path to MD file" -s -o "Path for output PDF file" --pdf-engine=xelatex --toc
I’ve uploaded my KM macro, if anyone would like to play with it. You can make it work from Finder or other app. But you need to install pandoc and TeX.
Markdown to PDF.kmmacros.zip (1.6 KB)
So, I’d appreciate if anyone could help me make this shell script work with the AppleScript we have for converting to PDF in Devonthink