Progress bar detection updates.
This commit is contained in:
@ -147,8 +147,12 @@ class command:
|
|||||||
curl_match = re.search(
|
curl_match = re.search(
|
||||||
r"(\d+\s+\d+\s+\d+\s+\d+.*?(?:k|M|G)?.*?--:--:--|Speed)", text
|
r"(\d+\s+\d+\s+\d+\s+\d+.*?(?:k|M|G)?.*?--:--:--|Speed)", text
|
||||||
)
|
)
|
||||||
|
# Pattern 1e: General transfer progress (size, rate, time patterns)
|
||||||
|
transfer_match = re.search(
|
||||||
|
r"\d+\s+\d+[kMGT]?\s+\d+\s+\d+[kMGT]?.*?\d+\.\d+[kMGT].*?\d+:\d+:\d+", text
|
||||||
|
)
|
||||||
|
|
||||||
if time_match or token_match or dd_match or curl_match:
|
if time_match or token_match or dd_match or curl_match or transfer_match:
|
||||||
# For non-percentage progress, use a single activity beep every 2
|
# For non-percentage progress, use a single activity beep every 2
|
||||||
# seconds
|
# seconds
|
||||||
if (
|
if (
|
||||||
@ -183,7 +187,7 @@ class command:
|
|||||||
|
|
||||||
# Pattern 3: Progress bars ([#### ], [====> ], etc.)
|
# Pattern 3: Progress bars ([#### ], [====> ], etc.)
|
||||||
# Improved pattern to avoid matching IRC channels like [#channel]
|
# Improved pattern to avoid matching IRC channels like [#channel]
|
||||||
bar_match = re.search(r"\[([#=\-\*]+)([\s\.]*)\]", text)
|
bar_match = re.search(r"\[([#=\*]+)([\s\.\-]*)\]", text)
|
||||||
if bar_match:
|
if bar_match:
|
||||||
filled = len(bar_match.group(1))
|
filled = len(bar_match.group(1))
|
||||||
unfilled = len(bar_match.group(2))
|
unfilled = len(bar_match.group(2))
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
# Fenrir TTY screen reader
|
# Fenrir TTY screen reader
|
||||||
# By Chrys, Storm Dragon, and contributors.
|
# By Chrys, Storm Dragon, and contributors.
|
||||||
|
|
||||||
version = "2025.07.09"
|
version = "2025.07.13"
|
||||||
codeName = "testing"
|
codeName = "testing"
|
||||||
code_name = "testing"
|
code_name = "testing"
|
||||||
|
Reference in New Issue
Block a user