From 309c4111efbdf8bcb8a33d9e8eefbe424fd75284 Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Mon, 2 Jan 2023 21:34:54 +1100 Subject: [PATCH] init commit --- birds.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ example_conf.py | 5 +++++ gelb.py | 25 +++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 birds.py create mode 100644 example_conf.py create mode 100644 gelb.py diff --git a/birds.py b/birds.py new file mode 100644 index 0000000..cae5d5a --- /dev/null +++ b/birds.py @@ -0,0 +1,49 @@ +#!/bin/python + +from fedibot import main, api +import gelb +import conf +import random +api.instance=conf.instance +api.token=conf.token +gelb.conf=conf.gelb + +tags=conf.tags +pointer=int(random.random()*len(tags)) + +@main.loop(20*60) +async def shitpost(): + global pointer + tag=tags[pointer] + pointer+=1; pointer%=len(tags) + img,name,src,ecchi=await gelb.getgelbimg(tag) + await api.post(f'#{tag} {src}',[(name,img)],{'sensitive':ecchi}) + +def unescape(thing): + out=[] + m=len(thing) + i=0 + while i