diff --git a/distribusi/distribusi/distribusi.py b/distribusi/distribusi/distribusi.py index fa90980..a890a7d 100644 --- a/distribusi/distribusi/distribusi.py +++ b/distribusi/distribusi/distribusi.py @@ -200,13 +200,13 @@ def render_dir(args, directory): # example: MIME plain/text becomes 'type' plain 'subtype' text type_, subtype = mime.split('/') - c = name + cap = untag(name) if args.verbose: print('Found file in dir ', name, 'as', mime) if type_ in FILE_TYPES: - a = FILE_TYPES[type_].format(quote(relative_path), c, c) + a = FILE_TYPES[type_].format(quote(relative_path), cap, cap) # expansion for different kind of text files if type_ == 'text': @@ -227,14 +227,14 @@ def render_dir(args, directory): # a = FILE_TYPES[type_] if type_ == 'image': - a = FILE_TYPES[type_].format(quote(relative_path), c, c) + a = FILE_TYPES[type_].format(quote(relative_path), cap, cap) if args.thumbnail: a = thumbnail(full_path, relative_path, args) if args.no_filenames: - c = "" + cap = "" if args.captions: - c = caption(relative_path) - a = FILE_TYPES[type_].format(quote(relative_path), c, c) + cap = untag(caption(relative_path)) + a = FILE_TYPES[type_].format(quote(relative_path), cap, cap) # ALT 처리 src = os.path.splitext(full_path) alt_path = src[0] + ".alt" @@ -246,7 +246,7 @@ def render_dir(args, directory): if not line: break alt = alt + line + ' ' - a = FILE_TYPES[type_].format(quote(relative_path), alt, c) + a = FILE_TYPES[type_].format(quote(relative_path), alt, cap) if subtype in SUB_TYPES: a = SUB_TYPES[subtype] @@ -315,14 +315,14 @@ def distribusify(args, directory, freg): # noqa # example: MIME plain/text becomes 'type' plain 'subtype' text type_, subtype = mime.split('/') - c = name + cap = untag(name) if args.verbose: print('Found', name, 'as', mime) if type_ in FILE_TYPES: - a = FILE_TYPES[type_].format(quote(name), c, c) + a = FILE_TYPES[type_].format(quote(name), cap, cap) # expansion for different kind of text files if type_ == 'text': @@ -346,10 +346,10 @@ def distribusify(args, directory, freg): # noqa if args.thumbnail: a = thumbnail(full_path, name, args) if args.no_filenames: - c = "" + cap = "" if args.captions: - c = caption(full_path) - a = FILE_TYPES[type_].format(quote(name), c, c) + cap = untag(caption(full_path)) + a = FILE_TYPES[type_].format(quote(name), cap, cap) # ALT 처리 src = os.path.splitext(full_path) alt_path = src[0] + ".alt" @@ -362,7 +362,7 @@ def distribusify(args, directory, freg): # noqa alt = alt + line + ' ' print("alt: " + alt ) - a = FILE_TYPES[type_].format(quote(name), alt, c) + a = FILE_TYPES[type_].format(quote(name), alt, cap) if subtype in SUB_TYPES: a = SUB_TYPES[subtype] diff --git a/new b/new deleted file mode 100644 index e69de29..0000000