summaryrefslogtreecommitdiff
path: root/repo/www/generate-index.py
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-04-12 20:00:08 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-04-12 20:37:05 +0200
commit629664bd50ed4e72cffc33bf2e7082119d483469 (patch)
treeef2d3a67c6e2e5030a1c542812980b4db1258db2 /repo/www/generate-index.py
parent05e08f7a2aa8caa8479501ccc6123baed695a06d (diff)
downloadmemory-leaks-629664bd50ed4e72cffc33bf2e7082119d483469.tar.xz
Finish fixing some files being inaccessible
Make generate-deps.py compute the list of indices instead of relying on the list of source folders that contain text files, otherwise we will miss intermediate folders that do not contain any file. Remove TODO entry to maintain Makefile dependencies to scripts: that sounds too tedious. Let's assume that at some point the Makefile and these scripts will be bundled together into a proper package.
Diffstat (limited to 'repo/www/generate-index.py')
-rwxr-xr-xrepo/www/generate-index.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/repo/www/generate-index.py b/repo/www/generate-index.py
index 3f777b9..96c5dc6 100755
--- a/repo/www/generate-index.py
+++ b/repo/www/generate-index.py
@@ -16,7 +16,7 @@ def parse_arguments():
help='File extensions to consider when recording pages.'
)
parser.add_argument(
- 'target', help='Folder to generate an index for.'
+ 'target', help='Pathspec to generate an index for.'
)
parser.add_argument(
'output', help='Path to the output file.'
@@ -61,13 +61,9 @@ def convert_page(content, output):
def main(arguments):
repo = Repo(search_parent_directories=True)
- target_path = arguments.target
+ target = arguments.target
extensions = arguments.extensions
- target = path.relpath(target_path, repo.working_dir)
- if target == '.':
- target =''
-
folders, files = list_files(extensions, target, repo)
names = []