wip
This commit is contained in:
pare
7fe1bb7470
commit
44a8bd0332
S'han modificat 1 arxius amb 4 adicions i 17 eliminacions
21
welcome.py
21
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)
|
||||
|
||||
|
|
Loading…
Referencia en una nova incidència