Skip to main content

A tiny command-line dictionary that scrapes youdao.com. Just for fun.

Project description

Dict-tiny

PyPI version

Dict-tiny is a command-line utility that can translate English and Chinese words, which makes it easy to translate words from command-line interface. Just for fun :)

You can use dict-tiny in this way:

Translate an English word or Chinese word

$ dict-tiny book
book  [bʊk][bʊk]
===================
n. 书籍;卷;账簿;名册;工作簿
vt. 预订;登记
n. (Book)人名;()(广东话·威妥玛)()北;()
$ dict-tiny 书
书  [shū]
=========
n.book;letter;script
vt.write

Translate the word in clipboard

Use -c/--clipboard to translate the word in clipboard:

$ dict-tiny -c
命令行  
======
command line

Note:

  • -c/--clipboard has high priority. If you add -c and a word at the same time, the word will be considered invalid.

Get more detail translation about the word

Use -m/--more to get more detail translation:

$ dict-tiny 曾经 -m
曾经  [céng jīng]
=================
adv.once;ever

more detail:
======== 副词 ========
1:
  (表示有过某些行为或情况) once:
  He once lived in Shanghai.
  他曾经在上海住过。
  She has taken part in a major battle for oil.
  她曾经参加过石油大会战。
$ dict-tiny dictionary -m
dictionary  ['dɪkʃ(ə)n(ə)rɪ]美['dɪkʃə'nɛri]
=============================================
n. 字典;词典

more detail (collins):
======== N-COUNT 可数名词 ========
 · 词典

A dictionary is a book in which the words and phrases of a language are listed alphabetically, together with their meanings or their translations in another language.


 例: ...a Spanish-English dictionary.
     …一本西班牙语—英语词典。

Note:

  • You can use -c and -m at the same time, which means get more detail translation about the word in clipboard.
  • Some words have a lot of translation that may occupy the entire screen.

Installation

You can install dict-tiny via the pip package manager.

$ pip3 install dict-tiny

Upgrading

$ pip3 install --upgrade dict-tiny

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dict-tiny-0.2.6.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

dict_tiny-0.2.6-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file dict-tiny-0.2.6.tar.gz.

File metadata

  • Download URL: dict-tiny-0.2.6.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.2

File hashes

Hashes for dict-tiny-0.2.6.tar.gz
Algorithm Hash digest
SHA256 43b0f19e0a0b839f1cb106058debd5c384b637c3a404713474f25210a2bbdd13
MD5 228080b972b576da418efb64a630083d
BLAKE2b-256 dd7bdb8cf0a812822def6cad81dc5a3321f3bc9190ad2828bb1115308dcd6ab4

See more details on using hashes here.

File details

Details for the file dict_tiny-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: dict_tiny-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.2

File hashes

Hashes for dict_tiny-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 31819728c810bcee1b9ce90a98b9abbe66047bcf5fc026c71a408630aa194997
MD5 5045da6d2882debf5631d9ee0649f9ee
BLAKE2b-256 887034aede30f684005f1d705c72a08ebfddd8ce48b93200c79563dd814674c7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page