I'm currently working on a new HTML preprocessor ST2 plugin using http://shpaml.webfactional.com/.
here's what I want to do:
When you edit a *.shpaml file (let's say test.html.shpaml) and save it, the preprocessor will kick in.
- it will copy the current view's content and use shpaml.convert_text() on it.
- the processed HTML will then be copied to a new file (test.html)
- this new file will be created in the same directory as the original shpaml file.
here's what I've been able to do until now:
I've been able to create my EventListener and override the on_post_save method to display a message in the console when I save a shpaml file.
I'm checking on the file extension to see if it ends with *.shpaml before showing the console message.
And this is where I'm stuck. I've read the API to see how I could get the view''s content but can't find anything useful. I've also looked at other plugins but can't find a good example.
current code: https://gist.github.com/3490d54d6d7f0837f241
anyone care to help a bit only for this part ?
thanks a bunch.