diff --git a/README.md b/README.md index af59cf0..9a4f164 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/nato_converter.py b/nato_converter.py index c5631aa..07a4b88 100755 --- a/nato_converter.py +++ b/nato_converter.py @@ -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):