diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..f9effb3 --- /dev/null +++ b/.drone.yml @@ -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 diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/grab_samples.py b/grab_samples.py index edf8804..c673822 100644 --- a/grab_samples.py +++ b/grab_samples.py @@ -23,7 +23,7 @@ def cleanup(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") for message in client.iter_messages(chat): try: diff --git a/main.py b/main.py index fc2e926..168d6bb 100644 --- a/main.py +++ b/main.py @@ -5,6 +5,5 @@ text = f.read() text_model = markovify.Text(text) -for i in range(3): - # print(text_model.make_short_sentence(280)) +for i in range(5): print(text_model.make_sentence())