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