feat: custom word list
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from cool_domain.word_list import WordList
|
||||
|
||||
from . import PKG_NAME, PKG_VERSION
|
||||
from .cache import Cache
|
||||
from .constants import LANGS
|
||||
@@ -14,10 +16,12 @@ def main() -> int:
|
||||
params = parse_parameters(sys.argv[1:])
|
||||
setup_logs(params)
|
||||
logging.getLogger().info("%s %s", PKG_NAME, PKG_VERSION)
|
||||
langs = LANGS
|
||||
langs["custom"] = WordList("custom", params.custom_words)
|
||||
with (
|
||||
Cache(filepath=params.cache_file, no_load=params.cache) as cache,
|
||||
TLDList(cache=cache, remote_uri=params.tld_list_uri) as tld_list,
|
||||
LANGS[params.lang] as word_list,
|
||||
langs[params.lang] as word_list,
|
||||
):
|
||||
factory = Factory(tld_list=tld_list, word_list=word_list, words=params.words)
|
||||
logging.getLogger().info(
|
||||
|
||||
Reference in New Issue
Block a user