florestbotfunctions 1.2.0__tar.gz → 1.2.2__tar.gz
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.
- florestbotfunctions-1.2.2/PKG-INFO +13 -0
- {florestbotfunctions-1.2.0 → florestbotfunctions-1.2.2}/florestbotfunctions/__init__.py +45 -25
- florestbotfunctions-1.2.2/florestbotfunctions.egg-info/PKG-INFO +13 -0
- {florestbotfunctions-1.2.0 → florestbotfunctions-1.2.2}/florestbotfunctions.egg-info/requires.txt +1 -0
- {florestbotfunctions-1.2.0 → florestbotfunctions-1.2.2}/setup.py +1 -1
- florestbotfunctions-1.2.0/PKG-INFO +0 -24
- florestbotfunctions-1.2.0/florestbotfunctions.egg-info/PKG-INFO +0 -24
- {florestbotfunctions-1.2.0 → florestbotfunctions-1.2.2}/florestbotfunctions.egg-info/SOURCES.txt +0 -0
- {florestbotfunctions-1.2.0 → florestbotfunctions-1.2.2}/florestbotfunctions.egg-info/dependency_links.txt +0 -0
- {florestbotfunctions-1.2.0 → florestbotfunctions-1.2.2}/florestbotfunctions.egg-info/top_level.txt +0 -0
- {florestbotfunctions-1.2.0 → florestbotfunctions-1.2.2}/setup.cfg +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 1.2
|
|
2
|
+
Name: florestbotfunctions
|
|
3
|
+
Version: 1.2.2
|
|
4
|
+
Summary: Функции бота Флореста в одной библиотеке.
|
|
5
|
+
Home-page: UNKNOWN
|
|
6
|
+
Author: florestdev
|
|
7
|
+
Author-email: florestone4185@internet.ru
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Project-URL: Social Resources, https://taplink.cc/florestone4185
|
|
10
|
+
Project-URL: My bot, https://t.me/postbotflorestbot
|
|
11
|
+
Description: Привет! Данная библиотека включает в себя функции из https://t.me/postbotflorestbot. Все функции, с удобным объяснением кода, только здесь. P.S. Это официальная библиотека от создателя бота - FlorestDev. Все функции предоставляются в ознакомительном порядке.
|
|
12
|
+
Platform: UNKNOWN
|
|
13
|
+
Requires-Python: >=3.8.9
|
|
@@ -475,31 +475,51 @@ class FunctionsObject:
|
|
|
475
475
|
return 'Ошибка распознавания текста.'
|
|
476
476
|
except:
|
|
477
477
|
return 'Неизвестная ошибка. Также могут быть проблемы с подключением.'
|
|
478
|
-
def
|
|
479
|
-
"""
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
478
|
+
def email_mass_send(self, recievers: list, title: str, body: str, service: str = 'smtp.mail.ru', service_port: int = 465):
|
|
479
|
+
"""Функция для массовой отправки сообщений.\nrecievers: список получателей. К примеру: ['...', '...', ...]\ntitle: заголовок письма.\nbody: остальной текст письма.\nservice: сервис, к примеру `smtp.mail.ru`.\nservice_port: порт SMTP-сервера, к примеру, 465."""
|
|
480
|
+
if self.username_mail and self.mail_passwd:
|
|
481
|
+
for email in recievers:
|
|
482
|
+
from email.mime.multipart import MIMEMultipart
|
|
483
|
+
from email.mime.text import MIMEText
|
|
484
|
+
import smtplib
|
|
485
|
+
message = MIMEMultipart()
|
|
486
|
+
message["From"] = self.username_mail
|
|
487
|
+
message["To"] = email
|
|
488
|
+
message["Subject"] = title
|
|
489
|
+
|
|
490
|
+
message.attach(MIMEText(body, "plain", 'utf-8'))
|
|
491
|
+
|
|
492
|
+
with smtplib.SMTP_SSL(service, service_port) as server:
|
|
493
|
+
server.login(self.username_mail, password=self.mail_passwd)
|
|
494
|
+
server.sendmail(self.username_mail, email, message.as_string())
|
|
495
|
+
else:
|
|
496
|
+
return "Укажите параметр username_mail и mail_passwd в настройках класса."
|
|
497
|
+
def alarm_clock(self, time_to_ring: str, sound):
|
|
498
|
+
"""Будильник на Python. Весело, не правда-ли?)\ntime_to_ring: время срабатывания будильника в формате ЧЧ:ММ:СС. К примеру, `16:45:43`.\nsound: директория к файлу со звуком для будильника, либо буфероподобные объекты. open(), io.BytesIO() и другие."""
|
|
499
|
+
from os import environ
|
|
500
|
+
environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1'
|
|
501
|
+
from pygame import mixer
|
|
502
|
+
import time
|
|
503
|
+
from colorama import Fore
|
|
504
|
+
|
|
483
505
|
mixer.init()
|
|
484
|
-
do = mixer.Sound('notes/do.wav')
|
|
485
|
-
re = mixer.Sound('notes/re.wav')
|
|
486
|
-
mi = mixer.Sound('notes/mi.wav')
|
|
487
|
-
fa = mixer.Sound('notes/fa.wav')
|
|
488
|
-
sol = mixer.Sound('notes/sol.wav')
|
|
489
|
-
lja = mixer.Sound('notes/lja.wav')
|
|
490
|
-
si = mixer.Sound('notes/si.wav')
|
|
491
|
-
|
|
492
|
-
keymap = {
|
|
493
|
-
'q':do,
|
|
494
|
-
'w':re,
|
|
495
|
-
'e':mi,
|
|
496
|
-
'r':fa,
|
|
497
|
-
"t":sol,
|
|
498
|
-
'y':lja,
|
|
499
|
-
"u":si
|
|
500
|
-
}
|
|
501
506
|
|
|
502
|
-
|
|
503
|
-
|
|
507
|
+
alarm_time = time.strptime(time_to_ring, "%H:%M:%S")
|
|
508
|
+
hour = alarm_time.tm_hour
|
|
509
|
+
minutes = alarm_time.tm_min
|
|
510
|
+
seconds = alarm_time.tm_sec
|
|
511
|
+
data = {'hour':hour, 'minutes':minutes, 'seconds':seconds}
|
|
512
|
+
print(f'{Fore.GREEN}Будильник успешно запущен на {Fore.BLUE}{time_to_ring}.')
|
|
504
513
|
while True:
|
|
505
|
-
|
|
514
|
+
# Получаем текущее время
|
|
515
|
+
current_time = time.localtime()
|
|
516
|
+
hour_ = current_time.tm_hour
|
|
517
|
+
minutes_ = current_time.tm_min
|
|
518
|
+
seconds_ = current_time.tm_sec
|
|
519
|
+
|
|
520
|
+
# Проверяем, наступило ли время будильника
|
|
521
|
+
if {'hour':hour_, 'minutes':minutes_, 'seconds':seconds_} == data:
|
|
522
|
+
print(f'{Fore.RED}ВНИМАНИЕ!!! БУДИЛЬНИК АКТИВИРОВАН, ПРОСЫПАЙТЕСЬ!!!')
|
|
523
|
+
mixer.Sound(sound).play(loops=-1)
|
|
524
|
+
else:
|
|
525
|
+
pass
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 1.2
|
|
2
|
+
Name: florestbotfunctions
|
|
3
|
+
Version: 1.2.2
|
|
4
|
+
Summary: Функции бота Флореста в одной библиотеке.
|
|
5
|
+
Home-page: UNKNOWN
|
|
6
|
+
Author: florestdev
|
|
7
|
+
Author-email: florestone4185@internet.ru
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Project-URL: Social Resources, https://taplink.cc/florestone4185
|
|
10
|
+
Project-URL: My bot, https://t.me/postbotflorestbot
|
|
11
|
+
Description: Привет! Данная библиотека включает в себя функции из https://t.me/postbotflorestbot. Все функции, с удобным объяснением кода, только здесь. P.S. Это официальная библиотека от создателя бота - FlorestDev. Все функции предоставляются в ознакомительном порядке.
|
|
12
|
+
Platform: UNKNOWN
|
|
13
|
+
Requires-Python: >=3.8.9
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
from setuptools import setup, find_packages
|
|
2
2
|
|
|
3
|
-
setup(name='florestbotfunctions', version='1.2.
|
|
3
|
+
setup(name='florestbotfunctions', version='1.2.2', description='Функции бота Флореста в одной библиотеке.', long_description='Привет! Данная библиотека включает в себя функции из https://t.me/postbotflorestbot. Все функции, с удобным объяснением кода, только здесь. P.S. Это официальная библиотека от создателя бота - FlorestDev. Все функции предоставляются в ознакомительном порядке.', author='florestdev', author_email='florestone4185@internet.ru', packages=find_packages(), python_requires='>=3.8.9', project_urls={"Social Resources": 'https://taplink.cc/florestone4185', 'My bot':"https://t.me/postbotflorestbot"}, install_requires=["MukeshAPI", 'requests', 'g4f', 'curl_cffi', 'pytubefix', 'pillow', 'qrcode', 'gtts', 'google-api-python-client', 'faker', 'bs4', 'SpeechRecognition', 'pygame', 'colorama'])
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: florestbotfunctions
|
|
3
|
-
Version: 1.2.0
|
|
4
|
-
Summary: Функции бота Флореста в одной библиотеке.
|
|
5
|
-
Author: florestdev
|
|
6
|
-
Author-email: florestone4185@internet.ru
|
|
7
|
-
Project-URL: Social Resources, https://taplink.cc/florestone4185
|
|
8
|
-
Project-URL: My bot, https://t.me/postbotflorestbot
|
|
9
|
-
Requires-Python: >=3.8.9
|
|
10
|
-
Requires-Dist: MukeshAPI
|
|
11
|
-
Requires-Dist: requests
|
|
12
|
-
Requires-Dist: g4f
|
|
13
|
-
Requires-Dist: curl_cffi
|
|
14
|
-
Requires-Dist: pytubefix
|
|
15
|
-
Requires-Dist: pillow
|
|
16
|
-
Requires-Dist: qrcode
|
|
17
|
-
Requires-Dist: gtts
|
|
18
|
-
Requires-Dist: google-api-python-client
|
|
19
|
-
Requires-Dist: faker
|
|
20
|
-
Requires-Dist: bs4
|
|
21
|
-
Requires-Dist: SpeechRecognition
|
|
22
|
-
Requires-Dist: pygame
|
|
23
|
-
|
|
24
|
-
Привет! Данная библиотека включает в себя функции из https://t.me/postbotflorestbot. Все функции, с удобным объяснением кода, только здесь. P.S. Это официальная библиотека от создателя бота - FlorestDev. Все функции предоставляются в ознакомительном порядке.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: florestbotfunctions
|
|
3
|
-
Version: 1.2.0
|
|
4
|
-
Summary: Функции бота Флореста в одной библиотеке.
|
|
5
|
-
Author: florestdev
|
|
6
|
-
Author-email: florestone4185@internet.ru
|
|
7
|
-
Project-URL: Social Resources, https://taplink.cc/florestone4185
|
|
8
|
-
Project-URL: My bot, https://t.me/postbotflorestbot
|
|
9
|
-
Requires-Python: >=3.8.9
|
|
10
|
-
Requires-Dist: MukeshAPI
|
|
11
|
-
Requires-Dist: requests
|
|
12
|
-
Requires-Dist: g4f
|
|
13
|
-
Requires-Dist: curl_cffi
|
|
14
|
-
Requires-Dist: pytubefix
|
|
15
|
-
Requires-Dist: pillow
|
|
16
|
-
Requires-Dist: qrcode
|
|
17
|
-
Requires-Dist: gtts
|
|
18
|
-
Requires-Dist: google-api-python-client
|
|
19
|
-
Requires-Dist: faker
|
|
20
|
-
Requires-Dist: bs4
|
|
21
|
-
Requires-Dist: SpeechRecognition
|
|
22
|
-
Requires-Dist: pygame
|
|
23
|
-
|
|
24
|
-
Привет! Данная библиотека включает в себя функции из https://t.me/postbotflorestbot. Все функции, с удобным объяснением кода, только здесь. P.S. Это официальная библиотека от создателя бота - FlorestDev. Все функции предоставляются в ознакомительном порядке.
|
{florestbotfunctions-1.2.0 → florestbotfunctions-1.2.2}/florestbotfunctions.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{florestbotfunctions-1.2.0 → florestbotfunctions-1.2.2}/florestbotfunctions.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|