yeref 0.29.12__py3-none-any.whl → 0.29.14__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.
yeref/l_.py CHANGED
@@ -5437,8 +5437,8 @@ l_hand_msg_channel = {
5437
5437
  'ar': "🫥 <b>الرسائل</b> <i>بالنيابة عن القناة</i> غير مسموح بها",
5438
5438
  }
5439
5439
  l_hand_msg_emoji = {
5440
- 'ru': "🗣 <b>Сообщения</b> <i>c emoji</i> не разрешены",
5441
- 'en': "🗣 <b>Messages</b> <i>with emoji</i> are not allowed",
5440
+ 'ru': "🫥 <b>Сообщения</b> <i>c эмоджи</i> не разрешены",
5441
+ 'en': "🫥 <b>Messages</b> <i>with emoji</i> are not allowed",
5442
5442
  'es': "🗣 <b>Mensajes</b> <i>con emoji</i> no están permitidos",
5443
5443
  'fr': "🗣 Les <b>Messages</b> <i>avec emoji</i> ne sont pas autorisés",
5444
5444
  'zh': "🗣 不允许<b>消息</b> <i>带有表情符号</i>",
@@ -5461,7 +5461,7 @@ l_hand_msg_telegram = {
5461
5461
  'ar': "🔗 <b>الرسائل</b> <i>التي تحتوي على روابط تيليجرام</i> غير مسموح بها",
5462
5462
  }
5463
5463
  l_hand_msg_forward = {
5464
- 'ru': "🔗 <b>Сообщения</b> <i>c forward-ссылками</i> не разрешены",
5464
+ 'ru': "🔗 <b>Сообщения</b> <i>c форвард-ссылками</i> не разрешены",
5465
5465
  'en': "🔗 <b>Messages</b> <i>with forward links</i> are not allowed",
5466
5466
  'es': "🔗 No se permiten <b>Mensajes</b> <i>con enlaces directos</i>",
5467
5467
  'fr': "🔗 Les <b>Messages</b> <i>avec liens de transfert</i> ne sont pas autorisés",
@@ -5477,7 +5477,7 @@ l_hand_msg_zalgo = {
5477
5477
  'ar': "文 <b>الرسائل</b> <i>c <a href=' https://www.zalgo.org '> zalgo-characters</a></i> غير مسموح بها",
5478
5478
  }
5479
5479
  l_hand_msg_symbols = {
5480
- 'ru': "文 <b>Сообщения</b> <i>c 文ب-алфавитами</i> не разрешены",
5480
+ 'ru': "文 <b>Сообщения</b> <i>c 文ب-glyth символами</i> не разрешены",
5481
5481
  'en': "文 <b>Messages</b> <i>with 文ب-alphabets</i> are not allowed",
5482
5482
  'es': "文 <b>Mensajes</b> <i>con 文ب-alfabetos</i> no están permitidos",
5483
5483
  'fr': "文 <b>Les messages</b> <i>avec les alphabets 文ب</i> ne sont pas autorisés",
yeref/yeref.py CHANGED
@@ -14,7 +14,8 @@ import math
14
14
  import mimetypes
15
15
  import os
16
16
  import random
17
- import re
17
+ import regex
18
+ import re
18
19
  import csv
19
20
  import subprocess
20
21
  import uuid
@@ -2209,6 +2210,17 @@ text_privacy_terms = (
2209
2210
  "\t\"privacy_policy\": \"https://telegram.org/privacy-tpa\"\n"
2210
2211
  "}</blockquote>"
2211
2212
  )
2213
+ PAT = regex.compile(
2214
+ r'[\p{Han}\p{Hiragana}\p{Katakana}\p{Hangul}'
2215
+ r'\p{Arabic}\p{Hebrew}\p{Ethiopic}'
2216
+ r'\p{Devanagari}\p{Bengali}\p{Gurmukhi}\p{Tamil}\p{Telugu}'
2217
+ r'\p{Kannada}\p{Malayalam}\p{Thai}'
2218
+ r'\p{Khmer}\p{Tibetan}\p{Myanmar}]'
2219
+ )
2220
+ PAT_ZALGO = regex.compile(
2221
+ r'[\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]{2,}'
2222
+ )
2223
+
2212
2224
  commands_ru = [types.BotCommand(command="start", description="⚙️ Перезагрузка"),
2213
2225
  types.BotCommand(command="lang", description="🇫🇷 Язык"),
2214
2226
  types.BotCommand(command="happy", description="🐈 Счастье")]
@@ -13726,6 +13738,16 @@ async def edit_simple2(bot, chat_id, user_id, entity_id, post_id, message_id, cu
13726
13738
 
13727
13739
 
13728
13740
  # region fun
13741
+ def has_non_european_glyph(text):
13742
+ if text.isascii(): return False
13743
+ return bool(PAT.search(text))
13744
+
13745
+
13746
+ def has_zalgo(text):
13747
+ if text.isascii(): return False
13748
+ return bool(PAT_ZALGO.search(text))
13749
+
13750
+
13729
13751
  async def page_tghp_create_for_post(ENT_TID, ENT_USERNAME, ENT_FIRSTNAME, PROJECT_TYPE, BASE_P):
13730
13752
  try:
13731
13753
  ENT_JSONTGPH = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yeref
3
- Version: 0.29.12
3
+ Version: 0.29.14
4
4
  Summary: desc-f
5
5
  Author: john smith
6
6
  Dynamic: author
@@ -0,0 +1,8 @@
1
+ yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
2
+ yeref/l_.py,sha256=xoJp6EPX24iVN-oT5sd164aYL70qGubjrfhGppVQTSs,616374
3
+ yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
4
+ yeref/yeref.py,sha256=_5zqeIuY5VQCReYWXJ4x50zyhzyy6OfCzmxDmtVYsZA,1057213
5
+ yeref-0.29.14.dist-info/METADATA,sha256=lhrHij3BHFUWXRPbCWyxd-_tjwzi4-quuLf1bWtUWR4,119
6
+ yeref-0.29.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ yeref-0.29.14.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
8
+ yeref-0.29.14.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- yeref/__init__.py,sha256=Qpv3o6Xa78VdLcsSRmctGtpnYE9btpAkCekgGhgJyXM,49
2
- yeref/l_.py,sha256=ggONyEMgti3W42kbDg0h5op8Ct2NDBGTmZR3FREG9T8,616356
3
- yeref/tonweb.js,sha256=Jf6aFOQ1OIY4q7fINYz-m5LsI3seMus124M5SYYZmtE,443659
4
- yeref/yeref.py,sha256=kD-aGGrDx2v4zTdv-DfedXxQELYxwIDX69Ai7eIrGbk,1056628
5
- yeref-0.29.12.dist-info/METADATA,sha256=Ez914mXE5sXNYWV-zugxthsey2Ew07nI7uZFfyFXGOc,119
6
- yeref-0.29.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- yeref-0.29.12.dist-info/top_level.txt,sha256=yCQKchWHbfV-3OuQPYRdi2loypD-nmbDJbtt3OuKKkY,6
8
- yeref-0.29.12.dist-info/RECORD,,