Compare commits
7 Commits
0d31d90efd
...
3ae3cabd80
Author | SHA1 | Date |
---|---|---|
InsanusMokrassar | 3ae3cabd80 | |
InsanusMokrassar | 5fd4042fe3 | |
InsanusMokrassar | 6df4546b81 | |
InsanusMokrassar | 12635c654a | |
InsanusMokrassar | 15bd013eaa | |
InsanusMokrassar | 39b607c4e7 | |
InsanusMokrassar | 98f3e2a461 |
|
@ -10,4 +10,4 @@ android.enableJetifier=true
|
|||
# Project data
|
||||
|
||||
group=dev.inmo
|
||||
version=0.3.0
|
||||
version=0.4.0
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
kotlin = "1.8.22"
|
||||
kotlin-serialization = "1.5.1"
|
||||
|
||||
plagubot = "7.1.0"
|
||||
tgbotapi = "9.1.0"
|
||||
plagubot = "7.2.1"
|
||||
tgbotapi = "9.2.1"
|
||||
microutils = "0.19.9"
|
||||
kslog = "1.1.2"
|
||||
krontab = "2.1.2"
|
||||
plagubot-plugins = "0.14.0"
|
||||
plagubot-plugins = "0.15.1"
|
||||
|
||||
dokka = "1.8.20"
|
||||
|
||||
|
|
|
@ -1,87 +0,0 @@
|
|||
{
|
||||
"database": {
|
||||
"url": "jdbc:postgresql://127.0.0.1:8091/test",
|
||||
"username": "test",
|
||||
"password": "test",
|
||||
"driver": "org.postgresql.Driver"
|
||||
},
|
||||
"botToken": "1234567890:ABCDEFGHIJKLMNOP_qrstuvwxyz12345678",
|
||||
"plugins": [
|
||||
"dev.inmo.plaguposter.posts.Plugin",
|
||||
"dev.inmo.plaguposter.posts.registrar.Plugin",
|
||||
"dev.inmo.plaguposter.ratings.Plugin",
|
||||
"dev.inmo.plaguposter.ratings.source.Plugin",
|
||||
"dev.inmo.plaguposter.ratings.selector.Plugin",
|
||||
"dev.inmo.plaguposter.ratings.gc.Plugin",
|
||||
"dev.inmo.plaguposter.triggers.selector_with_timer.Plugin",
|
||||
"dev.inmo.plagubot.plugins.inline.queries.Plugin",
|
||||
"dev.inmo.plaguposter.triggers.command.Plugin",
|
||||
"dev.inmo.plaguposter.posts.panel.Plugin",
|
||||
"dev.inmo.plaguposter.common.CommonPlugin",
|
||||
"dev.inmo.plaguposter.triggers.timer.Plugin",
|
||||
"dev.inmo.plaguposter.triggers.timer.disablers.ratings.Plugin",
|
||||
"dev.inmo.plaguposter.triggers.timer.disablers.autoposts.Plugin"
|
||||
],
|
||||
"posts": {
|
||||
"chats": {
|
||||
"targetChat": 12345678,
|
||||
"cacheChat": 12345678,
|
||||
"sourceChat": 12345678,
|
||||
"targetChats": [12345678],
|
||||
"_note": "You must set targetChat or targetChats with at least one object"
|
||||
}
|
||||
},
|
||||
"ratingsPolls": {
|
||||
"variants": {
|
||||
"Круть": 2,
|
||||
"Ок": 1,
|
||||
"Не ок": -1,
|
||||
"Совсем не ок": -2,
|
||||
"Посмотреть результаты": 0
|
||||
},
|
||||
"autoAttach": true,
|
||||
"ratingOfferText": "What do you think about it?"
|
||||
},
|
||||
"selector": {
|
||||
"items": [
|
||||
{
|
||||
"time": {
|
||||
"from": "00:00",
|
||||
"to": "23:59"
|
||||
},
|
||||
"rating": {
|
||||
"prefer": "max"
|
||||
}
|
||||
},
|
||||
{
|
||||
"time": {
|
||||
"from": "23:59",
|
||||
"to": "00:00"
|
||||
},
|
||||
"rating": {
|
||||
"prefer": "max"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"timer_trigger": {
|
||||
"krontab": "0 30 2/4 * *"
|
||||
},
|
||||
"panel": {
|
||||
"textPrefix": "Post management:",
|
||||
"buttonsPerRow": 2,
|
||||
"parseMode": "MarkdownV2",
|
||||
"deleteButtonText": "Delete"
|
||||
},
|
||||
"publish_command": {
|
||||
"panelButtonText": "Publish"
|
||||
},
|
||||
"gc": {
|
||||
"autoclear": {
|
||||
"rating": -1,
|
||||
"autoClearKrontab": "0 0 0 * *",
|
||||
"skipPostAge": 86400
|
||||
},
|
||||
"immediateDrop": -6
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
DATA_PATH=.
|
||||
|
||||
PG_USER=test_user
|
||||
PG_PASSWORD=test_password
|
||||
PG_DB=test_db
|
|
@ -1,131 +1,80 @@
|
|||
{
|
||||
"database": {
|
||||
"url": "jdbc:postgresql://postgres/test_db",
|
||||
"username": "test_user",
|
||||
"password": "test_password",
|
||||
"url": "jdbc:postgresql://127.0.0.1:8091/test",
|
||||
"username": "test",
|
||||
"password": "test",
|
||||
"driver": "org.postgresql.Driver"
|
||||
},
|
||||
"botToken": "1234567890:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi",
|
||||
"botToken": "1234567890:ABCDEFGHIJKLMNOP_qrstuvwxyz12345678",
|
||||
"plugins": [
|
||||
"dev.inmo.plaguposter.posts.Plugin",
|
||||
"dev.inmo.plaguposter.posts.registrar.Plugin",
|
||||
"dev.inmo.plaguposter.ratings.Plugin",
|
||||
"dev.inmo.plaguposter.ratings.source.Plugin",
|
||||
"dev.inmo.plaguposter.ratings.selector.Plugin",
|
||||
"dev.inmo.plaguposter.triggers.selector_with_timer.Plugin",
|
||||
"dev.inmo.plaguposter.ratings.gc.Plugin",
|
||||
"dev.inmo.plaguposter.triggers.selector_with_timer.Plugin",
|
||||
"dev.inmo.plagubot.plugins.inline.queries.Plugin",
|
||||
"dev.inmo.plaguposter.triggers.command.Plugin"
|
||||
"dev.inmo.plaguposter.triggers.command.Plugin",
|
||||
"dev.inmo.plaguposter.posts.panel.Plugin",
|
||||
"dev.inmo.plaguposter.common.CommonPlugin",
|
||||
"dev.inmo.plaguposter.triggers.timer.Plugin",
|
||||
"dev.inmo.plaguposter.triggers.timer.disablers.ratings.Plugin",
|
||||
"dev.inmo.plaguposter.triggers.timer.disablers.autoposts.Plugin"
|
||||
],
|
||||
"posts": {
|
||||
"chats": {
|
||||
"targetChat": -1001234567890,
|
||||
"cacheChat": -1001234567890,
|
||||
"sourceChat": -1001234567890
|
||||
},
|
||||
"autoRemoveMessages": true
|
||||
"targetChat": 12345678,
|
||||
"cacheChat": 12345678,
|
||||
"sourceChat": 12345678,
|
||||
"targetChats": [12345678],
|
||||
"_note": "You must set targetChat or targetChats with at least one object"
|
||||
}
|
||||
},
|
||||
"ratingsPolls": {
|
||||
"variants": {
|
||||
"Круть": 2,
|
||||
"Ок": 1,
|
||||
"Не ок": -1,
|
||||
"Совсем не ок": -2,
|
||||
"Посмотреть результаты": 0
|
||||
"Cool": 2,
|
||||
"Ok": 1,
|
||||
"Not ok": -1,
|
||||
"Inappropriate": -2,
|
||||
"Results": 0
|
||||
},
|
||||
"autoAttach": true,
|
||||
"ratingOfferText": "How do you like it?"
|
||||
"ratingOfferText": "What do you think about it?"
|
||||
},
|
||||
"selector": {
|
||||
"items": [
|
||||
{
|
||||
"time": {
|
||||
"from": "23:00",
|
||||
"from": "00:00",
|
||||
"to": "23:59"
|
||||
},
|
||||
"rating": {
|
||||
"min": -1.0,
|
||||
"max": 2.0,
|
||||
"prefer": "max",
|
||||
"otherwise": {
|
||||
"rating": {
|
||||
"min": 2.0,
|
||||
"prefer": "min",
|
||||
"postAge": 86400
|
||||
}
|
||||
},
|
||||
"postAge": 86400
|
||||
"prefer": "max"
|
||||
}
|
||||
},
|
||||
{
|
||||
"time": {
|
||||
"from": "00:00",
|
||||
"to": "06:59"
|
||||
"from": "23:59",
|
||||
"to": "00:00"
|
||||
},
|
||||
"rating": {
|
||||
"min": -1.0,
|
||||
"max": 2.0,
|
||||
"prefer": "max",
|
||||
"otherwise": {
|
||||
"rating": {
|
||||
"min": 2.0,
|
||||
"prefer": "min",
|
||||
"postAge": 86400
|
||||
}
|
||||
},
|
||||
"postAge": 86400
|
||||
}
|
||||
},
|
||||
{
|
||||
"time": {
|
||||
"from": "07:00",
|
||||
"to": "12:00"
|
||||
},
|
||||
"rating": {
|
||||
"min": 1.0,
|
||||
"prefer": "min",
|
||||
"otherwise": {
|
||||
"rating": {
|
||||
"max": 1.0,
|
||||
"prefer": "max",
|
||||
"postAge": 86400
|
||||
}
|
||||
},
|
||||
"postAge": 86400
|
||||
}
|
||||
},
|
||||
{
|
||||
"time": {
|
||||
"from": "12:00",
|
||||
"to": "16:00"
|
||||
},
|
||||
"rating": {
|
||||
"min": 2.0,
|
||||
"prefer": "min",
|
||||
"otherwise": {
|
||||
"rating": {
|
||||
"max": 2.0,
|
||||
"prefer": "max",
|
||||
"postAge": 86400
|
||||
}
|
||||
},
|
||||
"postAge": 86400
|
||||
}
|
||||
},
|
||||
{
|
||||
"time": {
|
||||
"from": "16:00",
|
||||
"to": "23:00"
|
||||
},
|
||||
"rating": {
|
||||
"prefer": "max",
|
||||
"postAge": 86400
|
||||
"prefer": "max"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"timer_trigger": {
|
||||
"krontab": "0 30 */5 * *"
|
||||
"krontab": "0 30 2/4 * *"
|
||||
},
|
||||
"panel": {
|
||||
"textPrefix": "Post management:",
|
||||
"buttonsPerRow": 2,
|
||||
"parseMode": "MarkdownV2",
|
||||
"deleteButtonText": "Delete"
|
||||
},
|
||||
"publish_command": {
|
||||
"panelButtonText": "Publish"
|
||||
},
|
||||
"gc": {
|
||||
"autoclear": {
|
||||
|
@ -133,6 +82,6 @@
|
|||
"autoClearKrontab": "0 0 0 * *",
|
||||
"skipPostAge": 86400
|
||||
},
|
||||
"immediateDrop": -2
|
||||
"immediateDrop": -6
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,22 +2,22 @@ version: "3.4"
|
|||
|
||||
services:
|
||||
plaguposter_postgres:
|
||||
image: postgres
|
||||
image: postgres:15.4-bullseye
|
||||
container_name: "plaguposter_postgres"
|
||||
restart: "unless-stopped"
|
||||
environment:
|
||||
POSTGRES_USER: "${PG_USER}"
|
||||
POSTGRES_PASSWORD: "${PG_PASSWORD}"
|
||||
POSTGRES_DB: "${PG_DB}"
|
||||
POSTGRES_USER: "test"
|
||||
POSTGRES_PASSWORD: "test"
|
||||
POSTGRES_DB: "test"
|
||||
volumes:
|
||||
- "${DATA_PATH}/db/:/var/lib/postgresql/"
|
||||
- "./db/:/var/lib/postgresql/data"
|
||||
ports:
|
||||
- "127.0.0.1:8091:5432"
|
||||
plaguposter:
|
||||
image: insanusmokrassar/plaguposter
|
||||
image: insanusmokrassar/plaguposter:latest
|
||||
container_name: "plaguposter"
|
||||
restart: "unless-stopped"
|
||||
volumes:
|
||||
- "${DATA_PATH}/config.json:/config.json"
|
||||
links:
|
||||
- "plaguposter_postgres:postgres"
|
||||
- "./config.json:/config.json"
|
||||
depends_on:
|
||||
- "plaguposter_postgres"
|
||||
|
|
Loading…
Reference in New Issue