Project

lyracyst

0.0
No commit activity in last 3 years
No release in over 3 years
See Leximaven https://github.com/drawnepicenter/leximaven.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.14
~> 1.13
~> 0.8
~> 11.3
~> 0.9
~> 0.9

Runtime

~> 2.14
~> 2.4
~> 1.12
~> 0.5
~> 1.6
~> 2.1
~> 0.6
~> 0.2
 Project Readme

lyracyst

NOTICE Lyracyst is no longer maintained. I may do bug fixes if requested but honestly I prefer my @drawnepicenter account and Lyracyst's successor Leximaven. So long (for now) Ruby, hello Node.js and other languages/platforms.

lyracyst

Constellation Lyra photo by Scott Roy Atwood

Build Status Gem Version Dependency Status Code Climate Coverage Status lyracyst API Documentation

Lyracyst is extremely powerful. It talks to Wordnik, Rhymebrain, Urban Dictionary, Wordsmith, and Onelook.com. It can fetch 16 kinds of related words, 27 parts of speech definitions, anagrams, ARPABET pronunciations, bi-gram phrases, etymologies, example uses, hyphenation, IPA pronunciations, multiple dictionaries, offensive word flags, portmanteaus, rhymes, slang, and syllable stress and count. See the wiki for more info. I was partially inspired by Finnegans Wake; I believed I could create a tool that could be used to write a book like Finnegans Wake in a very short time. James Joyce dedicated 17 years of his life to this novel, and as a tribute to him, I've tried to accelerate the process.

Platform

Lyracyst was designed with POSIX systems in mind, though it should work on Windows with something like ansicon. Ruby 2.0 supposedly added support for ANSI on Windows. Because it supports multiple adapters, it should run on most Ruby implementations.

Lyracyst is tested on the following Ruby versions:

  • MRI 1.9.2
  • MRI 1.9.3
  • MRI 2.1.4
  • Rubinius 2.2.10

Synopsis

Search Wordnik, Rhymebrain, Onelook, Wordsmith, and Urban Dictionary from the command line. Lyracyst defaults used to be opinionated in that they were set based on the following benchmark links I ran on httpi, multi_json, and multi_xml. All three multi-adapter libraries automatically try to select the 'best' available adapter. My defaults are currently based on the benchmarks, your optimal setup may differ. Remember, the config file in ~/.lyracyst.yml can be used to override the defaults. See Defaults for more information. Get a Wordnik API key as follows:

Put it in an environment variable WORDNIK. Add it to .bashrc, .zshrc, Windows env, etc. This allows TravisCI to be used for continuous integration.

Features

  • Extensible
  • JSON/XML parsing
  • JSON/XML export
  • Definitions, phrases, related words, and resource links from onelook.com
  • Rhymes, word info, and portmanteaus from rhymebrain.com
  • Definitions from urbandictionary.com
  • Definitions, examples, related words, pronunciations, hyphenation, phrases, and etymologies from wordnik.com
  • Anagrams from wordsmith.org
  • Maps of word info
  • Supports multiple HTTP clients with httpi
  • Supports multiple JSON parsers with multi_json
  • Supports multiple XML parsers with multi_xml

Planned Features

  • JSON/XML schema validation?
  • node.js version using Opal: Ruby in Javascript?
  • IRC interface?

Usage

Please refer to the CLI documentation or the wiki for all options and defaults.

gem install lyracyst
lyracyst wn def test
lyracyst rb rhy test
lyracyst urb test
lyracyst look test
lyracyst ana yankeedoodledandy
lyracyst wmap ubiquity
lyracyst --help
lyracyst help [command] [subcommand]

Motivation

I do a lot of writing and I wanted a tool for constructing song lyrics, poetry, and stories that rock.

Tests

Lyracyst uses Aruba and Spinach to test commandline features. To test, just run:

spinach

Developers

bundle install
rake lyracyst:define[test]

Contributing workflow

Here’s how we suggest you go about proposing a change to this project:

  1. Fork this project to your account.
  2. Create a branch for the change you intend to make.
  3. Make your changes to your fork.
  4. Send a pull request from your fork’s branch to our master branch.

Using the web-based interface to make changes is fine too, and will help you by automatically forking the project and prompting to send a pull request too.

License

The MIT License (MIT)

Copyright (c) 2015 Drew Prentice

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Gratitude

Many thanks to all contributors to the gems used in this project! And thanks to the creators and maintainers of the APIs that this tool consumes. Onelook, Rhymebrain, Urban Dictionary, Wordnik, and Wordsmith are awesome!