flake8-html
flake8-html copied to clipboard
#22 add option to generate one-page report
Summary: https://github.com/lordmauve/flake8-html/issues/22
Approach:
-
added
--self-contained-html
option as a marker to understand whether need to write one or multiple HTML files -
back.svg
andfile.svg
files passes as Data URLs to one-page report -
report and source HTML files will be in the same one-page report. Navigation is done in
self-contained.js
by hiding elements withpage
classes. -
redesigned Jinja's templates:
-
base.html
is a base for every template (index, reports, sources) -
index.html
now has additional logic based onself_contained
marker -
file-report.html
andannotated-source.html
are used for usual reports without--self-contained-html
option -
file-report-content.html
andannotated-source-content.html
are used both for usual and one-page report. Usual report uses them as template to fill, one-page report uses them to fillindex.html
template -
bind-handler.js
contains JS script fromfile-report.html
in order to reuse it in different template