Giter VIP home page Giter VIP logo

leximaven's Introduction

leximaven

Build Status npm version Standard - JavaScript Style Guide

Introduction

leximaven is a powerful tool for searching word-related APIs from the command line. It can fetch acronyms, bi-gram phrases, definitions, etymologies, example uses, hyphenation, offensive word flags, portmanteaus, pronunciations (Arpabet & IPA), related words, rhymes, slang, syllable stress and count, and more. See the wiki for more info.

Platform

Looking for testers on other platforms. Developed and tested on Linux. Works on Windows, see Windows below.

Supported Node.js versions:

  • Typescript
  • 12.x
  • 11.x
  • 10.x
  • 8.x

Install

Linux installation

To initialize the config file and load themes, your NODE_PATH environment variable must point to the node_modules directory of the Node.js installation. You can set this path automatically like this:

export NP=$(which node)
export BP=${NP%bin/node} #this replaces the string '/bin/node'
export LP="${BP}lib/node_modules"
export NODE_PATH="$LP"

Provided these lines are towards the end of the shell initialization file (at least after any NVM stuff) this should work for a system installation of Node.js and nvm.

Add all of this to .bashrc, .zshrc, etc. then:

npm install -g leximaven
leximaven config init

Windows installation

I highly recommend using nodist to install Node.js on Windows. It automatically sets %NODE_PATH% for you, though you may have to edit it to make sure it doesn't contain itself (i.e. C:......\node_modules;%NODE_PATH%). If you install Node.js manually, npm install --global leximaven will install the package in C:\Users\username\AppData\Roaming\npm\node_modules. And if you just do npm install leximaven then it will install the package to a subfolder of the Node.js installation, but that won't be the NODE_PATH folder unless you manually set it. Either way, you're going to have to mess around with Windows environment variables to get it to work. And don't forget to put your Wordnik API key into an environment variable WORDNIK

As for getting the ANSI color escape codes to work, Cmder seems to be the easiest way. It doesn't install a full linux environment like Cygwin, but you can still use some linux commands like which, cat, and ls.

Usage

leximaven has a built-in help system for CLI parameters and options. Access it with leximaven -h|--help [command] [subcommand]. There is also the wiki.

Here are some examples:

// Get definitions for 'catharsis'
leximaven wordnik define catharsis

// Get antonyms for 'noise'
leximaven wordnik relate --canon --type antonym noises

// Pronounce 'quixotic'
leximaven wordnik pronounce quixotic

// Get etymology for 'special'
leximaven wordnik origin special

// Get words that sound like 'blue'
leximaven datamuse get sl=blue

// Get slang/colloquialisms for 'diesel'
leximaven urban diesel

// Get anagrams with at least 2 letters in each word and a maximum of 3 words
// per anagram using short form flags and exporting to JSON
leximaven anagram -n2 -w3 -o anagrams.json toomanysecrets

// Get a wordmap for 'ubiquity'
leximaven wordmap ubiquity

Resources

The following links can help you use leximaven or perform related tasks.

Contributing

See CONTRIBUTING.

License

MIT ©️ 2017-2019 Andrew Prentice

Powered by

Acronym Server, Datamuse, Onelook, Rhymebrain, Urban Dictionary, and Wordnik

Extras

Prose

For fun, read some of my prose...

Take Command

See take-command.

leximaven's People

Contributors

dependabot[bot] avatar drawnepicenter avatar greenkeeper[bot] avatar scalarwaves avatar

Stargazers

 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

leximaven's Issues

Windows support

  • Use nodist to manage versions, it sets NODE_PATH, may have to fix env variable
  • Working in Windows 10 with Cmder
  • Without nodist, npm install --global gets installed in C:\Users*username*\AppData\Roaming\npm\node_modules
  • Without nodist, npm install gets installed in C:*node_installation\node_modules but leximaven bin is not found without manually setting the path

dependency err on install

upon sudo npm install -g leximaven, ubuntu linux

npm ERR! Error: No compatible version found: circuit-breaker-js@'Schibsted-Tech-Polska/circuit-breaker-js#v0.0.2'
npm ERR! Valid install targets:
npm ERR! ["0.0.0","0.0.1"]
npm ERR!     at installTargetsError (/usr/share/npm/lib/cache.js:719:10)
npm ERR!     at /usr/share/npm/lib/cache.js:638:10
npm ERR!     at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:142:7)
npm ERR!     at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7
npm ERR!     at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.13.0-74-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "leximaven"
npm ERR! cwd /home/ubuntu/leximaven
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/ubuntu/leximaven/npm-debug.log
npm ERR! not ok code 0

Figlet

Add the option to print figlet fonts for labels

Breaking changes

Many changes and fixes since last release warrants a BREAKING CHANGES release. Here are the potential breaking changes:
b0762db change labelling
9388081 fix(urban-hyphen): incorrect labelling
966e665 add return value
af53971 fix(themes): undefined/connector printing with label
1f5ea44 feat(tools): arrToStr function - extract single string from array
9e504d1 fix(onelook): extract strings from arrays - parsed object has single strings in arrays - Close #4 Onelook resource links option broken
ac11277 fix(urban): addtl args don't include 'urban'
77afb7d onelook limit check to tools
1b43aa9 datamuse limit check to tools
c339ffc rhymebrain limit check to tools
eb8c9e5 wordnik limit check to tools
a4a32fa fix(themes dir falls back)
194e123 fix(CI): theme dir gets set correctly - Load themes no matter what

Typescriptify

Make leximaven work with Typescript pleeeease!

  • Convert yargs to ts-yargs
  • Fix imports

Time remaining until API reset shows negative numbers

Affected: datamuse, possibly onelook
Possibly relevant: 2016-08-17T08:01:49-04:00 format vs 2016-08-16T23:37:21.160Z format
Source file(s): tools.js

99998/100000 requests remaining today, will reset in 14 hours, -523 minutes

Rate limiting

Context: For APIs that enforce a limit, a cap on the number of requests.
Suggested Lib: moment

Caching

Context: Cache HTTP responses to speed up requests and eventually limit unnecessary calls for APIs with limits
Suggested Lib: good-guy-http

2.x Changes

Possible breaking changes:

9eef640 fix(project) proper HTTP error msg
7e4d22a chore(package): update to babel-preset-latest, update pkgs
208250e feat(project): rename build dir to bin, simplify gulpfile,
file and dir names now match command names

Plaintext output

For terminals with ANSI escape issues, plaintext output should be an option

An in-range update of date-fns is breaking the build 🚨

Version 1.27.2 of date-fns just got published.

Branch Build failing 🚨
Dependency date-fns
Current Version 1.27.1
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

As date-fns is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ


Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details
Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

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.