aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinhard Leichtfuß <alguien@respiranto.de>2018-12-23 00:38:09 +0100
committerEinhard Leichtfuß <alguien@respiranto.de>2018-12-23 00:38:09 +0100
commit8427f2f38448129c69cc1b0f579296201003909f (patch)
treec7cc8b4cc680493a62ecffaadca32cc1cec14f6e
parentd5adf3ea792a000106539731bc5f7ac33ea57f3d (diff)
Improve correction of badly formed numbers
e.g. 1060 -> 10^60 if suggested by context
-rw-r--r--TODO2
-rwxr-xr-xupdate.sh12
2 files changed, 12 insertions, 2 deletions
diff --git a/TODO b/TODO
index 673e8b7..42bec21 100644
--- a/TODO
+++ b/TODO
@@ -3,3 +3,5 @@ Move dictd dependency to freedict-tools.
Notify on checksum change.
Check for update of freedict-tools.
+
+Use updpkgsums from pacman-contrib.
diff --git a/update.sh b/update.sh
index 92a4426..503ee22 100755
--- a/update.sh
+++ b/update.sh
@@ -32,7 +32,11 @@ prepare[deu-fra]=\
'prepare()
{
cd $_lang
- sed -i '"'"'s/\(10\)\(100\>.*1 mit 100 Nullen\)/\1\^\2/'"'"' ${_lang}.tei
+ sed -Ei \
+ -e '"'"'s/(10)(10)(100\>)(.*(1|Eins) mit einem Googol Nullen)/\1^(\2^\3)\4/'"'"' \
+ -e '"'"'s/(10)([1-9][0-9]*)(.*(1|Eins) mit \2 Nullen)/\1\^\2\3/'"'"' \
+ -e '"'"'s/(die Zahl 10)(60)/\1^\2/'"'"' \
+ ${_lang}.tei
}
'
prepare[deu-fra-bin]=\
@@ -40,7 +44,11 @@ prepare[deu-fra-bin]=\
{
cd $_lang
dictzip -d ${_lang}.dict.dz
- sed -i '"'"'s/\(10\)\(100\>.*1 mit 100 Nullen\)/\1\^\2/'"'"' ${_lang}.dict
+ sed -Ei \
+ -e '"'"'s/(10)(10)(100\>)(.*(1|Eins) mit einem Googol Nullen)/\1^(\2^\3)\4/'"'"' \
+ -e '"'"'s/(10)([1-9][0-9]*)(.*(1|Eins) mit \2 Nullen)/\1\^\2\3/'"'"' \
+ -e '"'"'s/(die Zahl 10)(60)/\1^\2/'"'"' \
+ ${_lang}.dict
dictzip ${_lang}.dict
}
'