|
|
@ -73,8 +73,8 @@ all_document_parts = '' # to append all content
|
|
|
|
|
|
|
|
|
|
|
|
for answer in site.ask(query):
|
|
|
|
for answer in site.ask(query):
|
|
|
|
publication_title = ''
|
|
|
|
publication_title = ''
|
|
|
|
print(answer, answer.keys())
|
|
|
|
# print(answer, answer.keys())
|
|
|
|
printout_dict = unpack_response(answer)
|
|
|
|
printout_dict, fullurl = unpack_response(answer)
|
|
|
|
# pprint(printout_dict)
|
|
|
|
# pprint(printout_dict)
|
|
|
|
img_info = images_info[printout_dict['page']] # find corresponding image in images.json
|
|
|
|
img_info = images_info[printout_dict['page']] # find corresponding image in images.json
|
|
|
|
page = site.pages[[printout_dict['page']]] # request that page from wiki
|
|
|
|
page = site.pages[[printout_dict['page']]] # request that page from wiki
|
|
|
@ -85,7 +85,8 @@ for answer in site.ask(query):
|
|
|
|
document_part_html = pub_part_template.render(
|
|
|
|
document_part_html = pub_part_template.render(
|
|
|
|
printout_dict=printout_dict,
|
|
|
|
printout_dict=printout_dict,
|
|
|
|
imgsrc=os.path.join(imgdir, img_info.get('filename')),
|
|
|
|
imgsrc=os.path.join(imgdir, img_info.get('filename')),
|
|
|
|
text=pagetext_html)
|
|
|
|
text=pagetext_html,
|
|
|
|
|
|
|
|
fullurl=fullurl,)
|
|
|
|
all_document_parts += document_part_html # append resulting html from document part to the previous parts
|
|
|
|
all_document_parts += document_part_html # append resulting html from document part to the previous parts
|
|
|
|
if printout_dict['Part'] == printout_dict['Partof']: # when Part == Partof
|
|
|
|
if printout_dict['Part'] == printout_dict['Partof']: # when Part == Partof
|
|
|
|
# pass all_document_parts html to pub_template content
|
|
|
|
# pass all_document_parts html to pub_template content
|
|
|
|