http://pygmentize.herokuapp.com is an HTTP API for the syntax highligher Pygments.
- Runs on Heroku (Cedar)
- Uses pygments version 1.4
- Uses PIP to manage dependencies (as per the Heroku Python Tutorial)
Issue a HTTP POST
request to the service running at http://pygmentize.herokuapp.com
**POST**: http://pygmentize.herokuapp.com
PARAMS {:lang => "html", :code => "<h1>Hello World</h1>"}
The response body will contain the pygmentized HTML.
curl --data "lang=html&code=<h1>Hello World</h1>" http://pygmentize.herokuapp.com
require 'net/http'
require 'uri'
lang = 'python'
code = 'print "Hello World"'
request = Net::HTTP.post_form(URI.parse('http://pygmentize.herokuapp.com'), {'lang'=>lang, 'code'=>code})
puts request.body
easy_install pip
pip install virtualenv
git@github.com:rumblelabs/pygments-heroku.git
cd heroku-pygments
virtualenv --no-site-packages .
source bin/activate
bin/pip install -r requirements.txt
python app.py
heroku create my-pygments-app --stack cedar
git push heroku
heroku open
Inspired by trevorturk/pygments.
MIT License. Copyright 2011 Rumble Labs Ltd. rumblelabs.com