summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2021-06-02 21:02:46 +0000
committerRob Austein <sra@hactrn.net>2021-06-02 21:02:46 +0000
commit3ed141f8c57962413402c650d81df11553e42df8 (patch)
tree1d33d8da67fe0a0f725cadcf32a82d6f5ea48e52
parenteba06e6d2aa1397611df95243877753e00d9c5f0 (diff)
Feh, just wire in tools/ prefix for now
-rw-r--r--GNUmakefile2
-rwxr-xr-xextract.py7
2 files changed, 5 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 8c5c6b6..49dff79 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -8,7 +8,7 @@ SOURCE_TRAC_DB := bikeshed.cryptech.is:/home/trac/db/trac.db
SOURCE_TRAC_ATTACHMENTS := bikeshed.cryptech.is:/home/trac/files/attachments
all:
- ${HERE}/extract.py --source-url ${SOURCE_URL}
+ tools/extract.py --source-url ${SOURCE_URL}
cd pelican; pelican --output website --settings pelicanconf.py --fatal errors content
fetch:
diff --git a/extract.py b/extract.py
index 368211c..f2f3147 100755
--- a/extract.py
+++ b/extract.py
@@ -53,7 +53,7 @@ def attachment_link(row):
class Filter:
- def __init__(self, filename = "filter.json"):
+ def __init__(self, filename = "tools/filter.json"):
with open(filename) as f:
filter = json.load(f)
if not all(action in "-+" for action, pattern in filter):
@@ -89,12 +89,13 @@ def main():
args = ap.parse_args()
for dn in ("wiki", "pelican"):
- shutil.rmtree(dn)
+ if os.path.exists(dn):
+ shutil.rmtree(dn)
for dn in ("wiki", "pelican/content"):
os.makedirs(dn)
- os.link("pelicanconf.py", "pelican/pelicanconf.py")
+ os.link("tools/pelicanconf.py", "pelican/pelicanconf.py")
wiki_to_markdown = trac2md.Trac2Markdown(args.source_url)