summaryrefslogtreecommitdiff
path: root/includes/zhtable/Makefile.py
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
commitca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch)
treeec04cc15b867bc21eedca904cea9af0254531a11 /includes/zhtable/Makefile.py
parenta22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff)
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing
Diffstat (limited to 'includes/zhtable/Makefile.py')
-rw-r--r--includes/zhtable/Makefile.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/includes/zhtable/Makefile.py b/includes/zhtable/Makefile.py
index a7822b0b..305422bd 100644
--- a/includes/zhtable/Makefile.py
+++ b/includes/zhtable/Makefile.py
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# -*- coding: utf-8 -*-
+# -*- coding: utf-8 -*-
# @author Philip
import tarfile as tf
import zipfile as zf
@@ -30,8 +30,9 @@ def unichr3( *args ):
return [unichr( int( i[2:7], 16 ) ) for i in args if i[2:7]]
# DEFINE
-SF_MIRROR = 'easynews'
-SCIM_TABLES_VER = '0.5.9'
+UNIHAN_VER = '5.2.0'
+SF_MIRROR = 'cdnetworks-kr-2'
+SCIM_TABLES_VER = '0.5.10'
SCIM_PINYIN_VER = '0.5.91'
LIBTABE_VER = '0.2.3'
# END OF DEFINE
@@ -44,7 +45,7 @@ def download( url, dest ):
if islinux:
# we use wget instead urlretrieve under Linux,
# because wget could display details like download progress
- os.system('wget %s' % url)
+ os.system( 'wget %s -O %s' % ( url, dest ) )
else:
print( 'Downloading from [%s] ...' % url )
urllib_request.urlretrieve( url, dest )
@@ -81,7 +82,8 @@ def parserCore( fp, pos, beginmark = None, endmark = None ):
elems = line.split()
if len( elems ) < 2:
continue
- elif len( elems[0] ) > 1:
+ elif len( elems[0] ) > 1 and \
+ len( elems[pos] ) > 1: # words only
mlist.add( elems[pos] )
return mlist
@@ -258,7 +260,7 @@ def PHPArray( table ):
def main():
#Get Unihan.zip:
- url = 'http://www.unicode.org/Public/UNIDATA/Unihan.zip'
+ url = 'http://www.unicode.org/Public/%s/ucd/Unihan.zip' % UNIHAN_VER
han_dest = 'Unihan.zip'
download( url, han_dest )