Skip to content
Create Dictionaries for Apple's Dictionary.app
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
vendor
.gitignore
.rspec
.travis.yml
Gemfile
Gemfile.lock
Guardfile
LICENSE.txt
README.md
Rakefile
inaho.gemspec

README.md

Inaho 🌾

Build Status Code Climate

A gem to easily build XML Files to create Dictionaries for Apple's Dictionary.app.

Requirements

Installation

Add this to your gemfile

  gem 'inaho'

and

  bundle

Usage

Create a Dictionary.

dictionary = Inaho::Dictionary.new

Add Entries to your Dictionary.

entry = Inaho::Entry.new(id: 1, title: "稲穂", yomi: "いなほ")
entry.add_index("稲穂")
entry.add_index("いなほ")
entry.add_index("inaho")
entry.add_index("ear (head) of rice")
entry.body = "<h3>稲穂 (いなほ)</h3> <ul><li>ear (head) of rice</li></ul>"

dictionary << entry

Build your Dictionary XML File

xml = dictionary.to_xml
File.write('./dictionary.xml', xml)

Create your Dictionary with Apple's Dictionary Development Kit.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
You can’t perform that action at this time.