Skip to content

SebastianSzturo/inaho

Repository files navigation

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

About

Create Dictionaries for Apple's Dictionary.app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages