erynwells.me/scripts/erynwells_me/blog.py

13 lines
300 B
Python
Raw Normal View History

# 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)