Skip to content

kensaggy/underattackbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

underattackbot

A twitter bot that tweets whenever missiles are being fired on Israeli citizen population

Roll your own

There are some basic steps you'll need to do to run your own bot:

  1. Create a copy of config.yaml.default and rename it to config.yaml

  2. First you'll need to create a twitter app and get your API key and API secret (google it).

  3. Place them inside the config.yaml code where appropriate.

  4. Then run ./underattackbot.py gen-access-tokens from the terminal and follow the on screen instructions.

  5. Save the output generated from the previous step and edit config.yaml and insert your access_key and access_secret

  6. (optional) run a tweet test by running ./underattackbot.py tweet-test

  7. Added the watchdog.sh path to your crontab:

    echo "* * * * * /path/to/watchdog.sh" > my.cron
    echo "" >> my.cron
    cp my.cron /etc/cron.d
    

Bot

The bot itself is very simple, only a few dozen lines and should be pretty self explanitory.

###Watchdog This is a very basic watchdog script - it only test's for the existance of the pid file (that should be created by the python script upon start and deleted if closed cleanly (using Ctrl-C)). If the pid file is not found it will run the python script with nohup and output redirects.

Modify to your needs

You'll need to update the pid and script path's inside the watchdog.sh script. Also if you want, you can change the log file name in side the bot code.

About

A twitter bot that tweets whenever missiles are being fired on Israeli citizen population

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •