diff --git a/scripts/update.py b/scripts/update.py
new file mode 100644
index 0000000..d407ca9
--- /dev/null
+++ b/scripts/update.py
@@ -0,0 +1,58 @@
+#!/usr/bin/python2.7
+
+import os
+import subprocess
+import fileinput
+import time
+
+# run generate_html.py
+print("generating html documentation from markdown")
+os.system("python generate_html.py")
+
+examples = "../examples/"
+
+'''
+# create readme files in examples with 'try it online' badges with permalinks
+examples_skip = ["multiprocess"]
+
+for dir in os.listdir(examples):
+    if not os.path.isdir(examples + dir):
+        continue
+    
+    # skip folders with more than 1 source file
+    sources = [s for s in os.listdir(examples + dir) if ".cpp" in s]
+    if dir in examples_skip or len(sources) > 1 or len(sources) == 0:
+        continue
+    
+    print("generating readme for example '" + examples + dir + "'")
+    
+    proc = subprocess.Popen('python send_to_wandbox.py ../doctest/ ' + examples + dir + "/" + sources[0], stdout = subprocess.PIPE)
+    url = proc.stdout.read().strip()
+    
+    if not url.startswith("http"):
+        print("skipping current example because of crappy url: '" + url + "'\n")
+        continue
+    
+    readme = open(examples + dir + "/README.md", "w")
+    readme.write("[![Try it online](https://img.shields.io/badge/try%20it-online-orange.svg)](" + url + ")")
+    readme.close()
+    os.system("git add " + examples + dir + "/README.md")
+'''
+
+# update main readme 'try it online' badge permalink
+print("updating main readme")
+proc = subprocess.Popen('python send_to_wandbox.py ../doctest/ ' + examples + "hello_world/main.cpp", stdout = subprocess.PIPE)
+url = proc.stdout.read().strip()
+
+readme_contents = ""
+for line in fileinput.input(["../README.md"]):
+    if line.startswith("[![Try it online]"):
+        readme_contents += "[![Try it online](https://img.shields.io/badge/try%20it-online-orange.svg)](" + url + ")\n"
+    else:
+        readme_contents += line
+
+readme = open("../README.md", "w")
+readme.write(readme_contents)
+readme.close()
+
+os.system("git add ../README.md")
