summaryrefslogtreecommitdiff
path: root/de-sgm
diff options
context:
space:
mode:
Diffstat (limited to 'de-sgm')
-rwxr-xr-xde-sgm14
1 files changed, 10 insertions, 4 deletions
diff --git a/de-sgm b/de-sgm
index 0b9177d..fd4546e 100755
--- a/de-sgm
+++ b/de-sgm
@@ -1,7 +1,13 @@
#!/bin/sh
-
-egrep -v "^[[:space:]]*(<\?xml.*\?>|</?(mteval|doc|srcset|refset|translator|reviewer)[^>]*>)[[:space:]]*$" \
- | egrep -v "^[[:space:]]*<(url|description|keywords|talkid|title|translator|reviewer)[^>]*>.*</(url|description|keywords|talkid|title|translator|reviewer)>[[:space:]]*$" \
- | sed "s|<seg[^>]*>\s*||" | sed "s|\s*</seg>$||" | egrep -v "^[[:space:]]*<p>[[:space:]]*$|^[[:space:]]*</p>[[:space:]]*$"
+egrep -v -i "^[[:space:]]*(<\?xml.*\?>|</?(mteval|doc|srcset|refset|translator|reviewer)[^>]*>)[[:space:]]*$" \
+ | egrep -v -i "^[[:space:]]*<(url|description|keywords|talkid|title|translator|reviewer)[^>]*>.*</(url|description|keywords|talkid|title|translator|reviewer)>[[:space:]]*$" \
+ | sed "s|<seg[^>]*>\s*||" \
+ | sed "s|\s*</seg>\s*$||" \
+ | egrep -v -i "^[[:space:]]*<p>[[:space:]]*$|^[[:space:]]*</p>[[:space:]]*$" \
+ | sed "s|<speaker>\s*||" \
+ | sed "s|\s*</speaker>\s*$||" \
+ | sed "s|\s*<hl>\s*$||" \
+ | sed "s|\s*</hl>\s*$||" \
+ | grep -v -P "^\s*$"