From b80bff460a0f6826232cafce68cb75ef83543a23 Mon Sep 17 00:00:00 2001 From: Pedro Revez Date: Wed, 12 Jan 2022 00:22:26 +0000 Subject: [PATCH] Fixed CLI after last changes --- jisho_api/cli.py | 4 ++++ pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jisho_api/cli.py b/jisho_api/cli.py index 6b5b151..945cc93 100644 --- a/jisho_api/cli.py +++ b/jisho_api/cli.py @@ -142,6 +142,7 @@ def scrape_tokens(file_path: str): def request_word(word: str, cache: bool, no_cache: bool): """Uses jisho.org word search API. """ + from jisho_api.word.request import Word flag = (cache or _cache_enabled()) and not no_cache w = Word.request(word, cache=flag) if w: @@ -155,6 +156,7 @@ def request_word(word: str, cache: bool, no_cache: bool): def request_kanji(kanji: str, cache: bool, no_cache: bool): """Uses #kanji filter on jisho.org search engine. """ + from jisho_api.kanji.request import Kanji flag = (cache or _cache_enabled()) and not no_cache k = Kanji.request(kanji, cache=flag) if k: @@ -168,6 +170,7 @@ def request_kanji(kanji: str, cache: bool, no_cache: bool): def request_sentence(sentence: str, cache: bool, no_cache: bool): """Uses #sentences filter on jisho.org search engine. """ + from jisho_api.sentence.request import Sentence flag = (cache or _cache_enabled()) and not no_cache k = Sentence.request(sentence, cache=flag) if k: @@ -180,6 +183,7 @@ def request_sentence(sentence: str, cache: bool, no_cache: bool): def request_tokens(sentence: str, cache: bool, no_cache: bool): """jisho.org default search engine tokenizer. """ + from jisho_api.tokenize.request import Tokens flag = (cache or _cache_enabled()) and not no_cache k = Tokens.request(sentence, cache=flag) if k: diff --git a/pyproject.toml b/pyproject.toml index 2116d51..719266f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "jisho_api" -version = "0.1.7" +version = "0.1.8" description = "A jisho.org API and scraper in Python." license = "Apache-2.0" readme = "README.md"