From 73ab44d3f6b93be6d9b2ffa7a7966c3eb5d4dc98 Mon Sep 17 00:00:00 2001 From: 20xd6 <20xd6@airmail.cc> Date: Thu, 30 Jun 2022 10:02:21 -0400 Subject: [PATCH] Remove menu_update function This function is unnecessary as it is done automatically by simple_blog itself. --- publish_blog.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/publish_blog.py b/publish_blog.py index 846455c..a0e0437 100644 --- a/publish_blog.py +++ b/publish_blog.py @@ -47,8 +47,6 @@ def parse_file(article_path): add_datestamp(article_path, os.path.join(path_to_publish, "article.md")) article_imgs = find_local_links(article_path) copy_all_imgs(article_imgs, path_to_publish) - menu_path = os.path.join(web_root, "common", "menu.php") - update_menu(menu_path, year, month) tagging.tag_article(path_to_publish) @@ -127,27 +125,6 @@ def next_article_num(source_dir): return next_num.zfill(2) + "_" -def update_menu(menu_path, year, month): - print(menu_path) - with open(menu_path, "r") as menu_source: - menu_text = menu_source.read() - soup = BeautifulSoup(menu_text, 'html.parser') - list_items = soup.find_all(id="blog") - last_post = soup.find_all(id="current_year") - # current_date = soup.find_all(attrs={"id": "date"}) - item_count = 0 - for items in last_post: - item_count += 1 - print(item_count) - print(type(items)) - print(items.attrs) - if "date=" in items: - print(items) - # print(list_items) - # print(last_post) - # print(current_date) - - def choose_option(options, selecting): count = 1 for option in options: