summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-05-04 23:05:47 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-05-04 23:05:47 +0200
commitace9681dd320e16265881064836020e317c35ba4 (patch)
tree0c5a90cd83dfeb1573ce8c6b793d94562b714353
parent9830bc4ef91bbb1d8ef9ce91dfcf7eb8db814c8b (diff)
fix --cdn. derp.
-rwxr-xr-xbin/pyggle8
1 files changed, 5 insertions, 3 deletions
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("<!-- $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: