From 92a5a007277005744740dabd36182410b87b6441 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 14 Feb 2021 17:47:46 +0000 Subject: Add image links Clean up whacky invisible unicode characters in links on a couple of source packages --- extract.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extract.py') diff --git a/extract.py b/extract.py index ffd183b..9466769 100755 --- a/extract.py +++ b/extract.py @@ -50,7 +50,7 @@ def attachment_link(row): fn2 = os.path.splitext(row["filename"])[1] return \ os.path.join("attachments", "wiki", h1[:3], h1, h2 + fn2), \ - os.path.join("pelican", "images", urllib.parse.quote(row.id, ""), urllib.parse.quote(row.filename, "")) + os.path.join("pelican", "content", urllib.parse.quote(row.id, ""), urllib.parse.quote(row.filename, "")) class Filter: @@ -76,7 +76,7 @@ def main(): for dn in ("wiki", "pelican"): shutil.rmtree(dn) - for dn in ("wiki", "pelican/content/images", "pelican/content/pages"): + for dn in ("wiki", "pelican/content"): os.makedirs(dn) os.link("pelicanconf.py", "pelican/pelicanconf.py") @@ -92,7 +92,7 @@ def main(): print(slug, row.version) with open("wiki/{}.trac".format(slug), "w") as f: f.write(row.text) - md = trac2md.WikiToMD(row.text) + md = trac2md.WikiToMD(row.text, slug) with open("pelican/content/{}.md".format(slug), "w") as f: f.write(md) -- cgit v1.2.3