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.
-
Clone the repository.
-
Install hpack tool unless it's already installed.
> cabal install hpack
-
Change to the directory of the repository.
-
Run
> hpack > cabal install
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