RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

Anyone has an idea how to autorun the bot

Open realdav2 opened this issue 4 years ago • 8 comments

Anyone has an idea how to autorun the bot meaning everytime it finishes one video it starts to make the next one ? Thx in advance (i am newbie)

realdav2 avatar Jun 06 '22 23:06 realdav2

Anyone has an idea how to autorun the bot meaning everytime it finishes one video it starts to make the next one ?

Thx in advance (i am newbie)

Run a timed python script, which after each script completion, it simply repeats the main.py script

nexuspcs avatar Jun 07 '22 12:06 nexuspcs

can u explain how to do that?

ItaiDanos avatar Jun 07 '22 13:06 ItaiDanos

Hey mate chek this #117 "os.system('python main.py') at the bottom of the main.py file in the if main block"

takes0 avatar Jun 07 '22 13:06 takes0

I mean can't we just wrap it in a while True loop and have the video outputted to a unique directory with a unique ID each time?

I actually have a fork that implements this, but didn't bother opening a PR as I didn't think it would have a demand. However, I'm happy to if it'll be of use to someone

Edit: Mb, didn't see that this was already mentioned in the linked issue. Ignore me!

asadhumayun avatar Jun 07 '22 18:06 asadhumayun

yes would love this added some kind of a looping mechanism. would need a way to take a list of targets of videos though versus just the 1 from a single run script.

Archemike avatar Jun 09 '22 14:06 Archemike

@AsadHumayun

Can you share your fork? I would be very interested in a fork that can run main.py on a loop

CJthisis avatar Jun 17 '22 12:06 CJthisis

I recently deleted my fork. However, if you go to the develop branch and download the version there, there's a variable called "TIMES_TO_RUN" in the .env.template file. You can set this to whatever number you desire, and it will automatically loop that many times.

https://github.com/elebumm/RedditVideoMakerBot/blob/develop/.env.template#L28

asadhumayun avatar Jun 17 '22 13:06 asadhumayun

After a bit of try and error, I have made a main.py file that repeats itself over and over again, without having to use the develop-branch, because the implementation of the TTS in that branch has lots of problems. You can download it here:

https://fastupload.io/DGVBsWsnnBmedBR

CJthisis avatar Jun 18 '22 07:06 CJthisis