Build automatization in Atom


Example: Convert foo.rst to foo.pdf by using pandoc.

Usually, I run “pandoc -o foo.pdf foo.rst” in a shell if I just updated foo.rst in Atom. Now, I am interested to know how to add a user-defined command to Atom’s command palette which acts like a function doing that for me. That requires path and file name of the open Atom tab.

First, how am I able to read path and file name and pass it to such a function? Second, my first shot would be writing the function in python using subprocess but there might be more direct alternatives?

Thank you.


See the FAQ:


Damn, I should have seen that before. Thank you!