summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2008-09-26 03:17:42 +0530
committerMart Raudsepp <leio@gentoo.org>2008-09-26 01:05:03 +0300
commita71be0e82f91bc0444935be8a2b4852e0089b30d (patch)
tree374540993e3628a13efc2f97bc22a5a3f168f904
parentSimplify Package.parse_mm() method by making use of builtin string methods (diff)
downloadgentoo-bumpchecker-a71be0e82f91bc0444935be8a2b4852e0089b30d.tar.gz
gentoo-bumpchecker-a71be0e82f91bc0444935be8a2b4852e0089b30d.tar.bz2
gentoo-bumpchecker-a71be0e82f91bc0444935be8a2b4852e0089b30d.zip
"Beautify" the html output page
Use pastel colors, pretty borders, and smaller font sizes ;p Also, reduce column width
-rw-r--r--default.css15
-rw-r--r--modules/gnome_output.py17
2 files changed, 26 insertions, 6 deletions
diff --git a/default.css b/default.css
new file mode 100644
index 0000000..e45549d
--- /dev/null
+++ b/default.css
@@ -0,0 +1,15 @@
+body {
+ font-size: 0.9em;
+ font-family: sans-serif;
+}
+
+table {
+ font-size: 0.8em;
+ border-style: dotted;
+ border-width: 1px;
+}
+
+tr {
+ border-style: dotted;
+ border-width: 1px;
+}
diff --git a/modules/gnome_output.py b/modules/gnome_output.py
index 8890099..c7fee7e 100644
--- a/modules/gnome_output.py
+++ b/modules/gnome_output.py
@@ -58,6 +58,8 @@ class Output:
# header
lines.append("<html>")
+ lines.append('<head><link rel="stylesheet" type="text/css" href="default.css"></head>')
+ lines.append("<body>")
lines.append("<h2>Gnome " + clioptions_module.Options().get_arguments().release_number + " Progress</h2>")
lines.append("contact " + os.environ["USER"] + "@gentoo.org if anything is not correct<br>")
lines.append("Generated date: " + current_time + "<br>")
@@ -69,20 +71,21 @@ class Output:
lines.append("Compliant Packs: " + str('%0.2f' % self.compliant_percent)+ "%" + " Number = " + str(self.compliant) + "<br>")
lines.append("Packs that need to be updated: " + str('%0.2f' % self.update_percent)+ "%" + " Number = " + str(self.update_needed) + "<br>")
lines.append("New Packs that need to be added: " + str('%0.2f' % self.notfound_percent)+ "%" + " Number = " + str(self.not_found) + "<br>")
+ lines.append("<br>")
- lines.append("<table cellpadding=\"10\">")
- lines.append("<th>Package Name</th><th>Portage Version</th><th>Official Release Version</th><th>Latest Available Version</th>")
+ lines.append('<table cellpadding="3">')
+ lines.append("<th>Package Name</th><th>Portage Version</th><th>Official Version</th><th>Latest Version</th>")
# data
for package in self.packages:
if package.status == package_module.Status.NeedUpdate:
- lines.append("<tr bgcolor=\"red\">")
+ lines.append('<tr bgcolor="#FF8A75">') # "red"
elif package.status == package_module.Status.Compliant:
- lines.append("<tr bgcolor=\"green\">")
+ lines.append('<tr bgcolor="#D0EE80">') # "green"
elif package.status == package_module.Status.NotFound:
- lines.append("<tr bgcolor=\"grey\">")
+ lines.append('<tr bgcolor="#EBEBEB">') # "grey"
elif package.status == package_module.Status.NewerVersion:
- lines.append("<tr bgcolor=\"33CC00\">")
+ lines.append('<tr bgcolor="#FFFF95">') # "yellow"
lines.append("<td>" + str(package.name) + "</td>")
lines.append("<td>" + str(package.portage_version) + "</td>")
@@ -95,6 +98,8 @@ class Output:
# footer
lines.append("<br>")
+ lines.append("Official Version: Official upstream releases")
+ lines.append("Latest Version: Official releases or Testing upstream (pre)releases")
lines.append("</html>")
self.write_file(lines, clioptions_module.Options().get_arguments().output)