Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby wraper over StarDict
Ruby
tree: 421cac9c82

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.irbrc
CHANGELOG.md
Gemfile
LICENCE
README.md
Rakefile
dickens.gemspec

README.md

Dickens

gem install dickens

SDCV installation

Linux

  sudo apt-get install sdcv

MacOS

In Mac OS it is possible to install SDCV using Ports:

  port install sdcv

Dictionaries

Lots of dics may be found across the net. The starting point may be (here)[http://www.stardict.org/download.php]

Install dictionaries on Linux

  tar -xjvf a.tar.bz2
  mv a /usr/share/stardict/dic

API methods

List

After everything is installed you can list the dictionaries:

  Dickens::StarDict.list

Find

You can lookup desired definition through all dics at once:

  Dickens::StarDict.find("Dickens")

Where

Define dictionaries to lookup only inside those dics:

  list=Dickens::StarDict.list
  Dickens::StarDict.where("Dickens", [list[1], list[3]])

Configuration

Change the path to executable:

  Dickens::StarDict.executable = "./lib/my_sdcv"

Control your options

  Dickens::StarDict.config :use_dict => false,
                           :utf8_input => true,
                           :utf8_output => true,
                           :non_interactive => true,
                           :data_dir=>false
Something went wrong with that request. Please try again.