diff --git a/lumbunglib/cloudcal.py b/lumbunglib/cloudcal.py index 2375f31..7f67017 100644 --- a/lumbunglib/cloudcal.py +++ b/lumbunglib/cloudcal.py @@ -193,18 +193,18 @@ def update_event_post(post_dir, event): def main(): for event in list(cal.events): + post_name = sanitize_name(event.name) + "-" + event.uid + post_dir = os.path.join(output_dir, post_name) - post_dir = os.path.join(output_dir, sanitize_name(event.name) + "-" + event.uid) - - if event.uid not in existing_posts: + if post_name not in existing_posts: # if there is an event we dont already have, make it create_event_post(post_dir, event) - elif event.uid in existing_posts: + elif post_name in existing_posts: # if we already have it, update update_event_post(post_dir, event) existing_posts.remove( - event.uid + post_name ) # create list of posts which have not been returned by the calendar for post in existing_posts: