Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: update_dictionaries.py

Issue 1810993003: Updated en-* dictionaries to 7-0. Added fa-IR. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/hunspell_dictionaries.git@master
Patch Set: Trying to force upload fa_IR.dic Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fa_IR.aff ('k') | update_scowl_dictionaries.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import sys 7 import sys
8 import urllib 8 import urllib
9 from zipfile import ZipFile 9 from zipfile import ZipFile
10 10
11 def main(): 11 def main():
12 if not os.getcwd().endswith("hunspell_dictionaries"): 12 if not os.getcwd().endswith("hunspell_dictionaries"):
13 print "Please run this file from the hunspell_dictionaries directory" 13 print "Please run this file from the hunspell_dictionaries directory"
14 return 1 14 return 1
15 urllib.urlretrieve( 15 urllib.urlretrieve(
16 "http://downloads.sourceforge.net/wordlist/hunspell-en_US-2015.05.18.zip", 16 "http://downloads.sourceforge.net/wordlist/hunspell-en_US-2015.08.24.zip",
groby-ooo-7-16 2016/03/18 00:17:11 Three times is the charm for factoring out... dic
Kevin Bailey 2016/03/18 14:00:42 Done and linted.
17 "en_US.zip") 17 "en_US.zip")
18 urllib.urlretrieve( 18 urllib.urlretrieve(
19 "http://downloads.sourceforge.net/wordlist/hunspell-en_CA-2015.05.18.zip", 19 "http://downloads.sourceforge.net/wordlist/hunspell-en_CA-2015.08.24.zip",
20 "en_CA.zip") 20 "en_CA.zip")
21 urllib.urlretrieve(
22 "http://downloads.sourceforge.net/lilak/lilak_fa-IR_2-0.zip",
23 "fa_IR.zip")
21 ZipFile("en_US.zip").extractall() 24 ZipFile("en_US.zip").extractall()
22 ZipFile("en_CA.zip").extractall() 25 ZipFile("en_CA.zip").extractall()
26 ZipFile("fa_IR.zip").extractall()
23 os.remove("en_US.zip") 27 os.remove("en_US.zip")
24 os.remove("en_CA.zip") 28 os.remove("en_CA.zip")
29 os.remove("fa_IR.zip")
25 return 0 30 return 0
26 31
27 if __name__ == '__main__': 32 if __name__ == '__main__':
28 sys.exit(main()) 33 sys.exit(main())
OLDNEW
« no previous file with comments | « fa_IR.aff ('k') | update_scowl_dictionaries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698