aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-07 21:26:59 -0800
committerAustin Hellyer <[email protected]>2016-11-07 21:26:59 -0800
commit4e18da98f3398e1cc3b4c8f76bc8f81529baff3c (patch)
treeb70027219259df761af20ef927c2ba5395b8034c
parentAdd arguments to framework commands (diff)
downloadserenity-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.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs.py b/docs.py
new file mode 100644
index 0000000..ef00822
--- /dev/null
+++ b/docs.py
@@ -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)