Giter VIP home page Giter VIP logo

eazydict's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar keenwon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

eazydict's Issues

报错

环境信息

  • 系统及版本: Mac OSX 12.5
  • Node 版本: v8.1.2
  • 终端软件及版本: iTerm2 Build 3.0.15
  • EazyDict 版本: 最新

问题描述:

screen shot 2017-09-05 at 9 43 22 pm

请教大佬一个问题, 在项目文件夹里面, 如果直接用`node bin/cli fly in sky`来查词会报错, 百思不得其解, 详情见内容.

环境信息

  • 系统及版本: Windows 10 1909
  • Node 版本: nodejs 12.18.4
  • 终端软件及版本: cmd
  • EazyDict 版本: 2.1.0

问题描述:

在bin/cli里面的如下代码加一句console.log(argus);, 如果直接用node bin/cli fly in sky来查词会报错.

/**
 * 主程序
 */
program
  .usage('<words...>')
  .description('简单易用的命令行词典 https://github.com/keenwon/eazydict')
  .option('-s, --save', '查询单词,同时保存到生词本')
  .option('-r, --raw', '不转换为小写,查询原始的输入值')
  .action(function (...argus) {
    // 在这里加一句打印argus
    console.log(argus);
    const words = argus.slice(0, -1);
    const options = {
      save: program.save || false,
      raw: program.raw || false
    };

    lookup(words, options);
  });

直接用node bin/cli fly in sky来查词, 输出的argus如下:

[
  Command {
    _events: [Object: null prototype] {
      'option:save': [Function],
      'option:raw': [Function],
      '--help': [Function]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    commands: [
      [Command],
      [Command],
      [Command],
      [Command],
      [Command],
      [Command],
      [Command]
    ],
    options: [ [Option], [Option] ],
    parent: null,
    _allowUnknownOption: false,
    _args: [],
    rawArgs: [
      'C:\\Users\\jin7\\scoop\\apps\\nodejs-lts\\current\\node.exe',
      'C:\\development\\jsdev\\eazydict-origin\\bin\\cli',
      'fly',
      'in',
      'sky'
    ],
    _scriptPath: 'C:\\development\\jsdev\\eazydict-origin\\bin\\cli',
    _name: 'cli',
    _optionValues: {},
    _storeOptionsAsProperties: true,
    _storeOptionsAsPropertiesCalled: false,
    _passCommandToAction: true,
    _actionResults: [],
    _actionHandler: [Function: listener],
    _executableHandler: false,
    _executableFile: null,
    _defaultCommandName: null,
    _exitCallback: null,
    _aliases: [],
    _combineFlagAndOptionalValue: true,
    _hidden: false,
    _hasHelpOption: true,
    _helpFlags: '-h, --help',
    _helpDescription: 'display help for command',
    _helpShortFlag: '-h',
    _helpLongFlag: '--help',
    _hasImplicitHelpCommand: false,
    _helpCommandName: 'help',
    _helpCommandnameAndArgs: 'help [command]',
    _helpCommandDescription: 'display help for command',
    program: [Circular],
    Command: [class Command extends EventEmitter],
    Option: [class Option],
    CommanderError: [class CommanderError extends Error],
    _usage: '<words...>',
    _description: '简单易用的命令行词典 https://github.com/keenwon/eazydict',
    _argsDescription: undefined,
    args: [ 'fly', 'in', 'sky' ],
    [Symbol(kCapture)]: false
  },
  [ 'fly', 'in', 'sky' ]
]

通过npm install -g eazydict安装的, 用eazydict fly in sky来查词, 输出的argus如下:

[
  'fly',
  'in',
  'sky',
  Command {
    commands: [
      [Command],
      [Command],
      [Command],
      [Command],
      [Command],
      [Command],
      [Command]
    ],
    options: [ [Option], [Option] ],
    _execs: {},
    _allowUnknownOption: false,
    _args: [],
    _name: 'cli',
    Command: [Function: Command],
    Option: [Function: Option],
    _usage: '<words...>',
    _description: '简单易用的命令行词典 https://github.com/keenwon/eazydict',
    _argsDescription: undefined,
    _events: [Object: null prototype] {
      'option:save': [Function],
      'option:raw': [Function],
      'command:*': [Function: listener],
      'command:lookup': [Function: listener],
      'command:l': [Function: listener],
      'command:version': [Function: listener],
      'command:v': [Function: listener],
      'command:history': [Function: listener],
      'command:h': [Function: listener],
      'command:save': [Function: listener],
      'command:s': [Function: listener],
      'command:install': [Function: listener],
      'command:i': [Function: listener],
      'command:wordbook': [Function: listener],
      'command:w': [Function: listener],
      'command:status': [Function: listener],
      '--help': [Function]
    },
    _eventsCount: 17,
    rawArgs: [
      'C:\\Users\\jin7\\scoop\\apps\\nodejs-lts\\current\\node.exe',
      'C:\\Users\\jin7\\scoop\\apps\\nodejs-lts\\current\\bin\\node_modules\\eazydict\\bin\\cli',
      'fly',
      'in',
      'sky'
    ],
    args: [ 'fly', 'in', 'sky', [Circular] ]
  }
]

百思不得其解, 不知道为什么会这样? 直接在项目文件夹里面用node bin/cli fly in sky来查词, 输出argus和全局安装的不同.
我看了commander的文档, 也不知道为何.
原谅我是菜鸟, 愿意打赏一下大佬.

Cannot work

环境信息

  • 系统及版本: 6.0.9
  • Node 版本: 19.1
  • 终端软件及版本:
  • EazyDict 版本: latest

问题描述:

❯ eazydict --help
/usr/lib/node_modules/eazydict/node_modules/global-npm/index.js:37
      throw e
      ^

Error: The programmatic API was removed in npm v8.0.0
    at Object.<anonymous> (/usr/lib/node_modules/npm/index.js:4:9)
    at Module._compile (node:internal/modules/cjs/loader:1205:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
    at Module.load (node:internal/modules/cjs/loader:1068:32)
    at Module._load (node:internal/modules/cjs/loader:909:12)
    at Module.require (node:internal/modules/cjs/loader:1092:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at /usr/lib/node_modules/eazydict/node_modules/global-npm/index.js:29:15
    at Object.<anonymous> (/usr/lib/node_modules/eazydict/node_modules/global-npm/index.js:41:3)
    at Module._compile (node:internal/modules/cjs/loader:1205:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
    at Module.load (node:internal/modules/cjs/loader:1068:32)
    at Module._load (node:internal/modules/cjs/loader:909:12)
    at Module.require (node:internal/modules/cjs/loader:1092:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/usr/lib/node_modules/eazydict/node_modules/npmi/npmi.js:1:14)
    at Module._compile (node:internal/modules/cjs/loader:1205:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
    at Module.load (node:internal/modules/cjs/loader:1068:32)
    at Module._load (node:internal/modules/cjs/loader:909:12)
    at Module.require (node:internal/modules/cjs/loader:1092:19)
    at require (node:internal/modules/cjs/helpers:103:18)

Node.js v19.1.0

BTW, can it translate sentence?

sequelize deprecated

环境信息

  • 系统及版本: ubuntu 16.04
  • Node 版本: 6.11.4
  • 终端软件及版本: gnome terminal, bash
  • EazyDict 版本: 1.1.2

问题描述:

没有功能上的问题,每次运行这个程序会出现以下提示(需要更换一个包):

sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators .nvm/versions/node/v6.11.4/lib/node_modules/eazydict/node_modules/sequelize/lib/sequelize.js:236:13

想要有个可以选用词典的功能

环境信息

  • 系统及版本: os x 10.12
  • Node 版本: 8.9.4
  • 终端软件及版本: ...
  • EazyDict 版本:1.2.1

问题描述:

问题描述:

能不能增加一个功能: 在使用eazydict的时候用参数选择从哪个词典查询数据。
比方说我为了网络相应快,一般选择使用有道。但是有些时候个别词查不到,我又想选择google。期望能够提供一中如下结构的调用方式

eazydict -p youdao  robot

# 甚至是这样: 
eazydict -p y robot  # youdao
eazydict -p b robot  # bing
eazydict -p g robot  # google

that's all.

PS
谢谢你提供的工具
非常棒

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.