Simplify usage of custom justfile targets
This commit is contained in:
parent
7ae5406548
commit
2b450e1b51
7 changed files with 53 additions and 31 deletions
10
scripts/util.py
Normal file
10
scripts/util.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
from pathlib import Path
|
||||
|
||||
|
||||
def get_latest_newsletter_number():
|
||||
# Find the number of the latest newsletter
|
||||
destination_path = Path(f"./content/newsletter")
|
||||
p = destination_path.glob("craft-letter-*.md")
|
||||
files = [x for x in p if x.is_file()]
|
||||
letter_number = len(files)
|
||||
return letter_number
|
||||
Loading…
Add table
Add a link
Reference in a new issue