summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/langstats.py
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-03-01 21:30:39 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-03-01 21:30:39 +0000
commitafeacb048f4ca0aed300531fcb90da969724f803 (patch)
tree385114cdc3dc8b8b8cc34559e814e452c154da45 /rbutil/rbutilqt/langstats.py
parent6a62e221988b4d6087be60e7f6016d8b9e1d5635 (diff)
langstat: Output date of the latest and oldest language update.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24986 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/langstats.py')
-rwxr-xr-xrbutil/rbutilqt/langstats.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/langstats.py b/rbutil/rbutilqt/langstats.py
index bc7e0ee58f..f415237f4f 100755
--- a/rbutil/rbutilqt/langstats.py
+++ b/rbutil/rbutilqt/langstats.py
@@ -29,6 +29,7 @@ import tempfile
import os
import shutil
from datetime import date
+import time
langs = {
@@ -162,6 +163,8 @@ def main():
client = pysvn.Client()
# scan output
i = 0
+ tslateststamp = 0
+ tsoldeststamp = time.time()
while i < len(lines):
line = lines[i]
if re_updating.search(line):
@@ -170,6 +173,10 @@ def main():
fileinfo = client.info2(svnserver + langbase + tsfile)[0][1]
tsrev = fileinfo.last_changed_rev.number
tsdate = date.fromtimestamp(fileinfo.last_changed_date).isoformat()
+ if fileinfo.last_changed_date > tslateststamp:
+ tslateststamp = fileinfo.last_changed_date
+ if fileinfo.last_changed_date < tsoldeststamp:
+ tsoldeststamp = fileinfo.last_changed_date
line = lines[i + 1]
if re_generated.search(line):
@@ -219,6 +226,8 @@ def main():
if pretty == 1:
print delim
+ print "Last language updated on " + date.fromtimestamp(tslateststamp).isoformat()
+ print "Oldest language update was " + date.fromtimestamp(tsoldeststamp).isoformat()
shutil.rmtree(workfolder)