summaryrefslogtreecommitdiffstats
path: root/cli/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'cli/utils.py')
-rw-r--r--cli/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/utils.py b/cli/utils.py
index 9831d4b..3825583 100644
--- a/cli/utils.py
+++ b/cli/utils.py
@@ -5,6 +5,7 @@
# Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
+import unicodedata
import json
import ipaddress
import re
@@ -65,3 +66,6 @@ def check_mac_address(addr):
print(addr.lower())
return False
+def remove_accents(text):
+ normalized_text = unicodedata.normalize('NFD', text)
+ return ''.join(c for c in normalized_text if unicodedata.category(c) != 'Mn')