Replace the next_sunday.py script with a more comprehensive weeknotes script

This commit is contained in:
Eryn Wells 2024-06-10 13:18:21 -07:00
parent 1c897e4518
commit bee8800070
3 changed files with 122 additions and 36 deletions

View file

@ -36,11 +36,11 @@ nethack-commit: $(NETHACK_LOGFILE_DATA_FILE)
weeknotes: YEAR=$(shell date '+%Y')
weeknotes: WEEK_NUMBER=$(shell date '+%V')
weeknotes: UPCOMING_SUNDAY=$(shell scripts/next_sunday.py)
weeknotes: PAGE_PATH=blog/$(YEAR)/weeknotes-$(YEAR)w$(WEEK_NUMBER).md
weeknotes: $(CONTENT_PATH)/$(PAGE_PATH)
weeknotes: UPCOMING_SUNDAY=$(shell scripts/weeknotes show --date)
weeknotes: PAGE_PATH=$(shell scripts/weeknotes show)
weeknotes: $(PAGE_PATH)
hugo new -k weeknotes --clock "$(UPCOMING_SUNDAY)" -c "$(CONTENT_PATH)" "$(PAGE_PATH)"
sed -I -e "s/%%WEEK_NUMBER%%/$(WEEK_NUMBER)/" "$(CONTENT_PATH)/$(PAGE_PATH)"
sed -I -e "s/%%WEEK_NUMBER%%/$(WEEK_NUMBER)/" "$(PAGE_PATH)"
clean:
rm -rf public/