npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eazydict

v2.1.0

Published

简单易用的命令行词典

Downloads

10

Readme

EazyDict

NPM version Build Status License Lgtm Alerts Lgtm Grade

简单易用的命令行词典,基于 Node 开发。支持 Linux、Mac(部分功能支持 Windows)

主要功能:

  • 中英互译
  • 输出翻译、音标、例句,并且可自由配置
  • 支持以插件形式集成词典,默认包含: Google, Bing, Youdao
  • 本地缓存,可设置缓存时长
  • 历史记录
  • 生词本
  • 支持代理(需要插件支持,内置的Google、Bing、Youdao插件已实现代理功能)
  • 可查询程序状态:累计查询次数,生词个数等
  • 更新提示:使用过程中会自动检测更新,并输出提示

效果图:

目录:

环境

运行 EazyDict 需要:

  • Node ( v8+ )
  • NPM

安装方法请查看 Node 官网:https://nodejs.org/

安装

使用 npm 安装,执行:

npm i -g eazydict

当然也可以使用 yarn

yarn global add eazydict

注意:因为依赖了 node-sqlite3,会直接根据你的系统下载预编译版本,可能会比较慢,安装时可以添加 --verbose 查看详情。

npm i -g eazydict --verbose

安装的相关详细信息可以查看: link

运行

直接执行 eazydict 或者 eazydict --help 可以看到详细的帮助信息:

$ eazydict --help

  Usage: eazydict <words...>

  简单易用的命令行词典 https://github.com/keenwon/eazydict


  Options:

    -s, --save  查询单词,同时保存到生词本
    -r, --raw   不转换为小写,查询原始的输入值
    -h, --help  output usage information


  Commands:

    lookup|l [options] <words...>  查询 words 的翻译
    version|v                      版本信息
    history|h [count]              显示最近查询的历史记录
    save|s                         保存上一次查询的单词、短语到生词本
    install|i <plugin-name>        安装插件
    wordbook|w                     打开生词本
    status                         显示统计信息

  Examples:

    查询短语 "fly in sky":
    $ eazydict fly in sky
    $ eazydict lookup fly in sky
    $ eazydict l fly in sky

    查询短语 "hello",同时保存到生词本:
    $ eazydict --save hello
    $ eazydict -s hello

    查看历史记录:
    $ eazydict history
    $ eazydict h

    保存上一次查询的单词、短语到生词本:
    $ eazydict save
    $ eazydict s

    打开生词本:
    $ eazydict wordbook
    $ eazydict w

    安装插件"eazydict-example":
    $ eazydict i eazydict-example
    $ eazydict install eazydict-example

    查看 EazyDict 版本信息:
    $ eazydict version
    $ eazydict v

插件

如果你有兴趣开发更多的插件,可以参考文档: EazyDict 插件开发

配置文件

EazyDict 第一次运行的时候,会自动生成配置文件 .eazydict.yml 到用户的的 Home 目录下。你可以根据自己的需求修改配置。参考 .eazydict.yml

本地缓存

EazyDict 会缓存你的查询过的单词。缓存使用 Sqlite,数据库文件在 ${home}/.eazydict/databasae.sqlite

DEBUG模式

当程序运行异常时(例如和你的配置文件不符),可以使用 DEBUG 模式查看更多信息

DEBUG=eazydict:core:* eazydict love

同样也可以单独查看插件的 DEBUG 信息,具体参数可以查看各插件文档 & 源码

本地数据的备份与恢复

原则上本地的数据只是缓存,使用过程中完全不用在意。但是如果你希望对数据进行备份,可以直接操作 ${home}/.eazydict/databasae.sqlite 文件

  • 备份:直接备份 database.sqlite 文件
  • 恢复:将备份的文件放在 ${home}/.eazydict/ 目录
  • 删除:直接删除 database.sqlite 文件

ChangeLog

see CHANGELOG.md

License

MIT.