diff options
Diffstat (limited to 'repo/www/generate-deps.py')
| -rwxr-xr-x | repo/www/generate-deps.py | 28 |
1 files changed, 6 insertions, 22 deletions
diff --git a/repo/www/generate-deps.py b/repo/www/generate-deps.py index d88d333..f17e950 100755 --- a/repo/www/generate-deps.py +++ b/repo/www/generate-deps.py @@ -37,42 +37,26 @@ def pjoin(directory, item): def write_dependencies(deps_file, directories, top_dir, out_dir): pages = list() - indices = list() - autoindices = list() for dpath, d in directories.items(): - autoindex = True - src_dir = pjoin(top_dir, dpath) + html_dir = pjoin(out_dir, dpath) for f in d.files: src_path = path.join(src_dir, f) - name, _ = path.splitext(f) - deps = [src_path] - target = pages if name == 'README': - name = 'index' - deps.append(src_dir) - target = indices - autoindex = False + html_path = path.join(html_dir, 'index.html') + print(f'{html_path}: {src_path}', file=deps_file) + continue - html_dir = pjoin(out_dir, dpath) html_path = path.join(html_dir, name+'.html') - - print(f'{html_path}: {" ".join(deps)} | {html_dir}', file=deps_file) - target.append(html_path) - - if autoindex: - autoindices.append( - path.join(out_dir, dpath, 'index.html') - ) + print(f'{html_path}: {src_path} | {html_dir}', file=deps_file) + pages.append(html_path) print(file=deps_file) print(f'pages = {" ".join(pages)}', file=deps_file) - print(f'indices = {" ".join(indices)}', file=deps_file) - print(f'autoindices = {" ".join(autoindices)}', file=deps_file) def main(arguments): |
