generate event page in prep from the whole page
This commit is contained in:
parent
4959a91b08
commit
bd496eac3c
8
prep.py
8
prep.py
@ -91,7 +91,7 @@ page_template = ""
|
|||||||
# Build Serbian Events page
|
# Build Serbian Events page
|
||||||
new_events_html = build_html(new_events, DAYS_SR)
|
new_events_html = build_html(new_events, DAYS_SR)
|
||||||
with open("pages/sr/events.html", "r") as file:
|
with open("pages/sr/events.html", "r") as file:
|
||||||
page_template = ([line for line in file])[:2]
|
page_template = ([line for line in file])
|
||||||
|
|
||||||
with open("pages/sr/events.html", "w") as file:
|
with open("pages/sr/events.html", "w") as file:
|
||||||
file.writelines(page_template + new_events_html)
|
file.writelines(page_template + new_events_html)
|
||||||
@ -99,7 +99,7 @@ with open("pages/sr/events.html", "w") as file:
|
|||||||
# Build English Events page
|
# Build English Events page
|
||||||
new_events_html = build_html(new_events, DAYS_EN)
|
new_events_html = build_html(new_events, DAYS_EN)
|
||||||
with open("pages/en/events.html", "r") as file:
|
with open("pages/en/events.html", "r") as file:
|
||||||
page_template = ([line for line in file])[:2]
|
page_template = ([line for line in file])
|
||||||
|
|
||||||
with open("pages/en/events.html", "w") as file:
|
with open("pages/en/events.html", "w") as file:
|
||||||
file.writelines(page_template + new_events_html)
|
file.writelines(page_template + new_events_html)
|
||||||
@ -107,7 +107,7 @@ with open("pages/en/events.html", "w") as file:
|
|||||||
# Build Serbian Archive page
|
# Build Serbian Archive page
|
||||||
past_events_html = build_html(past_events, DAYS_SR)
|
past_events_html = build_html(past_events, DAYS_SR)
|
||||||
with open("pages/sr/events_archive.html", "r") as file:
|
with open("pages/sr/events_archive.html", "r") as file:
|
||||||
page_template = ([line for line in file])[:2]
|
page_template = ([line for line in file])
|
||||||
|
|
||||||
with open("pages/sr/events_archive.html", "w") as file:
|
with open("pages/sr/events_archive.html", "w") as file:
|
||||||
file.writelines(page_template + past_events_html)
|
file.writelines(page_template + past_events_html)
|
||||||
@ -115,7 +115,7 @@ with open("pages/sr/events_archive.html", "w") as file:
|
|||||||
# Build English Archive page
|
# Build English Archive page
|
||||||
past_events_html = build_html(past_events, DAYS_EN)
|
past_events_html = build_html(past_events, DAYS_EN)
|
||||||
with open("pages/en/events_archive.html", "r") as file:
|
with open("pages/en/events_archive.html", "r") as file:
|
||||||
page_template = ([line for line in file])[:2]
|
page_template = ([line for line in file])
|
||||||
|
|
||||||
with open("pages/en/events_archive.html", "w") as file:
|
with open("pages/en/events_archive.html", "w") as file:
|
||||||
file.writelines(page_template + past_events_html)
|
file.writelines(page_template + past_events_html)
|
||||||
|
Loading…
Reference in New Issue
Block a user