0.0
No commit activity in last 3 years
No release in over 3 years
This app takes in html and erb code and turns it into haml. It supports script and style tags and html comments as well.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

HTML-to-HAML Travis CI

Conversion tool for turning html and html.erb files into haml.

This code is currently being used as part of a web html-to-haml conversion tool here. Its main purpose is to provide the backend code for that tool, so that the UI and Business logic are completely separate.

Usage

Add the following line to your gemfile.

gem 'html-to-haml'

Once you have run bundle install, you will need to require 'html_to_haml/converter.rb' wherever you intend to use the converter.

Call HtmlToHaml::Converter.new(File.read('path/to/file.html.erb').convert and get the text for a converted haml file.

Examples

This gem is currently being used as part of this html to haml web converter. You can see the code for the web interface here

Travis CI

https://travis-ci.org/NatashaHull/html-to-haml

License


This repository uses the MIT Licencse. Copyright (c) [2016] [Natasha Hull-Richter]