html-normalize
Beautifier for html( embedding js and css ) use js-beautify and PyTidyLib
Why? can't Beautifier html files by js-beautify(python).
Introduction
To clean html files.
- clean comments in html files.
- use PyTidyLib to clean html structures.
- extract javascript from html files, and then use js-beautify to beautifier it.
- output the file.
Install
jsbeautify
pip install jsbeautifier
PyTidyLib
pip install pytidylib
for windows copy the libtidy.dll to python27/Scripts
Bugs
Issuing me if there are any questions.
Ref
js-beautify: https://github.com/beautify-web/js-beautify PyTidyLib: http://pythonhosted.org/pytidylib/#function-reference