Rubka 7.1.11__py3-none-any.whl → 7.1.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rubka/metadata.py +23 -13
- {rubka-7.1.11.dist-info → rubka-7.1.12.dist-info}/METADATA +1 -1
- {rubka-7.1.11.dist-info → rubka-7.1.12.dist-info}/RECORD +6 -6
- {rubka-7.1.11.dist-info → rubka-7.1.12.dist-info}/WHEEL +0 -0
- {rubka-7.1.11.dist-info → rubka-7.1.12.dist-info}/entry_points.txt +0 -0
- {rubka-7.1.11.dist-info → rubka-7.1.12.dist-info}/top_level.txt +0 -0
rubka/metadata.py
CHANGED
|
@@ -3,16 +3,20 @@ from typing import Any, Dict, List
|
|
|
3
3
|
import markdownify
|
|
4
4
|
class Track_parsed:
|
|
5
5
|
_PATT = re.compile(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
r"(?P<pre>```(?P<pre_c>[\s\S]*?)```)"
|
|
7
|
+
r"|(?P<bold>\*\*(?P<bold_c>.*?)\*\*)"
|
|
8
|
+
r"|(?P<mono>`(?P<mono_c>.*?)`)"
|
|
9
|
+
r"|(?P<italic>__(?P<italic_c>.*?)__)"
|
|
10
|
+
r"|(?P<underline>--(?P<underline_c>.*?)--)"
|
|
11
|
+
r"|(?P<link>\[(?P<link_text>.*?)\]\((?P<link_url>\S+?)\))"
|
|
12
|
+
r"|(?P<quote>\$(?P<quote_c>[\s\S]*?)\$)"
|
|
13
|
+
r"|(?P<strike>~~(?P<strike_c>.*?)~~)"
|
|
14
|
+
r"|(?P<spoiler>\|\|(?P<spoiler_c>.*?)\|\|)",
|
|
15
|
+
flags=re.DOTALL,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
16
20
|
_TYPE_MAP = {
|
|
17
21
|
"pre": "Pre",
|
|
18
22
|
"bold": "Bold",
|
|
@@ -21,6 +25,7 @@ class Track_parsed:
|
|
|
21
25
|
"underline": "Underline",
|
|
22
26
|
"strike": "Strike",
|
|
23
27
|
"spoiler": "Spoiler",
|
|
28
|
+
"quote": "Quote",
|
|
24
29
|
"link": "Link",
|
|
25
30
|
}
|
|
26
31
|
|
|
@@ -55,18 +60,23 @@ class Track_parsed:
|
|
|
55
60
|
gname = m.lastgroup
|
|
56
61
|
if not gname:
|
|
57
62
|
continue
|
|
63
|
+
|
|
58
64
|
if gname == "link":
|
|
59
65
|
inner = m.group("link_text") or ""
|
|
60
66
|
link_href = m.group("link_url")
|
|
61
67
|
else:
|
|
62
68
|
inner = m.group(f"{gname}_c") or ""
|
|
63
69
|
link_href = None
|
|
64
|
-
|
|
70
|
+
if gname == "quote":
|
|
71
|
+
inner_metadata = self.transcribe(inner, mode="MARKDOWN")
|
|
72
|
+
inner = inner_metadata["text"]
|
|
73
|
+
if "metadata" in inner_metadata:
|
|
74
|
+
for part in inner_metadata["metadata"]["meta_data_parts"]:
|
|
75
|
+
part["from_index"] += adj_from
|
|
76
|
+
payload_parts.append(part)
|
|
65
77
|
if inner == "":
|
|
66
78
|
continue
|
|
67
|
-
|
|
68
79
|
content_utf16_len = self._utf16_len_java_style(inner)
|
|
69
|
-
|
|
70
80
|
part: Dict[str, Any] = {
|
|
71
81
|
"type": self._TYPE_MAP.get(gname, "Unknown"),
|
|
72
82
|
"from_index": adj_from,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Rubka
|
|
3
|
-
Version: 7.1.
|
|
3
|
+
Version: 7.1.12
|
|
4
4
|
Summary: Rubika: A Python library for interacting with the Rubika Bot API. This library provides an easy-to-use interface to send messages, polls, stickers, media files, manage groups and channels, handle inline keyboards, and implement advanced bot features like subscription management, user authentication, and message handling. Ideal for developers looking to automate and extend their Rubika bots with Python.
|
|
5
5
|
Home-page: https://github.com/Mahdy-Ahmadi/Rubka
|
|
6
6
|
Download-URL: https://github.com/Mahdy-Ahmadi/rubka/archive/refs/tags/v6.6.4.zip
|
|
@@ -12,7 +12,7 @@ rubka/jobs.py,sha256=GvLMLsVhcSEzRTgkvnPISPEBN71suW2xXI0hUaUZPTo,378
|
|
|
12
12
|
rubka/keyboards.py,sha256=7nr-dT2bQJVQnQ6RMWPTSjML6EEk6dsBx-4d8pab8xk,488
|
|
13
13
|
rubka/keypad.py,sha256=yGsNt8W5HtUFBzVF1m_p7GySlu1hwIcSvXZ4BTdrlvg,9558
|
|
14
14
|
rubka/logger.py,sha256=J2I6NiK1z32lrAzC4H1Et6WPMBXxXGCVUsW4jgcAofs,289
|
|
15
|
-
rubka/metadata.py,sha256=
|
|
15
|
+
rubka/metadata.py,sha256=c_JTGJHSGgslIttJsq7gQzo7C3m2f71jFz-bjTZHkH4,3647
|
|
16
16
|
rubka/rubino.py,sha256=HOILsm2zOIRe9EW1hxhLinhjwE_TvFrOAxBsg9T_L5E,61701
|
|
17
17
|
rubka/tv.py,sha256=rBoyCadCH3I3YqQGrQYv_dLtTg1I63AzVf1orn-hbko,5724
|
|
18
18
|
rubka/update.py,sha256=brl7WXe4nzpLpcaMiOLVMfOs8BFTU5z5Sw6AIecCtOA,42492
|
|
@@ -38,8 +38,8 @@ rubka/adaptorrubka/types/socket/message.py,sha256=0WgLMZh4eow8Zn7AiSX4C3GZjQTkIg
|
|
|
38
38
|
rubka/adaptorrubka/utils/__init__.py,sha256=OgCFkXdNFh379quNwIVOAWY2NP5cIOxU5gDRRALTk4o,54
|
|
39
39
|
rubka/adaptorrubka/utils/configs.py,sha256=nMUEOJh1NqDJsf9W9PurkN_DLYjO6kKPMm923i4Jj_A,492
|
|
40
40
|
rubka/adaptorrubka/utils/utils.py,sha256=5-LioLNYX_TIbQGDeT50j7Sg9nAWH2LJUUs-iEXpsUY,8816
|
|
41
|
-
rubka-7.1.
|
|
42
|
-
rubka-7.1.
|
|
43
|
-
rubka-7.1.
|
|
44
|
-
rubka-7.1.
|
|
45
|
-
rubka-7.1.
|
|
41
|
+
rubka-7.1.12.dist-info/METADATA,sha256=ZFhfWy1OoC3WQvWLngq8W6q6xOq0d9j952FXJsjrDFY,34645
|
|
42
|
+
rubka-7.1.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
43
|
+
rubka-7.1.12.dist-info/entry_points.txt,sha256=4aESuUmuUOALMUy7Kucv_Gb5YlqhsJmTmdXLlZU9sJ0,46
|
|
44
|
+
rubka-7.1.12.dist-info/top_level.txt,sha256=vy2A4lot11cRMdQS-F4HDCIXL3JK8RKfu7HMDkezJW4,6
|
|
45
|
+
rubka-7.1.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|