nomadnet
Advanced tools
| import re | ||
| import unicodedata | ||
| import RNS | ||
| def strip_modifiers(text): | ||
| def process_characters(text): | ||
| result = [] | ||
| i = 0 | ||
| while i < len(text): | ||
| char = text[i] | ||
| category = unicodedata.category(char) | ||
| if category.startswith(('L', 'N', 'P', 'S')): | ||
| result.append(char) | ||
| i += 1 | ||
| elif category.startswith(('M', 'Sk', 'Cf')) or char in '\u200d\u200c': | ||
| i += 1 | ||
| else: | ||
| result.append(char) | ||
| i += 1 | ||
| return ''.join(result) | ||
| stripped = process_characters(text) | ||
| stripped = re.sub(r'[\uFE00-\uFE0F]', '', stripped) | ||
| stripped = re.sub(r'[\U000E0100-\U000E01EF]', '', stripped, flags=re.UNICODE) | ||
| stripped = re.sub(r'[\U0001F3FB-\U0001F3FF]', '', stripped, flags=re.UNICODE) | ||
| stripped = re.sub(r'[\u200D\u200C]', '', stripped) | ||
| return stripped |
| Metadata-Version: 2.4 | ||
| Name: nomadnet | ||
| Version: 0.9.2 | ||
| Version: 0.9.3 | ||
| Summary: Communicate Freely | ||
@@ -179,10 +179,13 @@ Home-page: https://github.com/markqvist/nomadnet | ||
| ``` | ||
| bc1p4a6axuvl7n9hpapfj8sv5reqj8kz6uxa67d5en70vzrttj0fmcusgxsfk5 | ||
| bc1pgqgu8h8xvj4jtafslq396v7ju7hkgymyrzyqft4llfslz5vp99psqfk3a6 | ||
| ``` | ||
| - Ethereum | ||
| ``` | ||
| 0xae89F3B94fC4AD6563F0864a55F9a697a90261ff | ||
| 0x91C421DdfB8a30a49A71d63447ddb54cEBe3465E | ||
| ``` | ||
| - Liberapay: https://liberapay.com/Reticulum/ | ||
| - Ko-Fi: https://ko-fi.com/markqvist | ||
| ## Development Roadmap | ||
@@ -203,4 +206,2 @@ | ||
| - Re-arrange buttons to be more consistent | ||
| - Input field for pages | ||
| - Post mechanism | ||
| - Term compatibility notice in readme | ||
@@ -207,0 +208,0 @@ - Selected icon in conversation list |
@@ -26,2 +26,3 @@ .dockerignore | ||
| nomadnet/nomadnet.py | ||
| nomadnet/util.py | ||
| nomadnet.egg-info/PKG-INFO | ||
@@ -49,2 +50,3 @@ nomadnet.egg-info/SOURCES.txt | ||
| nomadnet/ui/textui/Guide.py | ||
| nomadnet/ui/textui/Helpers.py | ||
| nomadnet/ui/textui/Interfaces.py | ||
@@ -51,0 +53,0 @@ nomadnet/ui/textui/Log.py |
@@ -1,1 +0,1 @@ | ||
| __version__ = "0.9.2" | ||
| __version__ = "0.9.3" |
@@ -10,2 +10,3 @@ import os | ||
| from LXMF import pn_announce_data_is_valid | ||
| from nomadnet.util import strip_modifiers | ||
@@ -233,3 +234,3 @@ class PNAnnounceHandler: | ||
| if source_hash in self.directory_entries: | ||
| return self.directory_entries[source_hash].display_name | ||
| return strip_modifiers(self.directory_entries[source_hash].display_name) | ||
| else: | ||
@@ -246,3 +247,3 @@ return None | ||
| else: | ||
| return dn+" <"+RNS.hexrep(source_hash, delimit=False)+">" | ||
| return strip_modifiers(dn)+" <"+RNS.hexrep(source_hash, delimit=False)+">" | ||
| else: | ||
@@ -256,3 +257,3 @@ return "<"+RNS.hexrep(source_hash, delimit=False)+">" | ||
| else: | ||
| return dn | ||
| return strip_modifiers(dn) | ||
| else: | ||
@@ -263,3 +264,3 @@ return "<"+RNS.hexrep(source_hash, delimit=False)+">" | ||
| if source_hash in self.directory_entries: | ||
| return self.directory_entries[source_hash].display_name | ||
| return strip_modifiers(self.directory_entries[source_hash].display_name) | ||
| else: | ||
@@ -266,0 +267,0 @@ return None |
@@ -14,2 +14,3 @@ import RNS | ||
| from nomadnet.vendor.Scrollable import * | ||
| from nomadnet.util import strip_modifiers | ||
@@ -817,3 +818,3 @@ class BrowserFrame(urwid.Frame): | ||
| self.attr_maps = markup_to_attrmaps(self.markup, url_delegate=self, fg_color=self.page_foreground_color, bg_color=self.page_background_color) | ||
| self.attr_maps = markup_to_attrmaps(strip_modifiers(self.markup), url_delegate=self, fg_color=self.page_foreground_color, bg_color=self.page_background_color) | ||
@@ -885,3 +886,3 @@ self.response_progress = 0 | ||
| self.attr_maps = markup_to_attrmaps(self.markup, url_delegate=self, fg_color=self.page_foreground_color, bg_color=self.page_background_color) | ||
| self.attr_maps = markup_to_attrmaps(strip_modifiers(self.markup), url_delegate=self, fg_color=self.page_foreground_color, bg_color=self.page_background_color) | ||
@@ -1038,3 +1039,3 @@ self.response_progress = 0 | ||
| self.attr_maps = markup_to_attrmaps(self.markup, url_delegate=self, fg_color=self.page_foreground_color, bg_color=self.page_background_color) | ||
| self.attr_maps = markup_to_attrmaps(strip_modifiers(self.markup), url_delegate=self, fg_color=self.page_foreground_color, bg_color=self.page_background_color) | ||
| self.response_progress = 0 | ||
@@ -1041,0 +1042,0 @@ self.response_speed = None |
+6
-5
| Metadata-Version: 2.4 | ||
| Name: nomadnet | ||
| Version: 0.9.2 | ||
| Version: 0.9.3 | ||
| Summary: Communicate Freely | ||
@@ -179,10 +179,13 @@ Home-page: https://github.com/markqvist/nomadnet | ||
| ``` | ||
| bc1p4a6axuvl7n9hpapfj8sv5reqj8kz6uxa67d5en70vzrttj0fmcusgxsfk5 | ||
| bc1pgqgu8h8xvj4jtafslq396v7ju7hkgymyrzyqft4llfslz5vp99psqfk3a6 | ||
| ``` | ||
| - Ethereum | ||
| ``` | ||
| 0xae89F3B94fC4AD6563F0864a55F9a697a90261ff | ||
| 0x91C421DdfB8a30a49A71d63447ddb54cEBe3465E | ||
| ``` | ||
| - Liberapay: https://liberapay.com/Reticulum/ | ||
| - Ko-Fi: https://ko-fi.com/markqvist | ||
| ## Development Roadmap | ||
@@ -203,4 +206,2 @@ | ||
| - Re-arrange buttons to be more consistent | ||
| - Input field for pages | ||
| - Post mechanism | ||
| - Term compatibility notice in readme | ||
@@ -207,0 +208,0 @@ - Selected icon in conversation list |
+5
-4
@@ -151,10 +151,13 @@ # Nomad Network - Communicate Freely | ||
| ``` | ||
| bc1p4a6axuvl7n9hpapfj8sv5reqj8kz6uxa67d5en70vzrttj0fmcusgxsfk5 | ||
| bc1pgqgu8h8xvj4jtafslq396v7ju7hkgymyrzyqft4llfslz5vp99psqfk3a6 | ||
| ``` | ||
| - Ethereum | ||
| ``` | ||
| 0xae89F3B94fC4AD6563F0864a55F9a697a90261ff | ||
| 0x91C421DdfB8a30a49A71d63447ddb54cEBe3465E | ||
| ``` | ||
| - Liberapay: https://liberapay.com/Reticulum/ | ||
| - Ko-Fi: https://ko-fi.com/markqvist | ||
| ## Development Roadmap | ||
@@ -175,4 +178,2 @@ | ||
| - Re-arrange buttons to be more consistent | ||
| - Input field for pages | ||
| - Post mechanism | ||
| - Term compatibility notice in readme | ||
@@ -179,0 +180,0 @@ - Selected icon in conversation list |
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
1137431
0.26%74
2.78%13087
0.53%