lines <- readLines("web.html")
# Use local css and javascript
lines <- gsub("http://www.w3.org/Talks/Tools/Slidy2/", "", lines)
# cannot use gzipped javascript locally
lines <- gsub("[.]gz", "", lines)
# Remove all prefix args from gridsvg calls
lines <- gsub(', prefix=.+)', ")", lines)
# Set up animation example to start on key press
lines <- gsub('begin="0s"', 'begin="accessKey(r)"', lines)
# Hack the result because I can't make it do what I want
unwanted <- grep('id="section"', lines)
writeLines(lines[-unwanted], "web.html")