Skip to content

Zike01/WalkingFrames

Repository files navigation

Walking Frames

A Twitter bot that posts every frame of a TV series/movie in order.
Made with Tweepy and OpenCV.

View the bot here.

Installation (Windows)

git clone https://github.com/Zike01/WalkingFrames.git
cd WalkingFrames
pip install -r requirements.txt

Usage

Frames processor

Create a video folder (input) and images folder (output). This can be anywhere on your computer.
Open framesprocessor.py and set the VIDEO_PATH and IMAGE_PATH at the top of the file. constants

Make sure the EXTENSION matches the extension of the video files.
Paste videos in your video folder and organise the folders like so:
file structure

ALL VIDEOS SHOULD HAVE THE SAME NAMING CONVENTION (S0Xe0X) FOR THE PROGRAM TO RUN

  • Run framesprocessor.py
  • Enter the current season you wish to process
  • Wait for output images to appear in the image folder.
  • Repeat for every season

Twitter API

Create a .env file in the project folder and set up the constants.

tokens

Create a Twitter developer account and open the developer dashboard

In settings make sure you set up user authentication (read and write). This will allow you to post your tweets. user auth

Go to Keys and tokens and generate the tokens required for authentication. tokens

Paste the newly generated values in the .env file. In case you lose these values they can be regenerated at any time through the developer portal.

Main Script

All you need to do here is change the TITLE constant to the name of the TV Show/movie you wish to post. You can also change the tweet caption on line 67 if you're posting movie frames.
Rename sample_config.txt to config.txt and configure the starting season, episode and frame.

title text

Task Scheduler

Find a way to schedule your script to run every X minutes. For windows you can use the task scheduler:

For free accounts you can only post 50 tweets/day, or roughly 1 tweet every 30 minutes.

About

A Twitter bot that posts every frame of a TV series/movie in order.

Resources

License

Stars

Watchers

Forks

Languages