diff --git a/tools/article_utils.py b/tools/article_utils.py index f876153..86d4e41 100644 --- a/tools/article_utils.py +++ b/tools/article_utils.py @@ -1,20 +1,5 @@ import time, subprocess -MONTHS = { - 1: "January", - 2: "February", - 3: "March", - 4: "April", - 5: "May", - 6: "June", - 7: "July", - 8: "August", - 9: "September", - 10: "October", - 11: "November", - 12: "December" -} - def the_line_after_metadata(lines: []) -> int: i = 0 while lines[i].strip(): diff --git a/tools/article_wrapper.py b/tools/article_wrapper.py index 85ed8c3..4212a1a 100755 --- a/tools/article_wrapper.py +++ b/tools/article_wrapper.py @@ -5,8 +5,8 @@ from sys import argv, exit import time -from article_utils import the_line_after_metadata, parse_metadata, MONTHS -from page_shares import wrap_page +from article_utils import the_line_after_metadata, parse_metadata +from page_shares import wrap_page, MONTHS if len(argv) <= 1: print("No file was supplied") diff --git a/tools/main_page_generator.py b/tools/main_page_generator.py index dc6ec53..768cad5 100755 --- a/tools/main_page_generator.py +++ b/tools/main_page_generator.py @@ -5,8 +5,8 @@ from os import walk, path from random import choice, seed import time, urllib.parse -from article_utils import parse_metadata, MONTHS -from page_shares import wrap_page, ADJECTIVES +from article_utils import parse_metadata +from page_shares import wrap_page, ADJECTIVES, MONTHS if len(argv) <= 1: print("No directory was supplied") diff --git a/tools/page_shares.py b/tools/page_shares.py index 57a6259..39a8247 100644 --- a/tools/page_shares.py +++ b/tools/page_shares.py @@ -28,5 +28,30 @@ TAIL_EMBED = """ ADJECTIVES = ["*wild*", "**wacky**", "very humble", "**most serious**"] +MONTHS = { + 1: "January", + 2: "February", + 3: "March", + 4: "April", + 5: "May", + 6: "June", + 7: "July", + 8: "August", + 9: "September", + 10: "October", + 11: "November", + 12: "December" +} + +WEEKDAYS = { + 0: "Monday", + 1: "Tuesday", + 2: "Wednesday", + 3: "Thursday", + 4: "Friday", + 5: "Saturday", + 6: "Sunday" +} + def wrap_page(page: str) -> str: return HEAD_EMBED + page + TAIL_EMBED