Skip to content

prikha/dickens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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

About

Ruby wraper over StarDict

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages