Added pipeline
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-04-02 22:34:40 +03:00
parent edada2a968
commit e870130554
4 changed files with 23 additions and 3 deletions

21
.drone.yml Normal file
View File

@@ -0,0 +1,21 @@
kind: pipeline
type: ssh
name: update
server:
host: 188.242.77.16:9345
user: ubuntu
ssh_key:
from_secret: SSH_KEY
clone:
disable: true
steps:
- name: fetch remote
commands:
- cd /home/ubuntu/politics-mark && git fetch --all && git reset --hard origin/master
trigger:
branch:
- master

0
data/.gitkeep Normal file
View File

View File

@@ -23,7 +23,7 @@ def cleanup(msg):
return msg return msg
with TelegramClient('session_name', api_id, api_hash) as client: with TelegramClient('bot', api_id, api_hash) as client:
f = open("data/data.txt", "w") f = open("data/data.txt", "w")
for message in client.iter_messages(chat): for message in client.iter_messages(chat):
try: try:

View File

@@ -5,6 +5,5 @@ text = f.read()
text_model = markovify.Text(text) text_model = markovify.Text(text)
for i in range(3): for i in range(5):
# print(text_model.make_short_sentence(280))
print(text_model.make_sentence()) print(text_model.make_sentence())