working..

master
Castro0o 10 years ago
parent 99e7df5270
commit c8aa3bef42

@ -7,6 +7,12 @@ Or index all the gaduation works:
`python mmdc_wiki2web.py --category Graduation_work`
## template files
web/page-template.html
web/index-template.html
## To Do
* add auxiliar JSON creation
* replace direct API calls for mw library

@ -77,15 +77,22 @@ for member in memberpages:
if key in ['Extra', 'Description', 'Bio'] and workdict[key]:
workdict[key] = pandoc2html( (workdict[key].decode('utf-8')) )
print 'EXTRA', type (workdict['Extra']), workdict['Extra']
# fill template with dictionary/mw_page values
workpage_html = page_template.format(title=(workdict['Title']),
pprint.pprint(workdict)
if len(workdict['Creator'])>1 and len(workdict['Creator'])>1:
workpage_html = page_template.format(title=('Title'),#workdict['Title']),
creator=(workdict['Creator']),
date=workdict['Date'],
website=workdict['Website'],
thumbnail=workdict['Thumbnail'],
bio=(workdict['Bio']),
description=(workdict['Description']),
extra=( workdict['Extra'] )
description=('desc'),#workdict['Description']),
extra=( 'extra')#workdict['Extra'] )
)
# parse workpage_html # process html: img full url
@ -113,11 +120,13 @@ for member in memberpages:
work_file.write(workpage_html)
work_file.close()
print 'DICT', type(workdict['Title'])
# insert work to index
index_addwork( parent=index_container,
workid=key,
href=work_filename.replace('web/',''),
title=(workdict['Title']).decode('utf-8'),
title=(workdict['Title']),#.decode('utf-8'),
creator=workdict['Creator'].decode('utf-8'),
date=workdict['Date'],
thumbnail=workdict['Thumbnail'],

Loading…
Cancel
Save