Added HTML output to the missing module.

This commit is contained in:
Adam Waldenberg 2013-03-14 00:47:40 +01:00
parent e4cf02afa2
commit 13b11f4961
2 changed files with 14 additions and 0 deletions

View File

@ -69,6 +69,9 @@
width: 40%;
font-size: x-small;
}}
p.error {{
color: #700;
}}
</style>
</head>
<body>

View File

@ -45,6 +45,17 @@ __missing_info_text__ = ("The following files were missing in the repository and
"either checkout manually using git or use the -c option in gitinspector")
class Missing(Outputable):
def output_html(self):
if __missing_files__:
missing_xml = "<div><div class=\"box\">"
missing_xml += "<p>" + __missing_info_text__ + ".</p>"
for missing in __missing_files__:
missing_xml += "<p class=\"error\">" + missing + "</p>"
missing_xml += "</div></div>"
print(missing_xml)
def output_text(self):
if __missing_files__:
print("\n" + textwrap.fill(__missing_info_text__ + ":", width=terminal.get_size()[0]))