From 3add64f5582c43384aca360fe9764628789d347b Mon Sep 17 00:00:00 2001 From: Sewon Ahn Date: Thu, 16 Sep 2021 00:36:52 +0900 Subject: [PATCH] change alt path --- distribusi/distribusi/distribusi.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/distribusi/distribusi/distribusi.py b/distribusi/distribusi/distribusi.py index 486d70a..fa90980 100644 --- a/distribusi/distribusi/distribusi.py +++ b/distribusi/distribusi/distribusi.py @@ -236,7 +236,8 @@ def render_dir(args, directory): c = caption(relative_path) a = FILE_TYPES[type_].format(quote(relative_path), c, c) # ALT 처리 - alt_path = full_path + ".alt" + src = os.path.splitext(full_path) + alt_path = src[0] + ".alt" if os.path.isfile(alt_path): f = open(alt_path, 'r', encoding='utf-8') alt = '' @@ -350,7 +351,8 @@ def distribusify(args, directory, freg): # noqa c = caption(full_path) a = FILE_TYPES[type_].format(quote(name), c, c) # ALT 처리 - alt_path = full_path + ".alt" + src = os.path.splitext(full_path) + alt_path = src[0] + ".alt" if os.path.isfile(alt_path): f = open(alt_path, 'r', encoding='utf-8') alt = '' @@ -358,6 +360,7 @@ def distribusify(args, directory, freg): # noqa line = f.readline() if not line: break alt = alt + line + ' ' + print("alt: " + alt ) a = FILE_TYPES[type_].format(quote(name), alt, c)