diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-03-14 00:57:36 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-03-14 00:58:12 +0100 |
| commit | 676eb0e85ca242250dcf2463d5447ccc0a1c2114 (patch) | |
| tree | e654b572baafd05c995f33cf7264ee4a3aa4b7da /repo | |
| parent | 51e8ca3908b2b1d67403bcc17c027333618a931e (diff) | |
| download | memory-leaks-676eb0e85ca242250dcf2463d5447ccc0a1c2114.tar.xz | |
Turn READMEs into HTML indices
Diffstat (limited to 'repo')
| -rw-r--r-- | repo/www/TODO | 1 | ||||
| -rwxr-xr-x | repo/www/make-deps.py | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/repo/www/TODO b/repo/www/TODO index d8e68dc..4a9a976 100644 --- a/repo/www/TODO +++ b/repo/www/TODO @@ -1,4 +1,3 @@ -- READMEs ⇒ index.html - "leak count" on toplevel index - autogenerated index.html's for subfolders lacking READMEs - stylin' diff --git a/repo/www/make-deps.py b/repo/www/make-deps.py index d6720e5..92da680 100755 --- a/repo/www/make-deps.py +++ b/repo/www/make-deps.py @@ -22,8 +22,17 @@ def find_sources(top_dir): def html_path(source_path, top_dir, out_dir): - _, ext = path.splitext(source_path) - return source_path.replace(top_dir, out_dir).replace(ext, '.html') + fname = path.basename(source_path) + dname = path.dirname(source_path) + + name, _ = path.splitext(fname) + + if name == 'README': + name = 'index' + + return path.join( + out_dir, path.relpath(dname, top_dir), f'{name}.html' + ) def write_dependencies(output, sources, top_dir, out_dir): |
