From ace9681dd320e16265881064836020e317c35ba4 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 4 May 2024 23:05:47 +0200 Subject: fix --cdn. derp. --- bin/pyggle | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/pyggle b/bin/pyggle index 231087a..8f53b3c 100755 --- a/bin/pyggle +++ b/bin/pyggle @@ -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("", 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: -- cgit v1.2.3