build.py: update to new /readme structure; format modified dates correctly

This commit is contained in:
rolux 2012-06-20 11:02:59 +02:00
parent c3d51860c3
commit 542be904ea

View file

@ -158,8 +158,8 @@ def build_oxjs(downloads=False, geo=False):
write_file(build_path + 'Ox.UI/json/Ox.UI.files.json', files)
files = json.dumps(sorted(ui_files['dev']), indent=4)
write_file(dev_path + 'Ox.UI/json/Ox.UI.files.json', files)
ui_files['dev'].append('Ox.UI/Ox.UI.js')
# index
data = {
# sum(list, []) is flatten
@ -177,15 +177,15 @@ def build_oxjs(downloads=False, geo=False):
'readme': map(
lambda x: {
'date': time.strftime(
'%Y-%m-%d %H:%M:%S',
time.gmtime(os.path.getmtime(root_path + 'readme/html/' + x))
'%Y-%m-%dT%H:%M:%SZ',
time.gmtime(os.path.getmtime(root_path + 'readme/' + x))
),
'id': x.split('.')[0],
'title': get_title(root_path + 'readme/html/' + x)
'title': get_title(root_path + 'readme/' + x)
},
filter(
lambda x: not re.search('^[._]', x),
os.listdir(root_path + 'readme/html/')
lambda x: not re.search('^[._]', x) and re.search('\.html$', x),
os.listdir(root_path + 'readme/')
)
)
}