コマンドラインで辞書を引きたい
コマンドラインで辞書を引きたい
色々方法があるようだが、英英辞典なら pyvoc
というのがインストール、利用が簡便そう。
動作としては Oxford Dictionary API を利用しているようだ。
とりあえず辞書を引くだけなら下記の手順で終わる。
pyvoc
のインストール
$ pip3 install pyvoc
pyvoc
で「word」を引く。
$ pyvoc word
出力例(実際は多少色分けして表示される):
word Noun: single meaningful element of speech or writing example: I don't like the word ‘unofficial’ Verb: express something spoken or written example: he words his request in a particularly ironic way Interjection: used to express agreement or affirmation example: Word, that's a good record, man
参考ページ: