rashadg1030 / lucid-from-html

Generate Lucid code from html page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository hosts the code to the lucid-from-html tool, derived from @dbaynard.

Please report any issues (including examples of html files that don’t parse correctly) at the issue tracker.

Install using cabal

  1. Clone the repository.

  2. Install hpack tool unless it's already installed.

    > cabal install hpack
    
  3. Change to the directory of the repository.

  4. Run

    > hpack
    > cabal install
    

Usage

To convert filename.html to lucid text, run

> lucid-from-html -t -s filename.html > filename.hs

The options here:

  • -t   do not trim whitespace characters from the ends of the strings
  • -s   create a standalone code, ready to compile

To see all options, run

> lucid-from-html --help

If you successfully got filename.hs you can generate html back again by

> runhaskell filename.hs > filename-out.html

About

Generate Lucid code from html page

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 95.7%Language:HTML 3.0%Language:Shell 1.3%