Sublime Forum

Build system question: open output file

#1

I have a build system question. I feel like this should be possible, but can’t quite wrap my head around how to make it happen.

I threw together a little build system to use pandoc to turn a markdown .txt file into an HTML snippet that I can paste into my blog CMS’s backend. This is it so far, though it might have a different Linux build step later, hence the “osx”:

[code] “selector”: “text.html.markdown”,

"osx": {
	"cmd": "pandoc", "$file", "-o", "$file_base_name.html"],
},

[/code]

What’s the correct way to have the build system run this command and then open $file_base_name.html in Sublime? Is there something I’m missing in the docs?

EDIT I ended up just writing a pandoc wrapper shell script that opened the output file in Sublime if I was generating HTML, but it seems like there’s probably a way for Sublime to do this that I was just missing.

0 Likes