diff options
| author | Austin Hellyer <[email protected]> | 2016-11-07 21:26:59 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-07 21:26:59 -0800 |
| commit | 4e18da98f3398e1cc3b4c8f76bc8f81529baff3c (patch) | |
| tree | b70027219259df761af20ef927c2ba5395b8034c | |
| parent | Add arguments to framework commands (diff) | |
| download | serenity-4e18da98f3398e1cc3b4c8f76bc8f81529baff3c.tar.xz serenity-4e18da98f3398e1cc3b4c8f76bc8f81529baff3c.zip | |
Add doc modification script
This is a script to modify the docs in some fashion. Right now it just
adds an image to the header, but it will replace a couple of other
things, in a nicer fashion.
| -rw-r--r-- | docs.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -0,0 +1,12 @@ +import glob + +for filename in glob.glob("target/doc/serenity/**/*.html"): + print('Parsing {}'.format(filename)) + with open(filename) as f: + content = f.read() + + new_content = content.replace('<nav class="sidebar">\n', '<nav class="sidebar"><img src="https://docs.austinhellyer.me/serenity.rs/docs_header.png">\n', 1) + + if new_content != content: + with open(filename, 'w') as f: + f.write(new_content) |