Convert HTML Snippets to Haml
CSS Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.bundle update to enable utf 8 encoding Jun 2, 2011
log updated ruby gem Aug 16, 2014
public upgraded to html2haml gem Sep 9, 2012
spec updating tests to include attribute option Aug 12, 2014
views updated site to parse using 19 attributes Sep 16, 2013
.gitignore rm .DS_Store Sep 9, 2012
.rspec
.rvmrc Updated with secure location to gem cutter to avoid warning and relax… May 12, 2013
CHANGELOG removed xhtml parsing dependency Feb 10, 2013
Gemfile updated ruby gem Aug 16, 2014
Gemfile.lock updated ruby gem Aug 16, 2014
LICENSE
Procfile
README.md Update README.md Sep 16, 2013
Rakefile fixed tests and now added a new url feature Dec 4, 2010
config.ru
server.rb adds the ability to pash options to the api Aug 12, 2014

README.md

html2haml.heroku.com

html2haml is a sinatra web application that allows you to convert html 2 haml.

It is currently using haml 4.0.0! and html2haml 2.0.0.beta

Features

  • html text to haml text

    Copy your html in the html text area and click on convert and html2haml will convert it to haml in the text box below.

  • url to haml

    Enter a url to a web site and click submit html2haml will download the page and convert it to haml in the haml text area below

  • Now you can use json to do your conversions

    Post:

      {'page': { 'html': '<h1>Hello World</h1>' }}
    

    and receive:

      {'page': { 'html': '<h1>Hello World</h1>', 'haml': '%h1 Hello World' }}
    

Requirements for Development

  • Ruby 1.9.3
  • Bundler

Development

git clone git://github.com/twilson63/html2haml.git

bundle install

# run tests
rake

# run application
rackup

# open browser to http://localhost:9292

Having problems

Please post an issue in the issues

How to contribute

Interested in adding a new feature to the application? Awesome!

  • First clone the repository
  • Write a test for your feature in the spec folder using rspec
  • Write your new feature
  • Once your code is passing and re-factored send a pull request

LICENSE

The MIT License

Copyright (c) 2008 Jack Russell Software Company

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.