diff --git a/justfile b/justfile index 797be8b..c5fb0f5 100644 --- a/justfile +++ b/justfile @@ -50,7 +50,7 @@ ssh: # Create the skeleton for a new issue of the newsletter, and reference it into the home page new number: - PYTHONPATH=PWD venv/bin/python ./scripts/create_newsletter.py {{number}} + PYTHONPATH=PWD venv/bin/python ./scripts/create_newsletter.py --number={{number}} # generate HTML email mail file: diff --git a/scripts/create_newsletter.py b/scripts/create_newsletter.py index c5837b6..9a8202c 100644 --- a/scripts/create_newsletter.py +++ b/scripts/create_newsletter.py @@ -36,7 +36,7 @@ parser.add_argument("-n", "--number", required=True, type=int, help="Newsletter args = parser.parse_args() # Load the newsletter template -template = Path("../template/newsletter.md") +template = Path("./template/newsletter.md") content = template.read_text() @@ -52,11 +52,11 @@ new_content = set_publication_date_for_pelican(new_content, next_monday) new_content = set_publication_date_for_seo(new_content, next_monday) # Create the new file -destination = Path(f"../content/newsletter/craft-letter-{args.number}.md") +destination = Path(f"./content/newsletter/craft-letter-{args.number}.md") destination.write_text(new_content) # Load the homepage template -template = Path("../template/index.md") +template = Path("./template/index.md") content = template.read_text() new_content = set_publication_date_for_pelican(content, next_monday) @@ -68,5 +68,5 @@ for i in reversed(range(args.number)): new_content += link # Update the index page -destination = Path("../content/pages/index.md") +destination = Path("./content/pages/index.md") destination.write_text(new_content)