From c55c04fc11aa8e2df1de3fe815f785bac491aa35 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sat, 6 Aug 2016 18:18:59 +0200 Subject: [PATCH 1/2] Digits code words from ITU/IMO added --- nato_converter.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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): From c721fab930e5e574f04f3789facab5613b0a5272 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sat, 6 Aug 2016 18:23:21 +0200 Subject: [PATCH 2/2] Examples fixed for the ITU/IMO alphabet --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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