|
|
@ -30,7 +30,7 @@ print year
|
|
|
|
# DEFS: create_page create_index
|
|
|
|
# DEFS: create_page create_index
|
|
|
|
######
|
|
|
|
######
|
|
|
|
def create_page(memberpages, mode):
|
|
|
|
def create_page(memberpages, mode):
|
|
|
|
page_template = open("{}-template.html".format(year), "r")
|
|
|
|
page_template = open("./{}-template.html".format(year), "r")
|
|
|
|
indexdict = {} #parent dict: contains articledict instances
|
|
|
|
indexdict = {} #parent dict: contains articledict instances
|
|
|
|
for member in memberpages:
|
|
|
|
for member in memberpages:
|
|
|
|
print member
|
|
|
|
print member
|
|
|
@ -102,7 +102,7 @@ def create_page(memberpages, mode):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def create_index(indexdict):
|
|
|
|
def create_index(indexdict):
|
|
|
|
index_template = open("index-template-{}.html".format(year), "r")
|
|
|
|
index_template = open("./index-template-{}.html".format(year), "r")
|
|
|
|
index_tree = html5lib.parse(index_template, namespaceHTMLElements=False)
|
|
|
|
index_tree = html5lib.parse(index_template, namespaceHTMLElements=False)
|
|
|
|
index_container = index_tree.find(".//div[@class='isotope']") #maybe id is imp
|
|
|
|
index_container = index_tree.find(".//div[@class='isotope']") #maybe id is imp
|
|
|
|
keys = indexdict.keys()
|
|
|
|
keys = indexdict.keys()
|
|
|
@ -118,7 +118,7 @@ def create_index(indexdict):
|
|
|
|
thumbnail=(indexdict[key]['Thumbnail'])
|
|
|
|
thumbnail=(indexdict[key]['Thumbnail'])
|
|
|
|
)
|
|
|
|
)
|
|
|
|
print '----', indexdict[key]['Title'],indexdict[key]['Path']
|
|
|
|
print '----', indexdict[key]['Title'],indexdict[key]['Path']
|
|
|
|
write_html_file(index_tree, 'web/{}.html'.format('index'))
|
|
|
|
write_html_file(index_tree, './web/{}.html'.format('index'))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#####
|
|
|
|
#####
|
|
|
|