Skip to content
Browse files

main fix

  • Loading branch information...
1 parent 05e747e commit 421cac9c8209e40d7afb52f0012bc0f73711a521 prikha committed Oct 12, 2012
Showing with 58 additions and 5 deletions.
  1. +2 −0 CHANGELOG.md
  2. +51 −0 README.md
  3. +4 −3 lib/dickens.rb
  4. +0 −1 lib/dickens/dickens.rb
  5. +1 −1 lib/dickens/version.rb
View
2 CHANGELOG.md
@@ -1,3 +1,5 @@
+##v0.2.1
+*fixed inclusion bug and added readme
##v0.1.1
*Provided simple api for useing StarDict console version
View
51 README.md
@@ -1,14 +1,65 @@
#Dickens
+`gem install dickens`
+
## SDCV installation
+### Linux
+
+```sh
+ sudo apt-get install sdcv
+```
+
+### MacOS
+In Mac OS it is possible to install SDCV using Ports:
+
+```sh
+ 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
+
+```sh
+ tar -xjvf a.tar.bz2
+ mv a /usr/share/stardict/dic
+```
## API methods
### List
+After everything is installed you can list the dictionaries:
+
+```ruby
+ Dickens::StarDict.list
+```
### Find
+You can lookup desired definition through all dics at once:
+
+```ruby
+ Dickens::StarDict.find("Dickens")
+```
### Where
+Define dictionaries to lookup only inside those dics:
+```ruby
+ list=Dickens::StarDict.list
+ Dickens::StarDict.where("Dickens", [list[1], list[3]])
+```
### Configuration
+Change the path to executable:
+```ruby
+ Dickens::StarDict.executable = "./lib/my_sdcv"
+```
+
+Control your options
+```ruby
+ Dickens::StarDict.config :use_dict => false,
+ :utf8_input => true,
+ :utf8_output => true,
+ :non_interactive => true,
+ :data_dir=>false
+```
View
7 lib/dickens.rb
@@ -1,7 +1,4 @@
require "dickens/version"
-require "dickens/dickens"
-require "dickens/list_items"
-require "dickens/find_items"
require 'rbconfig'
require RbConfig::CONFIG['target_os'] == 'mingw32' && !(RUBY_VERSION =~ /1.9/) ? 'win32/open3' : 'open3'
@@ -14,6 +11,10 @@
require 'active_support/core_ext/blank'
end
+require "dickens/dickens"
+require "dickens/list_items"
+require "dickens/find_items"
+
class Object
##
# @person ? @person.name : nil
View
1 lib/dickens/dickens.rb
@@ -11,7 +11,6 @@ class StarDict
}
cattr_accessor :config, :executable
-
##Использование:
# sdcv [ПАРАМЕТР...] words
#
View
2 lib/dickens/version.rb
@@ -1,3 +1,3 @@
module Dickens
- VERSION = "0.1.1"
+ VERSION = "0.2.1"
end

0 comments on commit 421cac9

Please sign in to comment.
Something went wrong with that request. Please try again.