erynwells.me/scripts/erynwells_me/paths.py

19 lines
426 B
Python

#!/usr/bin/env python3
# Eryn Wells <eryn@erynwells.me>
import os.path as osp
def content_path() -> str:
'''Return the path to the content directory.'''
path = osp.abspath(osp.join(osp.dirname(__file__), '..', '..', 'content'))
assert osp.isdir(path)
return path
def blog_path() -> str:
return osp.join(content_path(), 'blog')
def photos_path() -> str:
return osp.join(content_path(), 'photos')