aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2023-10-18 12:40:44 -0400
committerNick Mathewson <nickm@torproject.org>2023-10-18 12:40:44 -0400
commit5ea32780f9322601ec47e16bf70b40fcd202cb1d (patch)
tree3a7875a945923ebb12728aaa4c50f9c78e21a30b /bin
parent71c2e1cf98b2a953ccabbe81aef1b64122bb7675 (diff)
downloadtorspec-5ea32780f9322601ec47e16bf70b40fcd202cb1d.tar.gz
torspec-5ea32780f9322601ec47e16bf70b40fcd202cb1d.zip
Improve redirect URLs
For those that are already correct, list the correct URL on the main site, and mark them as "implicit" so we can double-check them. For those that remain, remove all old links to gitweb.tpo, and link to gitlab.tpo instead.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/make_redirects.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/make_redirects.py b/bin/make_redirects.py
index 99a5ea3..ea8ea3b 100755
--- a/bin/make_redirects.py
+++ b/bin/make_redirects.py
@@ -24,10 +24,13 @@ def book_redirects(rs, spec_dir):
for kwd, info in rs.items():
if os.path.isdir(os.path.join(spec_dir, kwd)):
assert os.path.isfile(os.path.join(spec_dir, kwd, "index.md"))
+ assert info.get('implicit')
continue
elif any((os.path.isfile(os.path.join(spec_dir, kwd) + ext)) for ext in [".txt", ".md"]):
+ assert info.get('implicit')
continue
else:
+ assert not info.get('implicit')
source = kwd + ".html"
target = info['target']
lines.append(