Compare commits

..

No commits in common. "e32743ecd569bd2ab8eaa58f4fe0a6e9f6b7c606" and "3297991d83e2311a22d54944dffcc2d90830048f" have entirely different histories.

2 changed files with 1 additions and 12 deletions

View File

@ -75,7 +75,6 @@ def create_metadata(event):
"duration": date.compress(event.duration),
"location": event.location,
"uid": event.uid,
"featured_image": "",
"images": find_imageURLS(event.description), # currently not used in template
}
@ -111,11 +110,6 @@ def localize_time(date):
)
return localized_begins
def sanitize_name(name):
sanitized = "".join([c if c.isalnum() or c == " " else "-" for c in name])
if len(sanitized) > 20:
return sanitized[:20]
return sanitized
def create_event_post(post_dir, event):
"""
@ -159,8 +153,6 @@ def create_event_post(post_dir, event):
event_metadata["description"] = event_metadata["description"].replace(
img, "![]({})".format(img_name)
)
if event_metadata["featured_image"] == "":
event_metadata["featured_image"] = img_name
if img_name in existing_images:
existing_images.remove(img_name)
@ -194,7 +186,7 @@ def update_event_post(post_dir, event):
def main():
for event in list(cal.events):
post_dir = os.path.join(output_dir, sanitize_name(event.name) + "-" + event.uid)
post_dir = os.path.join(output_dir, event.uid)
if event.uid not in existing_posts:
# if there is an event we dont already have, make it

View File

@ -8,9 +8,6 @@ event_end: "{{ event.end }}"
duration: "{{ event.duration }}"
localized_begin: "{{ event.localized_begin }}"
uid: "{{ event.uid }}"
{% if event.featured_image %}
featured_image: "{{ event.featured_image }}"
{% endif %}
{% if event.location %}
location: "{{ event.location }}"
{% endif %}