-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
44 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
version: '3.8' | ||
|
||
services: | ||
server: | ||
chat_watcher: | ||
build: | ||
context: src/ | ||
env_file: | ||
- ./.env | ||
command: '$START_DATE' | ||
# command: '$START_DATE' - будет использоваться в режиме парсера | ||
volumes: | ||
- ./db.sqlite3:/app/db.sqlite3 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# import time | ||
# import sys | ||
|
||
|
||
# def main(): | ||
# with app: | ||
# start_date = sys.argv[1] | ||
|
||
# count = 0 | ||
|
||
# for i in app.search_messages(os.getenv('SRC_CHAT_ID'), query='#нужно'): | ||
# current_date = i.date.strftime("%Y-%m-%d") | ||
# if (current_date != start_date): | ||
# try: | ||
# lower_mes = i.text.lower() | ||
# except AttributeError: | ||
# lower_mes = '_' | ||
# mes = re.findall(r'[A-Яа-я0-9\/]+', lower_mes) | ||
# con = sqlite3.connect('db.sqlite3') | ||
# cur = con.cursor() | ||
# res = cur.execute('SELECT * FROM addresses') | ||
# for j in res.fetchall(): | ||
# alias = [j[1]] | ||
# build = j[2].split(',') | ||
# sett = set(alias + build) | ||
# if len(sett.intersection(mes)) > 1: | ||
# app.forward_messages( | ||
# 'me', | ||
# from_chat_id=os.getenv('SRC_CHAT_ID'), | ||
# message_ids=i.id | ||
# ) | ||
# count += 1 | ||
# else: | ||
# break | ||
|
||
# time.sleep(1) | ||
|
||
# app.send_message('me', f'проверено {count} сообщений') | ||
# app.read_chat_history(os.getenv('SRC_CHAT_ID')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
# TODO: настройка скрипта на прослушивание чата на новые сообщения ' old | ||
# TODO: добавить ORM для работы с базой ' old | ||
# TODO: добавить конвертацию xlsx в json (либо сразу писать в бд?) ' old | ||
# TODO: выпилить bill.py для unique_addresses.py, получать адреса из бд ' old | ||
# TODO: почистить неиспользуемые пакеты requirements.txt ' old | ||
# TODO: переезд на Poetry ' old | ||
# TODO: подобрать инструмент для readme (генерация?) ' old | ||
# TODO: рефакт функции main (класс?) ' old | ||
# TODO: нужна оптимизация файла Dockerfile ' old | ||
# TODO: добавить версию файла compose.yml ' old | ||
# TODO: добавить .env в отдельный volume ' old | ||
# TODO: добавить режим парсинга |