|
|
|
@ -39,17 +39,17 @@ pub_parts_html = '' # to append all content
|
|
|
|
|
|
|
|
|
|
for answer in site.ask(args.ask):
|
|
|
|
|
publication_title = ''
|
|
|
|
|
# print(answer, answer.keys())
|
|
|
|
|
print(answer, answer.keys())
|
|
|
|
|
printout_dict = unpack_response(answer)
|
|
|
|
|
# pprint(printout_dict)
|
|
|
|
|
img_info = images_info[printout_dict['page']]
|
|
|
|
|
page = site.pages[[printout_dict['page']]]
|
|
|
|
|
pagetext = page.text()
|
|
|
|
|
pagetext_html = pandoc(pwd=wd, content=pagetext, format_in='mediawiki', format_out='html')
|
|
|
|
|
print(pagetext_html)
|
|
|
|
|
img_local = os.path.join(imgdir, img_info.get('filename'))
|
|
|
|
|
# pprint(img_info)
|
|
|
|
|
# print(img_local)
|
|
|
|
|
# import pdb; pdb.set_trace()
|
|
|
|
|
pub_part_html = pub_part_template.render(
|
|
|
|
|
imgsrc=os.path.join(imgdir, img_info.get('filename')),
|
|
|
|
|
text=pagetext_html,
|
|
|
|
@ -71,5 +71,9 @@ for answer in site.ask(args.ask):
|
|
|
|
|
# print(pub_html, '\n')
|
|
|
|
|
pub_parts_html = '' # Reset pub_parts_html
|
|
|
|
|
|
|
|
|
|
# TODO: queries wihout Part?
|
|
|
|
|
# TODO: include Creator Property value
|
|
|
|
|
# TODO: queries without Part?
|
|
|
|
|
# TODO: include Creator Property value
|
|
|
|
|
|
|
|
|
|
# TODO: address Dates:
|
|
|
|
|
# * date values coming from mw with timestamp, the missing valus are one
|
|
|
|
|
# This a MW issue!
|