xync-client 0.0.136__py3-none-any.whl → 0.0.137__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.

Potentially problematic release.


This version of xync-client might be problematic. Click here for more details.

xync_client/details.py CHANGED
@@ -5,10 +5,26 @@ from xync_schema import models
5
5
  import re
6
6
  from typing import List, Dict
7
7
 
8
- phrases = ["дай(те)?", "номер", "рек(и|визиты)", "карту", "банк(и|а)?", "куда", "(на )?как(ой|ую)", "актуал"]
8
+ details = ["дай(те)?", "номер", "рек(и|визиты)", "карту", "банк(и|а)?", "куда", "(на )?как(ой|ую)", "актуал"]
9
9
 
10
+ begging = ["вз (лайк|отзыв)", "взаим(о|ный)?", "отзыву?", "like", "лайкни"]
10
11
 
11
- async def request_for_details(phrases_to_find) -> List[Dict[str, str]]:
12
+ greetings = [
13
+ "привет(ствую|ик)?",
14
+ "здаровa?",
15
+ "здоров(а|енько)",
16
+ "здравствуй(те)?",
17
+ "Добрый ?(день|вечер)?",
18
+ "h(i|ello)",
19
+ "сал(ют|лам)",
20
+ "ку",
21
+ "йо",
22
+ "хай",
23
+ "добро пожаловать",
24
+ ]
25
+
26
+
27
+ async def search_messages(phrases_to_find) -> List[Dict[str, str]]:
12
28
  _ = await init_db(TORM, True)
13
29
  msgs = await models.Msg.all().values("txt")
14
30
  patterns = [re.compile(rf"\b{phrase}\b", re.IGNORECASE) for phrase in phrases_to_find]
@@ -19,9 +35,10 @@ async def request_for_details(phrases_to_find) -> List[Dict[str, str]]:
19
35
  for pattern in patterns:
20
36
  if pattern.search(msg["txt"]):
21
37
  results.append({pattern.pattern: msg["txt"]})
22
-
38
+ for i in results:
39
+ print(i)
23
40
  return results
24
41
 
25
42
 
26
43
  if __name__ == "__main__":
27
- asyncio.run(request_for_details(phrases))
44
+ asyncio.run(search_messages(greetings))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xync-client
3
- Version: 0.0.136
3
+ Version: 0.0.137
4
4
  Author-email: Mike Artemiev <mixartemev@gmail.com>
5
5
  Project-URL: Homepage, https://gitlab.com/XyncNet/client
6
6
  Project-URL: Repository, https://gitlab.com/XyncNet/client
@@ -1,5 +1,5 @@
1
1
  xync_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- xync_client/details.py,sha256=QkkEa-39N8IHWu4z__E76QMyshoGdTvzL9k1Eb_-aIc,877
2
+ xync_client/details.py,sha256=21itVPCgAtaYRR1H9J9oYudj95gafcFjExUN6QL17OI,1330
3
3
  xync_client/loader.py,sha256=qAOQqE4id42aOG3jwc0UMBB8roHd6X3_O08qRG7Bfxw,563
4
4
  xync_client/pm_unifier.py,sha256=T2Xh-tvcu114P2YBI6RK_XDiaIhyq6ABMrXDuXPlx7A,6541
5
5
  xync_client/Abc/Agent.py,sha256=OJaJ1RIMDYAS4xeefeXxVIVI0EKnMczQtrO35MLzqr4,5390
@@ -95,7 +95,7 @@ xync_client/TgWallet/order.py,sha256=BOmBx5WWfJv0-_-A8DcR-Xd8utqO_VTmSqSegm0cteQ
95
95
  xync_client/TgWallet/pyd.py,sha256=Ys3E8b3RLuyQ26frWT0F0BorkNxVpxnd18tY4Gp9dik,5636
96
96
  xync_client/TgWallet/pyro.py,sha256=2K7QWdo48k4MbbgQt90gdz_HiPck69Njm4xaMjIVgoo,1440
97
97
  xync_client/TgWallet/web.py,sha256=kDcv9SKKQPe91mw1qJBpbuyKYCAmZdfdHJylHumLBVU,1608
98
- xync_client-0.0.136.dist-info/METADATA,sha256=FZV6NGtgHsCVK3K-wDDJS2xkRGIaLzGTlrRqNPfpRm0,1037
99
- xync_client-0.0.136.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
100
- xync_client-0.0.136.dist-info/top_level.txt,sha256=bmYEVIIrD3v7yFwH-X15pEfRvzhuAdfsAZ2igvNI4O8,12
101
- xync_client-0.0.136.dist-info/RECORD,,
98
+ xync_client-0.0.137.dist-info/METADATA,sha256=Sw7C8Y1D5Ybec8SN-eDa2jSkXM0gEOUCeOR8zK_3uJY,1037
99
+ xync_client-0.0.137.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
100
+ xync_client-0.0.137.dist-info/top_level.txt,sha256=bmYEVIIrD3v7yFwH-X15pEfRvzhuAdfsAZ2igvNI4O8,12
101
+ xync_client-0.0.137.dist-info/RECORD,,