[gcompris/gcomprixogoo] Complete the usage of wiktio2xml
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris/gcomprixogoo] Complete the usage of wiktio2xml
- Date: Wed, 3 Nov 2010 21:07:50 +0000 (UTC)
commit e5465b3fab6b48dcbfdf2575b4860c93756febff
Author: Bruno Coudoin <bruno coudoin free fr>
Date: Tue Nov 2 23:28:48 2010 +0100
Complete the usage of wiktio2xml
tools/wiktio2xml/wiktio2xml.py | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/tools/wiktio2xml/wiktio2xml.py b/tools/wiktio2xml/wiktio2xml.py
index eac128f..519dc16 100755
--- a/tools/wiktio2xml/wiktio2xml.py
+++ b/tools/wiktio2xml/wiktio2xml.py
@@ -428,14 +428,12 @@ class WikiHandler(ContentHandler):
return inWord
-def usage():
- print "wiki2xml.py <wiki file> <word list file>"
-
# Set UTF-8 stdout in case of the user piping our output
reload(sys)
sys.setdefaultencoding('utf-8')
-parser = OptionParser()
+usage = "usage: %prog [options] wiktionary_dump.xml word_list.txt"
+parser = OptionParser(usage=usage)
parser.add_option("-o", "--output", dest="output",
help="write result to file or directory")
parser.add_option("-q", "--quiet",
@@ -450,7 +448,7 @@ parser.add_option("-s", "--site",
(options, args) = parser.parse_args()
if len(sys.argv) < 3:
- usage()
+ parser.print_help()
sys.exit()
wikiFile = sys.argv[1]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]