miso-from-html
===================
![Hackage](https://img.shields.io/hackage/v/miso-from-html.svg)
![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg)
[![BSD3 LICENSE](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/dmjio/miso-from-html/blob/master/miso-from-html/LICENSE)
[![Build Status](https://travis-ci.org/dmjio/miso-from-html.svg?branch=master)](https://travis-ci.org/dmjio/miso-from-html)
Convert HTML into [miso](https://github.com/dmjio/miso) `View` syntax.
[![asciicast](https://asciinema.org/a/MHZ5r4muWitBshkXhjtLHUBQQ.png)](https://asciinema.org/a/MHZ5r4muWitBshkXhjtLHUBQQ)
### Features
- Strips comments
- Pretty prints style tags as a Haskell `Map` from `Data.Map`
### Usage
Given some HTML
```html
```
Convert it to [miso](https://github.com/dmjio/miso) `View` syntax.
```bash
$ cabal run miso-from-html < index.html
```
Result
```haskell
nav_
[ class_ "navbar"
, role_ "navigation"
]
[ div_ [ class_ "navbar-brand" ]
[ a_
[ class_ "navbar-item"
, href_ "https://bulma.io"
]
[ img_
[ src_ "https://bulma.io/images/bulma-logo.png"
, width_ "112"
, height_ "28"
]
, a_ []
[ "ok"
, p_ [][ "hey" ]
]
]
]
]
```
### Test
```bash
$ nix-shell --run 'runghc Main.hs < index.html'
```