Rework a bunch of scripts into a single website script
This commit is contained in:
parent
f83c6ebbe5
commit
a9f52aad98
12 changed files with 275 additions and 92 deletions
12
scripts/erynwells_me/blog.py
Normal file
12
scripts/erynwells_me/blog.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
import datetime
|
||||
import os.path as osp
|
||||
from typing import Optional
|
||||
from . import paths
|
||||
|
||||
|
||||
def post_path(name, *, year: Optional[int] = None):
|
||||
if not year:
|
||||
year = datetime.date.today().year
|
||||
return osp.join(paths.content_path(), 'blog', str(year), name)
|
Loading…
Add table
Add a link
Reference in a new issue