aboutsummaryrefslogtreecommitdiff
path: root/dicofr.py
diff options
context:
space:
mode:
Diffstat (limited to 'dicofr.py')
-rwxr-xr-xdicofr.py22
1 files changed, 18 insertions, 4 deletions
diff --git a/dicofr.py b/dicofr.py
index 9bef7ac..7e6888d 100755
--- a/dicofr.py
+++ b/dicofr.py
@@ -1,16 +1,32 @@
#!/bin/env python
+"""
+# Main file.
+
+A program to retrieve the definition of a french word (in french).
+
+Maybe extended to other languages later.
+"""
+
import sys
import argparse
import msgpack
import sqlite3
from os.path import exists
+import ui
+
+
+debug = False
+
+if debug:
+ DIR_PATH = 'assets/'
+else:
+ DIR_PATH = '/usr/share/dicofr/assets/'
-DIR_PATH = '/usr/share/dicofr'
sys.path.insert(-1, DIR_PATH)
-import ui
+
dico = 'dicofr.db'
@@ -102,8 +118,6 @@ if __name__ == '__main__':
const=get_def_sql_reg, default=get_def_sql,
help='search a definition using SQL regex, '
'_ to match a letter, %% to match a group of letters')
- parser.add_argument('-w', '--wordlist', dest='wordList',
- action='store_const', default='list_word.msgpack')
parser.add_argument('-m', '--matching', dest='matching', action='store_true',
help='search the french words that match the regex')
parser.add_argument('word', metavar='PATTERN', type=str,