Move photos content path in new-photo-post script to erynwells_me module
This commit is contained in:
parent
24871ecf49
commit
9633b85411
1 changed files with 3 additions and 6 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue