From 44a8bd033251161e7003a5bb3af2ba9f49887160 Mon Sep 17 00:00:00 2001 From: spla Date: Wed, 19 May 2021 14:49:29 +0200 Subject: [PATCH] wip --- welcome.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/welcome.py b/welcome.py index 626e1da..b5d8954 100644 --- a/welcome.py +++ b/welcome.py @@ -1,26 +1,14 @@ -#from six.moves import urllib import datetime -#from subprocess import call from mastodon import Mastodon -#import time -#import threading -#import csv +import time import os import json -#import time -#import signal import sys import os.path -import requests import operator -#import redis -#import calendar import psycopg2 import pdb -#from decimal import * -#getcontext().prec = 2 - def mastodon(): # Load secrets from secrets file @@ -119,8 +107,6 @@ if __name__ == '__main__': conn.close() - print("Current users: %s "% current_id) - ############################################################################### now = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") @@ -388,11 +374,12 @@ if __name__ == '__main__': print("Tooting...") print(toot_text) if len(toot_text) < 500: - mastodon.status_post(toot_text, in_reply_to_id=None, ) + #mastodon.status_post(toot_text, in_reply_to_id=None, ) + print("blah") else: toot_text1, toot_text2 = toot_text[:int(len(toot_text)/2)], toot_text[int(len(toot_text)/2):] toot_id = mastodon.status_post(toot_text1, in_reply_to_id=None,) - mastodon.status_post(toot_text2, in_reply_to_id=toot_id,) + #mastodon.status_post(toot_text2, in_reply_to_id=toot_id,) print(toot_text1) print(toot_text2)