Giter Club home page Giter Club logo

docker_retweet_bot's Introduction

Retweet-Bot for Twitter with Docker and Twython

This is the Docker version of my Twitter Bot

Installation

Clone the repository git clone https://github.com/shaderecker/docker_retweet_bot.git

and run the docker_build_and_run.sh script for easy and hassle-free setup or find the commands here:

# Build the Docker Image
docker build --no-cache --rm --pull -t twitter_bot .

# Stop the perhaps already running Docker Container
docker stop twitter_bot

# Remove the old Docker Container
docker container rm twitter_bot

# Docker Run Command to start a new container and mount the directory
docker run -d \
    --name twitter_bot \
    -v "$(pwd)/data/:/twitter_bot/data/" \
    --restart=unless-stopped \
    twitter_bot

Persistent Data Directory

The data directory gets mounted to the Docker Container and contains all the persistent files explained below:

twitter-creds

You can set up the API access for your Twitter account on https://developer.twitter.com/en/apps

Enter your API credentials in this file:
Put each item on a separate line and remove all quotes.

"Consumer Key"
"Consumer Secret"
"Access Token"
"Access Token Secret"

Run the following command to prevent your API credentials being accidentally pushed to git:
git update-index --skip-worktree data/twitter-creds

retweet-blacklist

All retweeted Tweet-IDs are saved in this file.
This ensures that no duplicate posts are tweeted (so the Twitter API doesn't complain).

users

A list of Twitter user that you want to iterate through (one user per line).
The file is prepopulated with some names, modify as you like.
Changes take immediate effect, so no need to restart anything.

buzzwords

A list of words that the filtered Tweets are checked against (one word per line).
At least one of those words needs to be included in a Tweet's text in order to get retweeted.
The file is prepopulated with some example words, modify as you like.
Changes take immediate effect, so no need to restart anything. (Surprise, huh)

docker_retweet_bot's People

Contributors

shaderecker avatar

Watchers

 avatar  avatar

Forkers

lucifer911

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.