From 4c346e747ea7110ea4d95f0d62293b9601b2b590 Mon Sep 17 00:00:00 2001
From: Oxore
Date: Sun, 29 Sep 2019 18:47:44 +0300
Subject: Rename O'Reily to O'RLY everywhere
---
.gitignore | 2 +-
build.py | 9 ++++++---
index.html | 2 +-
templates/oreily-memes.html.j2 | 22 ----------------------
templates/orly-memes.html.j2 | 22 ++++++++++++++++++++++
5 files changed, 30 insertions(+), 27 deletions(-)
delete mode 100644 templates/oreily-memes.html.j2
create mode 100644 templates/orly-memes.html.j2
diff --git a/.gitignore b/.gitignore
index dfbedba..f948ec3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
*.png
*.jpg
-oreily-memes.html
+orly-memes.html
diff --git a/build.py b/build.py
index eb9fdbb..004b869 100644
--- a/build.py
+++ b/build.py
@@ -18,6 +18,9 @@ def get_memes(directory):
def bake_thumbnails(memes):
for meme in memes:
if not os.access(meme.get("thumb"), os.F_OK):
+ thumb_path = os.path.dirname(meme.get("thumb"))
+ if not os.access(thumb_path, os.F_OK):
+ os.mkdir(thumb_path, int('0775', 8))
os.system("convert {} -resize 320x320^\> {}"
.format(meme.get("orig"), meme.get("thumb")))
@@ -30,11 +33,11 @@ def render_template(template_fname, output_fname, memes):
outdir = "."
-memes_dir = "oreily-memes"
+memes_dir = "orly-memes"
# The "om_" prefix means "oreily memes"
-om_template_fname = "templates/oreily-memes.html.j2"
+om_template_fname = "templates/orly-memes.html.j2"
om_outdir = outdir
-om_output_fname = om_outdir + "/" + "oreily-memes.html"
+om_output_fname = om_outdir + "/" + "orly-memes.html"
if not os.access(outdir, os.F_OK):
os.mkdir(outdir, int('0775', 8))
diff --git a/index.html b/index.html
index cb9346b..e8f0728 100644
--- a/index.html
+++ b/index.html
@@ -12,7 +12,7 @@
cgit
- O'Reily memes
+ O'RLY memes