mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-12-09 01:54:36 +01:00
Compare commits
32 Commits
quotes
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81b1db072c | ||
|
|
7659ee9a9e | ||
|
|
9939713075 | ||
|
|
170d4ebbd5 | ||
|
|
196a71fbd9 | ||
|
|
e48ff3d642 | ||
|
|
39e25532d7 | ||
|
|
25f563464b | ||
|
|
08bb5b41c9 | ||
|
|
486001a46c | ||
|
|
4e255b5f6e | ||
|
|
877040b086 | ||
|
|
c294b967ae | ||
|
|
16cc1fec8b | ||
|
|
fed6f6da60 | ||
|
|
89160497e4 | ||
|
|
beb621de97 | ||
|
|
b46fadd375 | ||
|
|
f0fbfab3b3 | ||
|
|
f83a3e16ce | ||
|
|
b309d23c8b | ||
|
|
d879a9de5c | ||
|
|
b419f8fb23 | ||
|
|
7a4a454376 | ||
|
|
e94ea49142 | ||
|
|
56415c7506 | ||
|
|
c8879e7998 | ||
|
|
8fb30edf31 | ||
|
|
3db6ee3a17 | ||
| e4520a14e8 | |||
|
|
b1bf2ea95f | ||
|
|
a4d5066156 |
@@ -3,17 +3,17 @@ arrow==1.4.0
|
|||||||
attrs==25.4.0
|
attrs==25.4.0
|
||||||
backports.functools-lru-cache==2.0.0
|
backports.functools-lru-cache==2.0.0
|
||||||
blurhash==1.1.5
|
blurhash==1.1.5
|
||||||
certifi==2025.10.5
|
certifi==2025.11.12
|
||||||
chardet==5.2.0
|
chardet==5.2.0
|
||||||
charset-normalizer==3.4.4
|
charset-normalizer==3.4.4
|
||||||
colorama==0.4.6
|
colorama==0.4.6
|
||||||
configobj==5.0.9
|
configobj==5.0.9
|
||||||
coverage==7.11.0
|
coverage==7.12.0
|
||||||
cx-Freeze==8.4.1
|
cx-Freeze==8.5.0
|
||||||
cx-Logging==3.2.1
|
cx-Logging==3.2.1
|
||||||
decorator==5.2.1
|
decorator==5.2.1
|
||||||
demoji==1.1.0
|
demoji==1.1.0
|
||||||
deepl==1.23.0
|
deepl==1.26.0
|
||||||
future==1.0.0
|
future==1.0.0
|
||||||
idna==3.11
|
idna==3.11
|
||||||
importlib-metadata==8.7.0
|
importlib-metadata==8.7.0
|
||||||
@@ -23,7 +23,7 @@ libretranslatepy==2.1.4
|
|||||||
lief==0.15.1
|
lief==0.15.1
|
||||||
Markdown==3.10
|
Markdown==3.10
|
||||||
Mastodon.py==2.1.4
|
Mastodon.py==2.1.4
|
||||||
numpy==2.3.4
|
numpy==2.3.5
|
||||||
oauthlib==3.3.1
|
oauthlib==3.3.1
|
||||||
packaging==25.0
|
packaging==25.0
|
||||||
pillow==12.0.0
|
pillow==12.0.0
|
||||||
@@ -32,9 +32,9 @@ pluggy==1.6.0
|
|||||||
psutil==7.1.3
|
psutil==7.1.3
|
||||||
pyenchant==3.3.0
|
pyenchant==3.3.0
|
||||||
pypiwin32==223
|
pypiwin32==223
|
||||||
Pypubsub==4.0.3
|
Pypubsub==4.0.7
|
||||||
PySocks==1.7.1
|
PySocks==1.7.1
|
||||||
pytest==8.4.2
|
pytest==9.0.2
|
||||||
python-dateutil==2.9.0.post0
|
python-dateutil==2.9.0.post0
|
||||||
python-magic-bin==0.4.14
|
python-magic-bin==0.4.14
|
||||||
python-vlc==3.0.21203
|
python-vlc==3.0.21203
|
||||||
@@ -49,8 +49,8 @@ sniffio==1.3.1
|
|||||||
sound_lib @ git+https://github.com/accessibleapps/sound_lib@a439f0943fb95ee7b6ba24f51a686f47c4ad66b2
|
sound_lib @ git+https://github.com/accessibleapps/sound_lib@a439f0943fb95ee7b6ba24f51a686f47c4ad66b2
|
||||||
sqlitedict==2.1.0
|
sqlitedict==2.1.0
|
||||||
twitter-text-parser==3.0.0
|
twitter-text-parser==3.0.0
|
||||||
types-python-dateutil==2.9.0.20251008
|
types-python-dateutil==2.9.0.20251115
|
||||||
urllib3==2.5.0
|
urllib3==2.6.0
|
||||||
win-inet-pton==1.1.0
|
win-inet-pton==1.1.0
|
||||||
winpaths==0.2
|
winpaths==0.2
|
||||||
wxPython==4.2.4
|
wxPython==4.2.4
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class Handler(object):
|
|||||||
addAlias=_("Add a&lias"),
|
addAlias=_("Add a&lias"),
|
||||||
addToList=None,
|
addToList=None,
|
||||||
removeFromList=None,
|
removeFromList=None,
|
||||||
details=_("Show user profile"),
|
details=_("S&how user profile"),
|
||||||
favs=None,
|
favs=None,
|
||||||
# In buffer Menu.
|
# In buffer Menu.
|
||||||
community_timeline =_("Create c&ommunity timeline"),
|
community_timeline =_("Create c&ommunity timeline"),
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ class autocompletionManageDialog(widgetUtils.BaseDialog):
|
|||||||
self.users = widgets.list(panel, _(u"Username"), _(u"Name"), style=wx.LC_REPORT)
|
self.users = widgets.list(panel, _(u"Username"), _(u"Name"), style=wx.LC_REPORT)
|
||||||
sizer.Add(label, 0, wx.ALL, 5)
|
sizer.Add(label, 0, wx.ALL, 5)
|
||||||
sizer.Add(self.users.list, 0, wx.ALL, 5)
|
sizer.Add(self.users.list, 0, wx.ALL, 5)
|
||||||
self.add = wx.Button(panel, -1, _(u"Add user"))
|
self.add = wx.Button(panel, -1, _(u"&Add user"))
|
||||||
self.remove = wx.Button(panel, -1, _(u"Remove user"))
|
self.remove = wx.Button(panel, -1, _(u"&Remove user"))
|
||||||
optionsBox = wx.BoxSizer(wx.HORIZONTAL)
|
optionsBox = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
optionsBox.Add(self.add, 0, wx.ALL, 5)
|
optionsBox.Add(self.add, 0, wx.ALL, 5)
|
||||||
optionsBox.Add(self.remove, 0, wx.ALL, 5)
|
optionsBox.Add(self.remove, 0, wx.ALL, 5)
|
||||||
|
|||||||
@@ -17,11 +17,6 @@ def compose_post(post, db, settings, relative_times, show_screen_names, safe=Tru
|
|||||||
text = _("Boosted from @{}: {}").format(post.reblog.account.acct, templates.process_text(post.reblog, safe=safe))
|
text = _("Boosted from @{}: {}").format(post.reblog.account.acct, templates.process_text(post.reblog, safe=safe))
|
||||||
else:
|
else:
|
||||||
text = templates.process_text(post, safe=safe)
|
text = templates.process_text(post, safe=safe)
|
||||||
# Handle quoted posts
|
|
||||||
if hasattr(post, 'quote') and post.quote != None and hasattr(post.quote, 'quoted_status') and post.quote.quoted_status != None:
|
|
||||||
quoted_user = post.quote.quoted_status.account.acct
|
|
||||||
quoted_text = templates.process_text(post.quote.quoted_status, safe=safe)
|
|
||||||
text = text + " " + _("Quoting @{}: {}").format(quoted_user, quoted_text)
|
|
||||||
filtered = utils.evaluate_filters(post=post, current_context="home")
|
filtered = utils.evaluate_filters(post=post, current_context="home")
|
||||||
if filtered != None:
|
if filtered != None:
|
||||||
text = _("hidden by filter {}").format(filtered)
|
text = _("hidden by filter {}").format(filtered)
|
||||||
|
|||||||
@@ -76,13 +76,6 @@ def render_post(post, template, settings, relative_times=False, offset_hours=0):
|
|||||||
else:
|
else:
|
||||||
text = process_text(post, safe=False)
|
text = process_text(post, safe=False)
|
||||||
safe_text = process_text(post)
|
safe_text = process_text(post)
|
||||||
# Handle quoted posts
|
|
||||||
if hasattr(post, 'quote') and post.quote != None and hasattr(post.quote, 'quoted_status') and post.quote.quoted_status != None:
|
|
||||||
quoted_user = post.quote.quoted_status.account.acct
|
|
||||||
quoted_text = process_text(post.quote.quoted_status, safe=False)
|
|
||||||
quoted_safe_text = process_text(post.quote.quoted_status, safe=True)
|
|
||||||
text = text + " " + _("Quoting @{}: {}").format(quoted_user, quoted_text)
|
|
||||||
safe_text = safe_text + " " + _("Quoting @{}: {}").format(quoted_user, quoted_safe_text)
|
|
||||||
filtered = utils.evaluate_filters(post=post, current_context="home")
|
filtered = utils.evaluate_filters(post=post, current_context="home")
|
||||||
if filtered != None:
|
if filtered != None:
|
||||||
text = _("hidden by filter {}").format(filtered)
|
text = _("hidden by filter {}").format(filtered)
|
||||||
|
|||||||
@@ -3,47 +3,23 @@ import demoji
|
|||||||
from html.parser import HTMLParser
|
from html.parser import HTMLParser
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
|
|
||||||
url_re = re.compile(r'<a\s*href=[\'|"](.*?)[\'"].*?>')
|
url_re = re.compile('<a\s*href=[\'|"](.*?)[\'"].*?>')
|
||||||
|
|
||||||
class HTMLFilter(HTMLParser):
|
class HTMLFilter(HTMLParser):
|
||||||
# Classes to ignore when parsing HTML
|
|
||||||
IGNORED_CLASSES = ["quote-inline"]
|
|
||||||
|
|
||||||
text = ""
|
text = ""
|
||||||
first_paragraph = True
|
first_paragraph = True
|
||||||
skip_depth = 0 # Track nesting depth of ignored elements
|
|
||||||
|
|
||||||
def handle_data(self, data):
|
def handle_data(self, data):
|
||||||
# Only add data if we're not inside an ignored element
|
self.text += data
|
||||||
if self.skip_depth == 0:
|
|
||||||
self.text += data
|
|
||||||
|
|
||||||
def handle_starttag(self, tag, attrs):
|
def handle_starttag(self, tag, attrs):
|
||||||
# Check if this tag has a class that should be ignored
|
if tag == "br":
|
||||||
attrs_dict = dict(attrs)
|
self.text = self.text+"\n"
|
||||||
tag_class = attrs_dict.get("class", "")
|
elif tag == "p":
|
||||||
|
if self.first_paragraph:
|
||||||
# Check if any ignored class is present in this tag
|
self.first_paragraph = False
|
||||||
should_skip = any(ignored_class in tag_class for ignored_class in self.IGNORED_CLASSES)
|
else:
|
||||||
|
self.text = self.text+"\n\n"
|
||||||
if should_skip:
|
|
||||||
self.skip_depth += 1
|
|
||||||
elif self.skip_depth == 0: # Only process tags if we're not skipping
|
|
||||||
if tag == "br":
|
|
||||||
self.text = self.text+"\n"
|
|
||||||
elif tag == "p":
|
|
||||||
if self.first_paragraph:
|
|
||||||
self.first_paragraph = False
|
|
||||||
else:
|
|
||||||
self.text = self.text+"\n\n"
|
|
||||||
else:
|
|
||||||
# We're inside a skipped element, increment depth for nested tags
|
|
||||||
self.skip_depth += 1
|
|
||||||
|
|
||||||
def handle_endtag(self, tag):
|
|
||||||
# Decrement skip depth when closing any tag while skipping
|
|
||||||
if self.skip_depth > 0:
|
|
||||||
self.skip_depth -= 1
|
|
||||||
|
|
||||||
def html_filter(data):
|
def html_filter(data):
|
||||||
f = HTMLFilter()
|
f = HTMLFilter()
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class ShowUserProfile(wx.Dialog):
|
|||||||
mainSizer.Add(privateSizer, 0, wx.ALL | wx.CENTER)
|
mainSizer.Add(privateSizer, 0, wx.ALL | wx.CENTER)
|
||||||
|
|
||||||
botSizer = wx.BoxSizer(wx.HORIZONTAL)
|
botSizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||||
botLabel = wx.StaticText(self.panel, label=_("&Bot account: "))
|
botLabel = wx.StaticText(self.panel, label=_("B&ot account: "))
|
||||||
botText = self.createTextCtrl(bullSwitch[user.bot], (30, 30))
|
botText = self.createTextCtrl(bullSwitch[user.bot], (30, 30))
|
||||||
botSizer.Add(botLabel, wx.SizerFlags().Center())
|
botSizer.Add(botLabel, wx.SizerFlags().Center())
|
||||||
botSizer.Add(botText, wx.SizerFlags().Center())
|
botSizer.Add(botText, wx.SizerFlags().Center())
|
||||||
@@ -154,7 +154,7 @@ class ShowUserProfile(wx.Dialog):
|
|||||||
discoverSizer.Add(discoverText, wx.SizerFlags().Center())
|
discoverSizer.Add(discoverText, wx.SizerFlags().Center())
|
||||||
mainSizer.Add(discoverSizer, 0, wx.ALL | wx.CENTER)
|
mainSizer.Add(discoverSizer, 0, wx.ALL | wx.CENTER)
|
||||||
|
|
||||||
posts = wx.Button(self.panel, label=_("{} p&osts. Click to open posts timeline").format(user.statuses_count))
|
posts = wx.Button(self.panel, label=_("{} pos&ts. Click to open posts timeline").format(user.statuses_count))
|
||||||
# posts.SetToolTip(_("Click to open {}'s posts").format(user.display_name))
|
# posts.SetToolTip(_("Click to open {}'s posts").format(user.display_name))
|
||||||
posts.Bind(wx.EVT_BUTTON, self.onPost)
|
posts.Bind(wx.EVT_BUTTON, self.onPost)
|
||||||
mainSizer.Add(posts, wx.SizerFlags().Center())
|
mainSizer.Add(posts, wx.SizerFlags().Center())
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ class UpdateProfileDialog(wx.Dialog):
|
|||||||
|
|
||||||
self.locked = wx.CheckBox(panel, label=_("&Private account"))
|
self.locked = wx.CheckBox(panel, label=_("&Private account"))
|
||||||
self.locked.SetValue(locked)
|
self.locked.SetValue(locked)
|
||||||
self.bot = wx.CheckBox(panel, label=_("&Bot account"))
|
self.bot = wx.CheckBox(panel, label=_("B&ot account"))
|
||||||
self.bot.SetValue(bot)
|
self.bot.SetValue(bot)
|
||||||
self.discoverable = wx.CheckBox(panel, label=_("&Discoverable account"))
|
self.discoverable = wx.CheckBox(panel, label=_("&Discoverable account"))
|
||||||
self.discoverable.SetValue(discoverable)
|
self.discoverable.SetValue(discoverable)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class mainFrame(wx.Frame):
|
|||||||
self.menuitem_search = self.menubar_application.Append(wx.ID_ANY, _(u"&Search"))
|
self.menuitem_search = self.menubar_application.Append(wx.ID_ANY, _(u"&Search"))
|
||||||
self.lists = self.menubar_application.Append(wx.ID_ANY, _(u"&Lists manager"))
|
self.lists = self.menubar_application.Append(wx.ID_ANY, _(u"&Lists manager"))
|
||||||
self.lists.Enable(False)
|
self.lists.Enable(False)
|
||||||
self.manageAliases = self.menubar_application.Append(wx.ID_ANY, _("Manage user aliases"))
|
self.manageAliases = self.menubar_application.Append(wx.ID_ANY, _("M&anage user aliases"))
|
||||||
self.keystroke_editor = self.menubar_application.Append(wx.ID_ANY, _(u"&Edit keystrokes"))
|
self.keystroke_editor = self.menubar_application.Append(wx.ID_ANY, _(u"&Edit keystrokes"))
|
||||||
self.account_settings = self.menubar_application.Append(wx.ID_ANY, _(u"Account se&ttings"))
|
self.account_settings = self.menubar_application.Append(wx.ID_ANY, _(u"Account se&ttings"))
|
||||||
self.prefs = self.menubar_application.Append(wx.ID_PREFERENCES, _(u"&Global settings"))
|
self.prefs = self.menubar_application.Append(wx.ID_PREFERENCES, _(u"&Global settings"))
|
||||||
@@ -56,7 +56,7 @@ class mainFrame(wx.Frame):
|
|||||||
self.trends = self.menubar_buffer.Append(wx.ID_ANY, _(u"New &trending topics buffer..."))
|
self.trends = self.menubar_buffer.Append(wx.ID_ANY, _(u"New &trending topics buffer..."))
|
||||||
self.filter = self.menubar_buffer.Append(wx.ID_ANY, _(u"Create a &filter"))
|
self.filter = self.menubar_buffer.Append(wx.ID_ANY, _(u"Create a &filter"))
|
||||||
self.manage_filters = self.menubar_buffer.Append(wx.ID_ANY, _(u"&Manage filters"))
|
self.manage_filters = self.menubar_buffer.Append(wx.ID_ANY, _(u"&Manage filters"))
|
||||||
self.find = self.menubar_buffer.Append(wx.ID_ANY, _(u"Find a string in the currently focused buffer..."))
|
self.find = self.menubar_buffer.Append(wx.ID_ANY, _(u"F&ind a string in the currently focused buffer..."))
|
||||||
self.load_previous_items = self.menubar_buffer.Append(wx.ID_ANY, _(u"&Load previous items"))
|
self.load_previous_items = self.menubar_buffer.Append(wx.ID_ANY, _(u"&Load previous items"))
|
||||||
self.menubar_buffer.AppendSeparator()
|
self.menubar_buffer.AppendSeparator()
|
||||||
self.mute_buffer = self.menubar_buffer.AppendCheckItem(wx.ID_ANY, _(u"&Mute"))
|
self.mute_buffer = self.menubar_buffer.AppendCheckItem(wx.ID_ANY, _(u"&Mute"))
|
||||||
@@ -66,8 +66,8 @@ class mainFrame(wx.Frame):
|
|||||||
|
|
||||||
# audio menu
|
# audio menu
|
||||||
self.menubar_audio = wx.Menu()
|
self.menubar_audio = wx.Menu()
|
||||||
self.seekLeft = self.menubar_audio.Append(wx.ID_ANY, _(u"&Seek back 5 seconds"))
|
self.seekLeft = self.menubar_audio.Append(wx.ID_ANY, _(u"Seek &back 5 seconds"))
|
||||||
self.seekRight = self.menubar_audio.Append(wx.ID_ANY, _(u"&Seek forward 5 seconds"))
|
self.seekRight = self.menubar_audio.Append(wx.ID_ANY, _(u"Seek &forward 5 seconds"))
|
||||||
|
|
||||||
# Help Menu
|
# Help Menu
|
||||||
self.menubar_help = wx.Menu()
|
self.menubar_help = wx.Menu()
|
||||||
|
|||||||
Reference in New Issue
Block a user