diff --git a/scripts/erynwells_me/paths.py b/scripts/erynwells_me/paths.py index e20abc2..5b7f51b 100644 --- a/scripts/erynwells_me/paths.py +++ b/scripts/erynwells_me/paths.py @@ -4,16 +4,33 @@ import os.path as osp +def root_dir() -> str: + '''Return the path to the root of the repository.''' + return osp.normpath(osp.join(osp.dirname(__file__), '..', '..')) + + +def assets_path() -> str: + '''Return the path to the assets directory.''' + path = osp.join(root_dir(), 'assets') + return path + + def content_path() -> str: '''Return the path to the content directory.''' - path = osp.abspath(osp.join(osp.dirname(__file__), '..', '..', 'content')) - assert osp.isdir(path) + path = osp.join(root_dir(), 'content') return path def blog_path() -> str: + '''Return the path to the blog content directory.''' return osp.join(content_path(), 'blog') def photos_path() -> str: + '''Return the path to the photos content directory.''' return osp.join(content_path(), 'photos') + + +content_dir = content_path +blog_dir = blog_path +photos_dir = photos_path