-
Notifications
You must be signed in to change notification settings - Fork 4
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
Bizordec
committed
Apr 27, 2022
0 parents
commit 1344aaf
Showing
61 changed files
with
7,233 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Create .env file based on this file and fill the variables. | ||
# cp .env.example .env | ||
|
||
# VK login and password. | ||
# Required if both KATE_TOKEN and VK_OFFICIAL_TOKEN not specified. | ||
VK_LOGIN= | ||
VK_PASSWORD= | ||
|
||
# Numeric id of VK community. | ||
# Required. | ||
VK_COMMUNITY_ID= | ||
|
||
# VK community token. | ||
# To obtain it: | ||
# 1. Go to your community page; | ||
# 2. "Manage" -> "API usage" -> "Access usage" -> "Create token"; | ||
# 3. Select "Allow access to community management"; | ||
# 4. Copy token and paste here. | ||
# Required. | ||
VK_COMMUNITY_TOKEN= | ||
|
||
# Title for your server (1-14 characters). | ||
# Required. | ||
VK_SERVER_TITLE= | ||
|
||
# Numeric id of main Telegram channel. | ||
# Required if channel is private. | ||
TGM_CHANNEL_ID= | ||
|
||
# Name of main Telegram channel. | ||
# Required if TGM_CHANNEL_ID not specified. | ||
TGM_CHANNEL_USERNAME= | ||
|
||
# Numeric id of playlist Telegram channel. | ||
# Optional if you don't need playlist channel, | ||
# otherwise required if channel is private. | ||
TGM_PL_CHANNEL_ID= | ||
|
||
# Name of playlist Telegram channel. | ||
# Optional if you don't need playlist channel, | ||
# otherwise required if TGM_PL_CHANNEL_ID not specified. | ||
TGM_PL_CHANNEL_USERNAME= | ||
|
||
# Phone number of Telegram client account. | ||
# Required if you need Telegram bot. | ||
TGM_CLIENT_PHONE= | ||
|
||
# Token of Telegram bot. | ||
# Read more: https://core.telegram.org/bots#6-botfather | ||
# Required. | ||
TGM_BOT_TOKEN= | ||
|
||
# Id and hash for your Telegram application. | ||
# Read more: https://core.telegram.org/api/obtaining_api_id | ||
# Required. | ||
TGM_API_ID= | ||
TGM_API_HASH= | ||
|
||
# Server URL, which will be used by VK for callback events. | ||
# Required. | ||
SERVER_URL= | ||
|
||
# VK user tokens. | ||
# Required if VK_LOGIN and VK_PASSWORD not specified, otherwise tokens will be auto generated. | ||
KATE_TOKEN= | ||
VK_OFFICIAL_TOKEN= | ||
|
||
# App's language | ||
# Default: "en" | ||
VTT_LANGUAGE= | ||
|
||
# VK API language | ||
# Default: value of VTT_LANGUAGE | ||
VK_API_LANGUAGE= |
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,12 @@ | ||
venv | ||
.venv | ||
__pycache__ | ||
vk_config.v2.json | ||
celeryconfig.py | ||
.env* | ||
!.env.example | ||
node_modules | ||
*.db | ||
*.session | ||
*.session-journal | ||
celerybeat-* |
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,94 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Telegram Bot", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "app.bot.main", | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: VK Callback receiver", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "uvicorn", | ||
"args": [ | ||
"app.main:app", | ||
"--log-config", | ||
"app/logging_config.yaml", | ||
"--log-level", | ||
"debug", | ||
], | ||
"jinja": true, | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: Wall worker", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "celery", | ||
"console": "integratedTerminal", | ||
"args": [ | ||
"-A", | ||
"app.celery_worker", | ||
"worker", | ||
"-Q", | ||
"vtt-wall", | ||
"-l", | ||
"info", | ||
"-P", | ||
"solo", | ||
], | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: Playlist worker", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "celery", | ||
"console": "integratedTerminal", | ||
"args": [ | ||
"-A", | ||
"app.celery_worker", | ||
"worker", | ||
"-Q", | ||
"vtt-playlist", | ||
"-l", | ||
"info", | ||
"-P", | ||
"solo", | ||
], | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: DB cleanup scheduler", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "celery", | ||
"console": "integratedTerminal", | ||
"args": [ | ||
"-A", | ||
"app.celery_worker", | ||
"beat", | ||
"-l", | ||
"debug", | ||
], | ||
"justMyCode": false | ||
}, | ||
{ | ||
"name": "Python: Current File", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"console": "integratedTerminal", | ||
"env": { | ||
"PYTHONPATH": "${workspaceFolder}:${env:PYTHONPATH}" | ||
}, | ||
"justMyCode": false | ||
}, | ||
] | ||
} |
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,11 @@ | ||
{ | ||
"[python]": { | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true, | ||
}, | ||
"editor.formatOnSave": true, | ||
}, | ||
"python.linting.enabled": true, | ||
"python.linting.flake8Enabled": true, | ||
"python.formatting.provider": "black", | ||
} |
Oops, something went wrong.