summary refs log tree commit diff
path: root/language_updater.sh
diff options
context:
space:
mode:
authorClayton G. Hobbs <clay@lakeserv.net>2015-12-27 17:00:45 -0500
committerClayton G. Hobbs <clay@lakeserv.net>2015-12-27 17:00:45 -0500
commite4b693b2061a0e3d93feba4fa570df7424bbe0d4 (patch)
treed436cb5242d33971fe37949c83583ad4a9e15fc6 /language_updater.sh
parentc5578954ed54a8569014105fd75aa5fe07ba1c89 (diff)
Rewrote language_updater.sh in Python
At the same time, I moved the logic to check if the language should be
updated into the new LanguageUpdater class.  The README has been updated
to reflect the fact that you no longer need to do any of this manually
ever.
Diffstat (limited to 'language_updater.sh')
-rwxr-xr-xlanguage_updater.sh32
1 files changed, 0 insertions, 32 deletions
diff --git a/language_updater.sh b/language_updater.sh
deleted file mode 100755
index 5a2c232..0000000
--- a/language_updater.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-blatherdir=~/.config/kaylee
-blatherdatadir=~/.local/share/kaylee
-blathercachedir=~/.cache/kaylee
-sentences=$blatherdatadir/sentences.corpus
-sourcefile=$blatherdir/commands.conf
-tempfile=$blathercachedir/url.txt
-lmtoolurl=http://www.speech.cs.cmu.edu/cgi-bin/tools/lmtool/run
-
-cd $blatherdir
-
-sed -f - $sourcefile > $sentences <<EOFcommands
-  /^$/d
-  /^#/d
-  s/\:.*$//
-EOFcommands
-
-# upload corpus file, find the resulting dictionary file url
-curl -L -F corpus=@"$sentences" -F formtype=simple $lmtoolurl \
-  |grep -A 1 "base name" |grep http \
-  | sed -e 's/^.*\="//' | sed -e 's/\.tgz.*$//' | sed -e 's/TAR//' > $tempfile
-
-# download the .dic and .lm files
-curl -C - -O $(cat $tempfile).dic
-curl -C - -O $(cat $tempfile).lm
-
-# mv em to the right name/place
-mv *.dic $blatherdatadir/dic
-mv *.lm $blatherdatadir/lm
-
-rm $tempfile