5

I am starting to use the Yesod web framework. I have some already existing template HTML code that I would like to automatically translate to a Hamlet code structure. Is there a way to do this?

sclv
  • 38,665
  • 7
  • 99
  • 204
Invoke
  • 215
  • 1
  • 10

1 Answers1

2

Here is a solution which might do most of the work

perl -pe 'chomp' test.html | xmllint --format --encode UTF-8 - | perl -pe 's#</[^>]+>##g'

from https://github.com/yesodweb/yesod/wiki/Hamlet

yogsototh
  • 14,371
  • 1
  • 22
  • 21