Fix generation script for invocation from just
This commit is contained in:
parent
36ea0dd3f7
commit
912993f17d
2 changed files with 5 additions and 5 deletions
2
justfile
2
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:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue