From 451d7bf0db58d42afc5a5086353558d227040dff Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 23 Nov 2020 03:41:54 +0100 Subject: Update everything --- dicofr.py | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'dicofr.py') 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, -- cgit v1.2.3-54-g00ecf