mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 05:35:20 -05:00
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
This commit is contained in:
parent
6a62e22198
commit
afeacb048f
1 changed files with 9 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ import tempfile
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
langs = {
|
langs = {
|
||||||
|
|
@ -162,6 +163,8 @@ def main():
|
||||||
client = pysvn.Client()
|
client = pysvn.Client()
|
||||||
# scan output
|
# scan output
|
||||||
i = 0
|
i = 0
|
||||||
|
tslateststamp = 0
|
||||||
|
tsoldeststamp = time.time()
|
||||||
while i < len(lines):
|
while i < len(lines):
|
||||||
line = lines[i]
|
line = lines[i]
|
||||||
if re_updating.search(line):
|
if re_updating.search(line):
|
||||||
|
|
@ -170,6 +173,10 @@ def main():
|
||||||
fileinfo = client.info2(svnserver + langbase + tsfile)[0][1]
|
fileinfo = client.info2(svnserver + langbase + tsfile)[0][1]
|
||||||
tsrev = fileinfo.last_changed_rev.number
|
tsrev = fileinfo.last_changed_rev.number
|
||||||
tsdate = date.fromtimestamp(fileinfo.last_changed_date).isoformat()
|
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]
|
line = lines[i + 1]
|
||||||
if re_generated.search(line):
|
if re_generated.search(line):
|
||||||
|
|
@ -219,6 +226,8 @@ def main():
|
||||||
if pretty == 1:
|
if pretty == 1:
|
||||||
print delim
|
print delim
|
||||||
|
|
||||||
|
print "Last language updated on " + date.fromtimestamp(tslateststamp).isoformat()
|
||||||
|
print "Oldest language update was " + date.fromtimestamp(tsoldeststamp).isoformat()
|
||||||
shutil.rmtree(workfolder)
|
shutil.rmtree(workfolder)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue