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

Unified 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: Added -men's 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fa_IR.aff ('k') | update_scowl_dictionaries.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: update_dictionaries.py
diff --git a/update_dictionaries.py b/update_dictionaries.py
new file mode 100755
index 0000000000000000000000000000000000000000..5bf157a243baba87a1c4d7a64d1d994c146eff9a
--- /dev/null
+++ b/update_dictionaries.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""A simple script for downloading latest dictionaries."""
+
+import os
+import sys
+import urllib
+from zipfile import ZipFile
+
+
+def main():
+ if not os.getcwd().endswith("hunspell_dictionaries"):
+ print "Please run this file from the hunspell_dictionaries directory"
+ return 1
+ dictionaries = (
+ ("http://downloads.sourceforge.net/wordlist/"
+ "hunspell-en_US-2015.08.24.zip",
please use gerrit instead 2016/03/18 17:46:20 btw, the latest versions are 2016.01.19.
+ "en_US.zip"),
+ ("http://downloads.sourceforge.net/wordlist/"
+ "hunspell-en_CA-2015.08.24.zip",
+ "en_CA.zip"),
+ ("http://downloads.sourceforge.net/lilak/"
+ "lilak_fa-IR_2-0.zip",
+ "fa_IR.zip")
+ )
+ for pair in dictionaries:
+ urllib.urlretrieve(pair[0], pair[1])
+ ZipFile(pair[1]).extractall()
+ os.remove(pair[1])
+ return 0
+
+if __name__ == "__main__":
+ sys.exit(main())
« 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