Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: SublimeText2 Plugin #1

Open
jimthedev opened this issue May 7, 2013 · 5 comments
Open

Feature: SublimeText2 Plugin #1

jimthedev opened this issue May 7, 2013 · 5 comments

Comments

@jimthedev
Copy link

The only thing that could make Emogrify more awesome is if there was a ST2 plugin for it. Probably will be a fork / separate project, but until then, figure I'd throw it out there to see what others think.

@jimbojsb
Copy link
Owner

jimbojsb commented May 7, 2013

Yeah it'd have to be ported to python

@jimthedev
Copy link
Author

Yes. Or it would require PHP5 as a prerequisite like this does: https://github.com/welovewordpress/SublimeHtmlTidy

I have a command line php script that can parse simple arguments and returns the resultant html to stdout. All the python plugin would need to do is start a new php process and put the result from stdout to a new sublime tab.

@jimthedev
Copy link
Author

Here is the gist that shows how it could be done. Obviously you need to have emogrifier.php in the same directory and need to point it at your html and css files (Currently only works in the same directory, needs modification).

Command to output to stdout is: php emo.php index.html style.css
Command to output to file is: php emo.php index.html style.css index-inline.html

@jimthedev
Copy link
Author

https://gist.github.com/jcummins/5534547

The gist of my ~/.emo/aliases file. If you load this file in your .profile or bashrc then you can use the global command: emo index.html style.css

@jimthedev
Copy link
Author

Additionally, you can do:
brew install browser

Then do:
emo index.html style.css | browser

This will pipe the html directly into the browser for viewing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants