summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Random <jack@random.to>2014-07-30 02:30:11 +0200
committerJack Random <jack@random.to>2014-07-30 02:30:11 +0200
commite0fb62f689ca95a8130ae7d31ecf8dcb0e0bfdfd (patch)
tree67b7cb8e41c5cd71638a88aff9944e517ef36176
parent3da28e2b8933f657e7d70cef0b2d51b66dd0d26c (diff)
use us-intl-altgr with this for editing html sites
-rwxr-xr-xscripts/umlauts.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/umlauts.sh b/scripts/umlauts.sh
new file mode 100755
index 0000000..30b0dd5
--- /dev/null
+++ b/scripts/umlauts.sh
@@ -0,0 +1,26 @@
+#!/bin/zsh
+# replace german umlauts and predefined character sequences
+# with html-entities in a file given as parameter
+# original script:
+# Michael Luthardt 2007
+# http://dr-luthardt.de/
+
+sed -i -e 's/\Ä/\&Auml;/g' \
+ -i -e 's/\ä/\&auml;/g' \
+ -i -e 's/\Ö/\&Ouml;/g' \
+ -i -e 's/\ö/\&ouml;/g' \
+ -i -e 's/\Ü/\&Uuml;/g' \
+ -i -e 's/\ü/\&uuml;/g' \
+ -i -e 's/\ß/\&szlig;/g' \
+ -i -e 's/\^-/\&ndash;/g' \
+ -i -e 's/\^ /\&nbsp;/g' \
+ -i -e 's/\^</\&lt;/g' \
+ -i -e 's/\^>/\&gt;/g' \
+ -i -e 's/\^&/\&amp;/g' \
+ -i -e 's/\^\^/\&#94;/g' \
+ -i -e 's/\^x/\&times;/g' \
+ -i -e 's/\^r/\&rarr;/g' \
+ -i -e 's/\^b/\&bull;/g' \
+ -i -e 's/\^e/\&#8644;/g' \
+$1
+