Move photos content path in new-photo-post script to erynwells_me module

This commit is contained in:
Eryn Wells 2025-08-28 07:37:05 -06:00
parent 24871ecf49
commit 9633b85411

View file

@ -11,10 +11,7 @@ from PIL import Image
from PIL.ExifTags import TAGS
from typing import Optional
from erynwells_me.metadata import slugify
from erynwells_me.paths import content_path
PHOTOS_CONTENT_DIR = osp.join(content_path(), 'photos')
from erynwells_me.paths import photos_path
def parse_args(argv, *a, **kw):
@ -88,8 +85,8 @@ def main(argv):
else:
name = osp.splitext(osp.basename(photo))[0]
post_path_year = os.path.join(PHOTOS_CONTENT_DIR, f'{year:04}', name)
post_path_year_month = os.path.join(PHOTOS_CONTENT_DIR, f'{year:04}', f'{month:02}', name)
post_path_year = os.path.join(photos_path(), f'{year:04}', name)
post_path_year_month = os.path.join(photos_path(), f'{year:04}', f'{month:02}', name)
if os.path.exists(post_path_year):
if os.path.exists(post_path_year_month):