Code Monkey home page Code Monkey logo

etym's Introduction

etym

Single, statically-linked binary to query EtymOnline from the command line. It formats the output nicely, using bold for keywords and italic for foreign words.

Installation

First, make sure you have Rust installed. Then:

cargo install --force etym

You can also build a deb package locally:

git clone https://github.com/conorsch/etym
cd etym
cargo deb

The package will be available at target/debian/*.deb.

Usage

$ etym viking
Viking (n.)
Scandinavian pirate, 1801, vikingr, in "The History of the Anglo-Saxons"
by English historian Sharon H. Turner (1768-1847); he suggested the second element
might be connected to king: The name by which the pirates were at first
distinguished was Vikingr, which perhaps originally meant kings of the bays.
It was in bays that they ambushed, to dart upon the passing voyager. But this
later was dismissed as incorrect. The form viking is attested in 1820,
in Jamieson's notes to "The Bruce." The word is a historians' revival; it was
not used in Middle English, but it was reintroduced from Old Norse vikingr
"freebooter, sea-rover, pirate, viking," which usually is explained as meaning
properly "one who came from the fjords," from vik "creek, inlet, small bay"
(cf. Old English wic, Middle High German wich "bay," and second
 element in Reykjavik). But Old English wicing and Old Frisian wizing
are almost 300 years older than the earliest attestation of the Old Norse word,
and probably derive from wic "village, camp" (large temporary camps were
a feature of the Viking raids), related to Latin vicus "village, habitation" (see villa).
The connection between the Norse and Old English words is still much debated.
The period of Viking activity was roughly 8c. to 11c. In the Anglo-Saxon Chronicle,
the raiding armies generally were referred to as þa Deniscan "the Danes," while
those who settled in England were identified by their place of settlement.
Old Norse viking (n.) meant "freebooting voyage, piracy;" one would
"go on a viking" ( fara í viking).

Requirements

  • Assumes Linux, but should be easy enough to build for other targets
  • Requires the Rust toolchain to build.

License

MIT

etym's People

Contributors

conorsch avatar

Stargazers

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

Watchers

 avatar  avatar

etym's Issues

Error: etym depends on BeautifulSoup 3.2.1

Hello @conorsch, I tried to install etym by running pip install etym but I got this error message:

Collecting etym
  Using cached etym-0.0.3.tar.gz (2.8 kB)
Collecting BeautifulSoup>=3.2.1
  Using cached BeautifulSoup-3.2.2.tar.gz (32 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/[email protected]/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-install-quvol25_/beautifulsoup_39e43ef940da40009e071c2ee55253b8/setup.py'"'"'; __file__='"'"'/private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-install-quvol25_/beautifulsoup_39e43ef940da40009e071c2ee55253b8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-pip-egg-info-vaqizoro
         cwd: /private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-install-quvol25_/beautifulsoup_39e43ef940da40009e071c2ee55253b8/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-install-quvol25_/beautifulsoup_39e43ef940da40009e071c2ee55253b8/setup.py", line 3
        "You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4'."
                                                                                                       ^
    SyntaxError: invalid syntax
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/40/f2/6c9f2f3e696ee6a1fb0e4d7850617e224ed2b0b1e872110abffeca2a09d4/BeautifulSoup-3.2.2.tar.gz#sha256=a04169602bff6e3138b1259dbbf491f5a27f9499dea9a8fbafd48843f9d89970 (from https://pypi.org/simple/beautifulsoup/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached BeautifulSoup-3.2.1.tar.gz (31 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/[email protected]/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-install-quvol25_/beautifulsoup_d75a3b52a65f49d19ed8cc8d5c45bfaf/setup.py'"'"'; __file__='"'"'/private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-install-quvol25_/beautifulsoup_d75a3b52a65f49d19ed8cc8d5c45bfaf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-pip-egg-info-1wam4m81
         cwd: /private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-install-quvol25_/beautifulsoup_d75a3b52a65f49d19ed8cc8d5c45bfaf/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/v5/8lhnnl6d03scr1mk91jgz9xw0000gn/T/pip-install-quvol25_/beautifulsoup_d75a3b52a65f49d19ed8cc8d5c45bfaf/setup.py", line 22
        print "Unit tests have failed!"
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Unit tests have failed!")?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/1e/ee/295988deca1a5a7accd783d0dfe14524867e31abb05b6c0eeceee49c759d/BeautifulSoup-3.2.1.tar.gz#sha256=6a8cb4401111e011b579c8c52a51cdab970041cc543814bbd9577a4529fe1cdb (from https://pypi.org/simple/beautifulsoup/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting etym
  Using cached etym-0.0.2.tar.gz (2.5 kB)
  Using cached etym-0.0.1.tar.gz (2.5 kB)
ERROR: Cannot install etym==0.0.1, etym==0.0.2 and etym==0.0.3 because these package versions have conflicting dependencies.

The conflict is caused by:
    etym 0.0.3 depends on BeautifulSoup>=3.2.1
    etym 0.0.2 depends on BeautifulSoup>=3.2.1
    etym 0.0.1 depends on BeautifulSoup>=3.2.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

I checked and I have BeautifulSoup4 (4.9.3).

Does the error occur because etym depends on BeautifulSoup 3.2.1? If so, is it possible to make etym work with BeautifulSoup4?

I looked at https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies but their example did not help me understand how to fix the above error message.

Thank you for building that script.

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.