I simply used the Python Schedule API to run my Beempy random image script on a timer!
I just set @honusurf to post a random image post once every 10 minutes, I am writing this post while I wait with my fingers crossed, and it worked. Don't worry, I won't leave it on forever, just shifts. I will set the timer to every 6 hours possibly?? What do you think?? I don't want repeats, at least too many so I still need to feed the machine with my original pics, housekeeping/ bot maintenance is still a lotta work!
Heree's the script:
from beem.imageuploader import ImageUploader
from beem import Steem
import random, os
if name == "main":
stm = Steem()
author = "honusurf"
path = "/Users/nick/random-surf"
random_filename = random.choice([
x for x in os.listdir(path)
if os.path.isfile(os.path.join(path, x))
image_path = random_filename
image_uploader = ImageUploader(steem_instance=stm)
img_link = image_uploader.upload(image_path, author, image_name="@honusurf:)")
title = "Random SURF by @honusurf!!" body = "Original Maui Surf Pics by @honusurf. "\ "Random photo uploaded with beempy image:![x]("\ "%s" % img_link["url"] parse_body = True self_vote = False tags = ["honu", "photo", "original", "maui", "beem", "bot", "post"] stm.post(title, body, author=author, tags=tags, parse_body=parse_body, self_vote=self_vote)
This little script is helpful, I just launched it and @honusurf already did one post on it's own! = Success! = Makes my life easier!There's still a lot I need to do to make the script better. I.E. delete image after posting so I don't get repeats!! The image folder is just used organize the groups, and the beempy still reads the images from the home directory, so that could be tweaked a bit. I also need to throw the hyperlink in to the large image! Also optimizing my image, getting AI to comment on the image and describe it, lol! Tons of work too do! If anyone has any suggestions and or additions please post in the comments below!
Then I had to shut it down!All tests worked out well, now for adding some more images and getting this set up for my other accounts!! Wow I really like thi Python stuff a lot!