diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pyggle | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -519,7 +519,7 @@ class Thumbnail: def copy_files(base_dir): - for directory in ".data/css .data/js .thumbnails".split(): + for directory in ".data/css .data/js".split(): os.makedirs(directory, exist_ok=True) boxwidth = f"{args.size * args.spacing}px" @@ -637,6 +637,8 @@ if __name__ == "__main__": base_dir = "/".join(os.path.realpath(sys.argv[0]).split("/")[:-2]) + os.makedirs(".thumbnails", exist_ok=True) + if not args.cdn: copy_files(f"{base_dir}/share") @@ -644,8 +646,8 @@ if __name__ == "__main__": html_buf = f.read().replace("<!-- $title -->", args.title) if args.cdn: - html_buf = html_buf.replace('href=".data/css/"', f'href="{args.cdn}/css/') - html_buf = html_buf.replace('src=".data/js/"', f'sc="{args.cdn}/js/') + html_buf = html_buf.replace('href=".data/css/', f'href="{args.cdn}/css/') + html_buf = html_buf.replace('src=".data/js/', f'src="{args.cdn}/js/') if args.html_include: with open(args.html_include, "r") as f: |