Skip to content

Commit

Permalink
Implement almost functions
Browse files Browse the repository at this point in the history
- Auto-cache explanations of word
- Allow to cache words through specifing a word list file manually
- Add config file
- Provide a word list that I just use at `doc/word-list.txt'
  • Loading branch information
leetking authored and leetking committed Dec 29, 2018
1 parent 7330d9d commit ceda963
Show file tree
Hide file tree
Showing 6 changed files with 14,637 additions and 43 deletions.
11 changes: 8 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Usage

.. code-block:: text
usage: ldcv.py [-h] [-f] [--color {always,auto,never}] [-j]
[words [words ...]]
usage: ldcv [-h] [-f] [-j] [--cache CACHE] [-c CONFIG]
[--color {always,auto,never}]
[words [words ...]]
LongMan Console Version
Expand All @@ -22,10 +23,14 @@ Usage
-h, --help show this help message and exit
-f, --full print verbose explanations. Default to print first
three explanations
-j, --json dump the explanation with JSON style
--cache CACHE specify a word list file then cache words in it to
<cachefile>
-c CONFIG, --config CONFIG
specify a config file
--color {always,auto,never}
colorize the output. Default to "auto" or can be
"never" or "always"
-j, --json dump the explanation with JSON style
Installation
Expand Down
16 changes: 16 additions & 0 deletions doc/ldcvrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[main]
# show verbose explanations?
#full = false

[cache]
# the file to cache the explanation of word
# only support environment $HOME which means the user's home directory
#dbpath = $HOME/.cache/ldcv/ldcv-cache.db3

# the maximum threads to concurrently cache words from list file,
# but be care of that the server ban you IP
#threads-max = 20

[net]
# the maximum time to query a word, second
#timeout = 7
Loading

0 comments on commit ceda963

Please sign in to comment.