{"id":13491778,"url":"https://github.com/zdict/zdict","last_synced_at":"2025-03-28T08:33:27.966Z","repository":{"id":30698271,"uuid":"34254274","full_name":"zdict/zdict","owner":"zdict","description":"The last online dictionary CLI framework you need.","archived":true,"fork":false,"pushed_at":"2023-06-24T14:35:47.000Z","size":834,"stargazers_count":633,"open_issues_count":48,"forks_count":47,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-27T04:49:59.310Z","etag":null,"topics":["cli","dictionary","itaigi","jisho-dictionary","moe-dictionary","oxford-dictionary","python","python3","python3-10","python3-7","python3-8","python3-9","spanish-dictionary","urban-dictionary","wiktionary","yahoo-dictionary","yandex-dictionary"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/zdict/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zdict.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-04-20T10:33:41.000Z","updated_at":"2025-03-17T16:25:24.000Z","dependencies_parsed_at":"2023-02-16T23:15:38.322Z","dependency_job_id":"ea734f5b-63b1-4442-9542-37857fb68fc1","html_url":"https://github.com/zdict/zdict","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdict%2Fzdict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdict%2Fzdict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdict%2Fzdict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zdict%2Fzdict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zdict","download_url":"https://codeload.github.com/zdict/zdict/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245996949,"owners_count":20707364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","dictionary","itaigi","jisho-dictionary","moe-dictionary","oxford-dictionary","python","python3","python3-10","python3-7","python3-8","python3-9","spanish-dictionary","urban-dictionary","wiktionary","yahoo-dictionary","yandex-dictionary"],"created_at":"2024-07-31T19:01:00.145Z","updated_at":"2025-03-28T08:33:27.542Z","avatar_url":"https://github.com/zdict.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"========================================\nzdict\n========================================\n\n|license| |version| |python version| |month download|\n\n|stars| |forks| |contributors| |pull requests| |issues|\n\n|github_actions| |circleci| |coveralls|\n\n|docker build status|\n\n|gitter|\n\n|pyup status|\n\n**[ ~ Dependencies scanned by PyUp.io ~ ]**\n\n----\n\nzdict is a CLI dictionary framework mainly focus on any kind of online dictionary.\nThis project originally forked from https://github.com/chenpc/ydict, which is a CLI tool for the Yahoo! online dictionary.\nAfter heavily refactoring the original project including:\n\n1. Change from Python 2 to Python 3\n2. Focus on being a flexible framework for any kind online dicitionaries, not only just a CLI tool for querying Yahoo! online dictionary.\n3. Based on an open source project skeleton.\n\nSo, we decided to create a new project.\n\n\n----\n\n.. contents:: Table of Contents\n\n----\n\n\nInstallation\n------------------------------\n\nfrom `PyPI \u003chttps://pypi.org/project/zdict/\u003e`_ :\n\n.. code-block:: sh\n\n    pip install zdict\n\n\nfrom `GitHub \u003chttps://github.com/zdict/zdict.git\u003e`_ :\n\n.. code-block:: sh\n\n    pip install git+https://github.com/zdict/zdict.git\n\n\nfrom `Docker Hub \u003chttps://hub.docker.com/r/zdict/zdict/\u003e`_ :\n\n.. code-block:: sh\n\n    # Pull the image of latest commit of master branch from Docker Hub\n    docker pull zdict/zdict\n\n    # Pull the image of latest release from Docker Hub\n    docker pull zdict/zdict:release\n\n    # Pull the image of specific release version from Docker Hub\n    docker pull zdict/zdict:${version}\n    docker pull zdict/zdict:v0.10.0\n\n\nHow to run the zdict docker image\n\n.. code-block:: sh\n\n    # Run interactive mode\n    docker run -it --rm --platform=linux/amd64 zdict/zdict         # latest commit\n    docker run -it --rm --platform=linux/amd64 zdict/zdict:release # latest release\n    docker run -it --rm --platform=linux/amd64 zdict/zdict:v0.10.0 # use zdict v0.10.0\n    docker run -it --rm --platform=linux/amd64 zdict/zdict:$tag    # with specific tag\n\n    # Run normal mode\n    docker run -it --rm --platform=linux/amd64 zdict/zdict apple bird         # latest commit\n    docker run -it --rm --platform=linux/amd64 zdict/zdict:release apple bird # latest release\n    docker run -it --rm --platform=linux/amd64 zdict/zdict:v0.10.0 apple bird # use zdict v0.10.0\n    docker run -it --rm --platform=linux/amd64 zdict/zdict:$tag apple bird    # with specific tag\n\n    # You can also add the options while using docker run either interactive mode or normal mode\n    docker run -it --rm --platform=linux/amd64 zdict/zdict:v0.10.0 -dt moe    # use moe dict in interactive mode\n    docker run -it --rm --platform=linux/amd64 zdict/zdict:v0.10.0 -dt moe 哈 # use moe dict in normal mode\n\nUsage\n------------------------------\n\n::\n\n\tusage: zdict [-h] [-v] [-d] [-t QUERY_TIMEOUT] [-j [JOBS]] [-sp] [-su]\n\t\t\t\t [-dt itaigi,moe,moe-taiwanese,spanish,oxford,jisho,yahoo,naer,wiktionary,urban,yandex,all]\n\t\t\t\t [-ld] [-V] [-c] [--dump [PATTERN]] [-D]\n\t\t\t\t [word [word ...]]\n\n\tpositional arguments:\n\t  word                  Words for searching its translation\n\n\toptional arguments:\n\t  -h, --help            show this help message and exit\n\t  -v, --version         show program's version number and exit\n\t  -d, --disable-db-cache\n\t\t\t\t\t\t\tTemporarily not using the result from db cache. (still\n\t\t\t\t\t\t\tsave the result into db)\n\t  -t QUERY_TIMEOUT, --query-timeout QUERY_TIMEOUT\n\t\t\t\t\t\t\tSet timeout for every query. default is 5 seconds.\n\t  -j [JOBS], --jobs [JOBS]\n\t\t\t\t\t\t\tAllow N jobs at once. Do not pass any argument to use\n\t\t\t\t\t\t\tthe number of CPUs in the system.\n\t  -sp, --show-provider  Show the dictionary provider of the queried word\n\t  -su, --show-url       Show the url of the queried word\n\t  -dt itaigi,moe,moe-taiwanese,spanish,oxford,jisho,yahoo,naer,wiktionary,urban,yandex,all, --dict itaigi,moe,moe-taiwanese,spanish,oxford,jisho,yahoo,naer,wiktionary,urban,yandex,all\n\t\t\t\t\t\t\tMust be seperated by comma and no spaces after each\n\t\t\t\t\t\t\tcomma. Choose the dictionary you want. (default:\n\t\t\t\t\t\t\tyahoo) Use 'all' for qureying all dictionaries. If\n\t\t\t\t\t\t\t'all' or more than 1 dictionaries been chosen, --show-\n\t\t\t\t\t\t\tprovider will be set to True in order to provide more\n\t\t\t\t\t\t\tunderstandable output.\n\t  -ld, --list-dicts     Show currently supported dictionaries.\n\t  -V, --verbose         Show more information for the queried word. (If the\n\t\t\t\t\t\t\tchosen dictionary have implemented verbose related\n\t\t\t\t\t\t\tfunctions)\n\t  -c, --force-color     Force color printing (zdict automatically disable\n\t\t\t\t\t\t\tcolor printing when output is not a tty, use this\n\t\t\t\t\t\t\toption to force color printing)\n\t  --dump [PATTERN]      Dump the querying history, can be filtered with regex\n\t  -D, --debug           Print raw html prettified by BeautifulSoup for\n\t\t\t\t\t\t\tdebugging.\n\n\nScreenshots\n------------------------------\n\n`Yahoo Dictionary \u003chttp://tw.dictionary.search.yahoo.com/\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n* Normal Mode\n\n``zdict hello``\n\n.. image:: http://i.imgur.com/iFTysUz.png\n\n\n* Interactive Mode\n\n``zdict``\n\n.. image:: http://i.imgur.com/NtbWXKH.png\n\n\n`Moe Dictionary 萌典 \u003chttps://www.moedict.tw\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: http://i.imgur.com/FZD4HBS.png\n\n.. image:: http://i.imgur.com/tF2S98h.png\n\n\n`Urban Dictionary \u003chttp://www.urbandictionary.com/\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: http://i.imgur.com/KndSJqz.png\n\n.. image:: http://i.imgur.com/nh62wi1.png\n\n\n`SpanishDict \u003chttp://www.spanishdict.com/\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: http://i.imgur.com/Ld2QVvP.png\n\n.. image:: http://i.imgur.com/HJ9h5JO.png\n\n\n`Jisho Japanese Dictionary \u003chttp://jisho.org/\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: http://i.imgur.com/63n3qmH.png\n\n.. image:: http://i.imgur.com/UMP8k4e.png\n\n\n`Yandex Translate \u003chttps://translate.yandex.com/\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: https://user-images.githubusercontent.com/2716047/29741879-ca1a3826-8a3a-11e7-9701-4a7e9a15971a.png\n\n\n`Oxford Dictionary \u003chttps://en.oxforddictionaries.com/\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: http://i.imgur.com/VkPEfKh.png\n\nTo use this source, you should first `apply \u003chttps://developer.oxforddictionaries.com/\u003e`_ an API key and place it under ``~/.zdict/oxford.key`` in the format::\n\n    app_id, app_key\n\n\n`Wiktionary \u003chttps://en.wiktionary.org/\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: https://i.imgur.com/5OzIFU3.png\n\n.. image:: https://i.imgur.com/UO5nQjU.png\n\n\n`iTaigi-愛台語 \u003chttps://itaigi.tw/\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: https://user-images.githubusercontent.com/1645228/55309799-656acd00-5491-11e9-9d79-4ae578c83f8b.jpg\n\n.. image:: https://user-images.githubusercontent.com/1645228/55309820-7582ac80-5491-11e9-998d-51ebfb183375.jpg\n\n\n`國家教育研究院 - 雙語詞彙、學術名詞暨辭書資訊網 \u003chttps://terms.naer.edu.tw/\u003e`_\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. image:: https://user-images.githubusercontent.com/1645228/86770837-e6951480-c083-11ea-95f2-51b1e6f7e04f.jpg\n\n.. image:: https://user-images.githubusercontent.com/1645228/86770828-e432ba80-c083-11ea-813a-e357f213826a.jpg\n\n\nDevelopment \u0026 Contributing\n---------------------------\n\nTesting\n^^^^^^^^\n\nDuring development, you can install our project as *editable*.\nIf you use `virtualenv`, you may want to create a new environment for `zdict`::\n\n    $ git clone https://github.com/zdict/zdict.git\n    $ cd zdict\n    $ pip install -e .\n\nOnce you installed it with the command above,\njust execute `zdict` after modification.\nNo need to install it again.\n\nInstall the packages for testing::\n\n    $ pip install -r requirements-test.txt\n\nor::\n\n    $ make install-test-deps\n\nUse the command below to execute the tests::\n\n    $ py.test\n\nor::\n\n    $ make test\n\nAfter runing testing, we will get a coverage report in html.\nWe can browse around it::\n\n    $ cd htmlcov\n    $ python -m http.server\n\nAlso, there is some configs for ``py.test`` in ``setup.cfg``.\nChange it if you need.\n\n\nDebugging\n^^^^^^^^^^\n\n``py.test`` can prompt ``pdb`` shell when your test case failed::\n\n    $ py.test --pdb\n\nor::\n\n    $ make test-with-pdb\n\n\nBug Report\n^^^^^^^^^^^\n\nFeel free to send a bug report to https://github.com/zdict/zdict/issues.\nPlease attach the error message and describe how to reproduce the bug.\nPR is also welcome.\n\nPlease use the ``-d/--disable-db-cache`` option to query before sending the bug report.\nSometimes we modify the data schema in database for a dictionary,\nbut the default dictionary query of zdict uses the cache in the database which may be stored within an old schema.\nThis might cause an error while showing the result.\nJust use the ``-d/--disable-db-cache`` to update the cache in database.\n\n\nRelated Projects\n------------------------------\n\n* `zdict.vim \u003chttps://github.com/zdict/zdict.vim\u003e`_\n    * A vim plugin integrates with zdict.\n* `zdict.sh \u003chttps://github.com/zdict/zdict.sh\u003e`_\n    * A collection of shell completion scripts for zdict.\n* `zdict_jupyter \u003chttps://github.com/zdict/zdict_jupyter\u003e`_\n    * Use zdict in Jupyter Notebook.\n\n\n\n.. |version| image:: https://img.shields.io/pypi/v/zdict.svg\n   :target: https://pypi.org/project/zdict\n\n.. |python version| image:: https://img.shields.io/pypi/pyversions/zdict.svg\n   :target: https://pypi.org/project/zdict\n\n.. |month download| image:: https://img.shields.io/pypi/dm/zdict.svg\n   :target: https://pypi.org/project/zdict\n\n.. |stars| image:: https://img.shields.io/github/stars/zdict/zdict.svg\n   :target: https://github.com/zdict/zdict/\n\n.. |forks| image:: https://img.shields.io/github/forks/zdict/zdict.svg\n   :target: https://github.com/zdict/zdict/\n\n.. |contributors| image:: https://img.shields.io/github/contributors/zdict/zdict.svg\n   :target: https://github.com/zdict/zdict/graphs/contributors\n\n.. |pull requests| image:: https://img.shields.io/github/issues-pr/zdict/zdict.svg\n   :target: https://github.com/zdict/zdict/pulls\n\n.. |issues| image:: https://img.shields.io/github/issues/zdict/zdict.svg\n   :target: https://github.com/zdict/zdict/issues\n\n.. |github_actions| image:: https://github.com/zdict/zdict/workflows/macOS%20testings/badge.svg\n   :target: https://github.com/zdict/zdict/actions\n\n.. |circleci| image:: https://circleci.com/gh/zdict/zdict.svg?style=svg\n   :target: https://circleci.com/gh/zdict/zdict\n\n.. |license| image:: https://img.shields.io/github/license/zdict/zdict.svg\n   :target: https://github.com/zdict/zdict/blob/master/LICENSE.md\n\n.. |gitter| image:: https://badges.gitter.im/Join%20Chat.svg\n   :alt: Join the chat at https://gitter.im/zdict/zdict\n   :target: https://gitter.im/zdict/zdict\n\n.. |coveralls| image:: https://coveralls.io/repos/zdict/zdict/badge.svg\n   :target: https://coveralls.io/github/zdict/zdict\n\n.. |docker build status| image:: https://img.shields.io/docker/cloud/build/zdict/zdict\n   :target: https://hub.docker.com/r/zdict/zdict\n\n.. |pyup status| image:: https://pyup.io/repos/github/zdict/zdict/shield.svg\n   :target: https://pyup.io/repos/github/zdict/zdict/\n   :alt: pyup.io badge\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdict%2Fzdict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzdict%2Fzdict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzdict%2Fzdict/lists"}