summaryrefslogtreecommitdiffstats
path: root/pkgs/sources/scripts/source/small_functions/nato.py
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 13:26:22 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 13:26:22 +0200
commit204731c0a69136c9cebcb54f1afecf5145e26bbe (patch)
treefc9132e5dc74e4a8e1327cdd411839a90f9410aa /pkgs/sources/scripts/source/small_functions/nato.py
parentrefactor(sys): Modularize and move to `modules/system` or `pkgs` (diff)
downloadnixos-config-204731c0a69136c9cebcb54f1afecf5145e26bbe.zip
refactor(pkgs): Categorize into `by-name` shards
This might not be the perfect way to organize a package set -- especially if the set is not nearly the size of nixpkgs -- but it is _at_ least a way of organization.
Diffstat (limited to 'pkgs/sources/scripts/source/small_functions/nato.py')
-rwxr-xr-xpkgs/sources/scripts/source/small_functions/nato.py106
1 files changed, 0 insertions, 106 deletions
diff --git a/pkgs/sources/scripts/source/small_functions/nato.py b/pkgs/sources/scripts/source/small_functions/nato.py
deleted file mode 100755
index e9d15f56..00000000
--- a/pkgs/sources/scripts/source/small_functions/nato.py
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env python3
-# originally from here: https://cgit.pacien.net/desktop-utilities/
-
-import sys
-
-alphabet = {
- "nato": {
- "A": "Alfa", # No idea why this is not just 'Alpha' ..
- "B": "Bravo",
- "C": "Charlie",
- "D": "Delta",
- "E": "Echo",
- "F": "Foxtrot",
- "G": "Golf",
- "H": "Hotel",
- "I": "India",
- "J": "Juliett",
- "K": "Kilo",
- "L": "Lima",
- "M": "Mike",
- "N": "November",
- "O": "Oscar",
- "P": "Papa",
- "Q": "Quebec",
- "R": "Romeo",
- "S": "Sierra",
- "T": "Tango",
- "U": "Uniform",
- "V": "Victor",
- "W": "Whiskey",
- "X": "X-ray",
- "Y": "Yankee",
- "Z": "Zulu",
- "0": "Nadazero",
- "1": "Unaone",
- "2": "Bissotwo",
- "3": "Terrathree",
- "4": "Kartefour",
- "5": "Pantafive",
- "6": "Soxisix",
- "7": "Setteseven",
- "8": "Oktoeight",
- "9": "Novenine",
- ",": "Comma",
- "/": "Forward slash",
- ".": "Stop/Decimal",
- },
- "german": {
- "A": "Aachen",
- "Ä": "Umlaut Aachen",
- "B": "Berlin",
- "C": "Chemnitz",
- "D": "Düsseldorf",
- "E": "Essen",
- "F": "Frankfurt",
- "G": "Goslar",
- "H": "Hamburg",
- "I": "Ingelheim",
- "J": "Jena",
- "K": "Köln",
- "L": "Leipzig",
- "M": "München",
- "N": "Nürnberg",
- "O": "Offenbach",
- "Ö": "Umlaut Offenbach",
- "P": "Potsdam",
- "Q": "Quickborn",
- "R": "Rostock",
- "S": "Salzwedel",
- "ẞ": "Eszett",
- "T": "Tübingen",
- "U": "Unna",
- "Ü": "Umlaut Unna",
- "V": "Völklingen",
- "W": "Wuppertal",
- "X": "Xanten",
- "Y": "Ypsilon",
- "Z": "Zwickau",
- },
-}
-
-
-def str_to_telephony(phrase, language):
- language_alphabet = alphabet[language]
-
- return [
- language_alphabet[c] if c in language_alphabet else c for c in phrase.upper()
- ]
-
-
-language = sys.argv[1]
-if language not in ["nato", "german"]:
- print(
- f"Langugae '{language}' is not a valid language, only 'nato' and 'german' are!",
- file=sys.stderr,
- )
- exit(1)
-
-print(
- "\n".join(
- str_to_telephony(
- " ".join(sys.argv[2:]),
- language,
- )
- )
-)