From a7721c4560bfd79538f2161b4f6a17a8e9e5884b Mon Sep 17 00:00:00 2001 From: dragoncoder047 <101021094+dragoncoder047@users.noreply.github.com> Date: Mon, 9 Sep 2024 10:07:58 -0400 Subject: [PATCH] reorganize again --- Makefile | 5 ++++- markdown/normalize_filenames.py => normalize_filenames.py | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) rename markdown/normalize_filenames.py => normalize_filenames.py (91%) diff --git a/Makefile b/Makefile index ac57efe..740fd00 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: build clean +.PHONY: build clean filenames build: clean ./build.py @@ -6,3 +6,6 @@ build: clean clean: rm -rf docs/ + +filenames: + python3 normalize_filenames.py diff --git a/markdown/normalize_filenames.py b/normalize_filenames.py similarity index 91% rename from markdown/normalize_filenames.py rename to normalize_filenames.py index d3395ff..f33f8be 100644 --- a/markdown/normalize_filenames.py +++ b/normalize_filenames.py @@ -2,11 +2,10 @@ import datetime import html import os -import pprint import string import re -os.chdir(os.path.dirname(os.path.abspath(__file__))) +os.chdir("markdown/") files = glob.glob("*.md") @@ -18,7 +17,6 @@ def slugify(s: str): return re.sub(fr"[\s{re.escape(string.punctuation)}]+", "_", html.unescape(s).lower()).strip("_") -assert slugify("Hello, World!") == "hello_world" for file in files: date = None