summaryrefslogtreecommitdiff
path: root/runtime/spell/pl
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/spell/pl')
-rw-r--r--runtime/spell/pl/main.aap40
1 files changed, 10 insertions, 30 deletions
diff --git a/runtime/spell/pl/main.aap b/runtime/spell/pl/main.aap
index eb21c5e48..74cd1d58b 100644
--- a/runtime/spell/pl/main.aap
+++ b/runtime/spell/pl/main.aap
@@ -33,29 +33,19 @@ $SPELLDIR/pl.cp1250.spl : $FILES
#
# Fetching the files from
#
-HTTPDIR = http://www.kurnik.pl/slownik/ort/
+HTTPDIR = http://www.kurnik.pl/dictionary
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
# This is a bit tricky, since the file name includes the date.
pl_PL.aff pl_PL.dic: {buildcheck=}
:assertpkg tar bunzip2
- @from time import strftime, gmtime, time
- @for day in range(20):
- date = `strftime('%Y%m%d', gmtime(time() - day * 24 * 60 * 60))`
- base = alt-myspell-pl-$date
- fname = $base.tar.bz2
- :attr {fetch = $HTTPDIR/%file%} $fname
- @try:
- :fetch $fname
- ok = 1
- @except:
- ok = 0
- @if ok:
- @break
+ fname = alt-myspell-pl.tar.bz2
+ :attr {fetch = $HTTPDIR/%file%} $fname
+ :fetch $fname
:sys bunzip2 -c $fname | tar xf -
- :move $base/* .
- :deldir $base
+ :move alt-myspell-pl-20[0-9]*/* .
+ :deldir alt-myspell-pl-20[0-9]*
:delete $fname
@if not os.path.exists('pl_PL.orig.aff'):
:copy pl_PL.aff pl_PL.orig.aff
@@ -79,21 +69,11 @@ diff:
check:
:assertpkg tar bunzip2 diff
- @from time import strftime, gmtime, time
- @for day in range(20):
- date = `strftime('%Y%m%d', gmtime(time() - day * 24 * 60 * 60))`
- base = alt-myspell-pl-$date
- fname = $base.tar.bz2
- :attr {fetch = $HTTPDIR/%file%} $fname
- @try:
- :fetch $fname
- ok = 1
- @except:
- ok = 0
- @if ok:
- @break
+ fname = alt-myspell-pl.tar.bz2
+ :attr {fetch = $HTTPDIR/%file%} $fname
+ :fetch $fname
:sys bunzip2 -c $fname | tar xf -
- :cd $base
+ :cd alt-myspell-pl-20[0-9]*
@try:
@import stat
:sys $UNZIP ../pl_PL.zip