Project

natophone

0.0
No commit activity in last 3 years
No release in over 3 years
Simple tool to encode/decode NATO alphabet. Use as a CLI, or as a library for your apps.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 10.0
~> 2.14

Runtime

~> 0.18
 Project Readme

travis

Coverage Status

NATOPhone

Simple tool to encode/decode NATO alphabet.

This was an exercise in making a Ruby CLI app following a set of constraints.

Installation

CLI

gem install natophone

Library

Add this line to your application's Gemfile:

gem 'natophone'

And then execute:

bundle

Usage

CLI

natophone encode Hello world.
natophone -E Hello world.
natophone -E 'Hello world.' 'Goodbye!'
natophone -E --yell Hello world.
natophone -E --json Hello world.
natophone decode hotel echo lima lima oscar - whiskey oscar romeo lima delta stop
natophone -D hotel echo lima lima oscar - whiskey oscar romeo lima delta stop
natophone -D 'hotel echo lima lima oscar' 'whiskey oscar romeo lima delta stop'
natophone -D --yell hotel echo lima lima oscar
natophone -D --json hotel echo lima lima oscar

Library

require 'natophone'
enc_by_string = NATOPhone::Encoder.new('hello world')
enc_by_array = NATOPhone::Encoder.new(['hello', 'world'])
dec_by_string = NATOPhone::Decoder.new('hotel echo lima lima oscar - whiskey oscar romeo lima delta')
dec_by_array = NATOPhone::Decoder.new(%w{hotel echo lima lima oscar - whiskey oscar romeo lima delta})