Created
October 10, 2009 23:19
-
-
Save sms420/207235 to your computer and use it in GitHub Desktop.
home baked wiki - html converter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #wiki_to_html.sh | |
| #converts wiki formatted doc to html | |
| find . -name "*.html" -exec sed -i 's/\[\[/\<a href="/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/|/.html">/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/\]\]/\<\/a\>/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/==/<h2>/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/<h2>$/<\/h2>/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/^$/<\/p><p>/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/\[http:/<a href="http:/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/.com\s/.com" target="_blank">/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/.org\s/.org" target="_blank">/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/href="pestec.com\//href="/g' '{}' \; | |
| find . -name "*.html" -exec sed -i 's/\]/<\/a>/g' '{}' \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment