How do I combine these two shell commands into a Service?
What about an Automator service like this one:
The payload is the shell script
for f in "$@"
do
pandoc "$f" --css=markdown.css | prince - "$f".pdf
done
Whatever the selected file or files, the service runs them through pandoc
's Markdown parser, then takes the resulting html and processes it with prince
, naming the output the original file name with a .pdf extension added.
The piping removes the need for you to manage temporary files.