Project

beta_code

0.0
Low commit activity in last 3 years
No release in over a year
Gem to convert from Ancient Greek Beta Code to Unicode characters and vice versa
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.10
~> 3.2
 Project Readme

Beta Code Converter for Ruby

Converts Greek Beta Code to Greek characters and vice versa.

Installation

Add this line to your application's Gemfile:

gem 'beta_code'

And then execute:

$ bundle

Or install it yourself as:

$ gem install beta_code

(See project at rubygems.org)

Usage

require 'beta_code'

BetaCode.greek_to_beta_code 'χαῖρε ὦ κόσμε'
# => 'xai=re w)= ko/sme'

BetaCode.beta_code_to_greek 'mh=nin a)/eide qea\\ *phlhi+a/dew *)axilh=os'
# => 'μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος'

With additional mappings

BetaCode.beta_code_to_greek('f2a/nac', custom_map: { f2: 'ϝ' })
# => 'ϝάναξ'

Tests

bundle exec ruby test/test_beta_code.rb

Updating JSON

git subtree pull --prefix vendor/beta-code-json/ https://github.com/perseids-tools/beta-code-json master --squash

In the case of a merge conflict:

git checkout --theirs vendor/beta-code-json/
git add vendor/beta-code-json
git commit

Publishing

  • Bump version in beta_code.gemspec
  • Run bundle
  • Commit and push to GitHub
  • On GitHub, create a new release
  • Run gem build beta_code.gemspec
  • Run gem push beta_code-X.Y.Z.gem

Notes

For the mappings between Beta Code and Unicode, see https://github.com/perseids-tools/beta-code-json.