commit 8164f7e0275886cbf5ecd89593a6317a88311139 Author: Tom Ritter tom@ritter.vg Date: Sun Dec 7 20:10:17 2014 -0500
Output files into an 'out' directory.
(And add a TODO.) --- .gitignore | 6 +++--- favicon.ico | Bin 1150 -> 0 bytes out/favicon.ico | Bin 0 -> 1150 bytes website.py | 1 + write_website.py | 6 +++--- 5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore index d6e7aaa..e54e242 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ *.p *.swp stem -index.html -consensus-health.html -download-stats.csv \ No newline at end of file +out/index.html +out/consensus-health.html +out/download-stats.csv \ No newline at end of file diff --git a/favicon.ico b/favicon.ico deleted file mode 100644 index 48060b1..0000000 Binary files a/favicon.ico and /dev/null differ diff --git a/out/favicon.ico b/out/favicon.ico new file mode 100644 index 0000000..48060b1 Binary files /dev/null and b/out/favicon.ico differ diff --git a/website.py b/website.py index f5f1869..812a07b 100755 --- a/website.py +++ b/website.py @@ -910,6 +910,7 @@ class WebsiteWriter: Write the footer of the HTML page containing the blurb that is on every page of the metrics website. """ + #XXX Write the git version and steam version the page was generated with self.site.write("</div>\n" + "</div>\n" + "<div class="bottom" id="bottom">\n" diff --git a/write_website.py b/write_website.py index e44ea58..6316c0c 100755 --- a/write_website.py +++ b/write_website.py @@ -53,7 +53,7 @@ def main(): votes, vote_fetching_issues, vote_fetching_runtimes = get_votes()
# updates the download statistics file - f = open('download-stats.csv', 'a') + f = open(os.path.join('out', 'download-stats.csv'), 'a') for ds in consensus_fetching_runtimes: f.write("%s,%i,%i\n" % (ds, time.time() * 1000, int(consensus_fetching_runtimes[ds] * 1000))) f.close() @@ -64,8 +64,8 @@ def main(): w.set_consensuses(consensuses) w.set_votes(votes) w.set_known_params(CONFIG['known_params']) - w.write_website(os.path.join(os.path.dirname(__file__), 'consensus-health.html'), True) - w.write_website(os.path.join(os.path.dirname(__file__), 'index.html'), False) + w.write_website(os.path.join(os.path.dirname(__file__), 'out', 'consensus-health.html'), True) + w.write_website(os.path.join(os.path.dirname(__file__), 'out', 'index.html'), False)
def get_consensuses():
tor-commits@lists.torproject.org