Skip to content
Snippets Groups Projects
Verified Commit 0ecc57b8 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

fix index generation script

parent 1733f398
No related branches found
No related tags found
No related merge requests found
...@@ -11,14 +11,14 @@ def line_prepender(filename, line): ...@@ -11,14 +11,14 @@ def line_prepender(filename, line):
def build_link(title, href): def build_link(title, href):
# strip the number of the title # strip the number of the title
if ('handbook' in href) or ('handbook-additional' in href) or ('handbook-annexes' in href): if ('handbook' in href):
title = re.sub('[0-9.]', '', title).strip() title = re.sub('[0-9.]', '', title).strip()
# remove sym link reference in href # remove sym link reference in href
if ('handbook-2-additional' in href): if ('handbook-additional' in href):
href = href.replace('handbook-2-additional', 'handbook').strip() href = href.replace('handbook-additional', 'handbook').strip()
elif ('handbook-3-annexes' in href): elif ('handbook-annexes' in href):
href = href.replace('handbook-3-annexes', 'handbook').strip() href = href.replace('handbook-annexes', 'handbook').strip()
return f'\t\t\t<li><a href="{href}">{title}</a></li>\n' return f'\t\t\t<li><a href="{href}">{title}</a></li>\n'
...@@ -78,7 +78,7 @@ localroot = os.getcwd() ...@@ -78,7 +78,7 @@ localroot = os.getcwd()
# generate the index properly speaking # generate the index properly speaking
cardDirs = ["internal", "external", "policies", "handbook-general", "handbook-additional", "handbook-annexes"] cardDirs = ["internal", "external", "policies"]
sections = [] sections = []
# determine first the directories # determine first the directories
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment