Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby wraper over StarDict
Ruby
branch: master

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

Dickens is made to work with great collections of StarDict Dictionaries - simple ruby wrapper around SDCV.

gem install dickens

SDCV installation

Linux

  sudo apt-get install sdcv

MacOS

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

  sudo 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

  sudo tar -xvzf downlaoded.tar.gz -C /usr/share/stardict/dic

Install dictionaries on Mac OS

mkdir -p $HOME/.stardict/dic
sudo tar -xvjf downloaded.tar.bz2 -C $HOME/.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.