Merge pull request #1 from adulau/master

ITU/IMO phonetic alphabets for digits added
This commit is contained in:
claudex 2016-08-07 09:57:09 +02:00 committed by GitHub
commit 32b3caa301
2 changed files with 16 additions and 7 deletions

View file

@ -1,6 +1,6 @@
#Nato converter
# NATO Phonetic Alphabet Converter
Convert list of character to the equivalent in NATO alphabet. And it takes care
Convert list of character to the equivalent in NATO alphabet and digits in ITU/IMO alphabet. And it takes care
of the capitals:
$ ./nato_converter.py aBc
@ -9,11 +9,10 @@ of the capitals:
This is useful to give password orally and avoid confusion:
$ ./nato_converter.py $( pwgen 8 1)
Mahngi8i: MIKE alpha hotel november golf india 8 india
Mahngi8i: MIKE alpha hotel november golf india Oktoeight india
If you don't specify an argument, it reads stdint:
If you don't specify an argument, it reads stdin:
$ pwgen 3 2 | ./nato_converter.py
Ym2 0Ge : YANKEE mike 2 0 GOLF echo
Ym20Ge: YANKEE mike Bissotwo Nadazero GOLF echo

View file

@ -30,7 +30,17 @@ table = {
"w": "whiskey",
"x": "x-ray",
"y": "yankee",
"z": "zulu"
"z": "zulu",
"0": "Nadazero",
"1": "Unaone",
"2": "Bissotwo",
"3": "Terrathree",
"4": "Kartefour",
"5": "Pantafive",
"6": "Soxisix",
"7": "Setteseven",
"8": "Oktoeight",
"9": "Novenine"
}
class IllegalStringSize(Exception):