Project

inaho

0.01
No commit activity in last 3 years
No release in over 3 years
Easily create Dictionaries for Apple's Dictionary.app
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

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