Skip to content

Latest commit

 

History

History
72 lines (38 loc) · 2.93 KB

README.md

File metadata and controls

72 lines (38 loc) · 2.93 KB

Boris

Tool to post daily random tweets for a responsible Twitter bot

GitHub tag License

Python dependency - tweepy

Features

  • Connect to the Twitter API.
  • Tweet from the command-line or using a scheduled cron job.
  • Generate a tweet message from your custom lists of messages, emojis and hashtags.
  • Search for top tweets about a topic of interest and automatically favorite them.

Example usage

After configuring auth details and setting up configured content, you can run boris.py script on the command-line. This will generate a random status using configured text files and then post it as a tweet to a Twitter account.

$ ./boris.py
Message:
'Boris is replacing all his internet passwords with passwords of at least 20 characters. #GDPR'

Updating timeline.
See the tweet at: https://twitter.com/boristhebabybot

The unicron repo is recommended for scheduling this project to ensure the bot posts daily as soon as it can, without posting multiple times in the day. Also, if it fails to post, it will retry later.

Who is Boris?

This project was developed to tweet random messages daily for the Boris The BabyBot account.

Though, this project could be configured easily to tweet for any Twitter account that you have access to, whether your personal account or a dedicated bot account.

Authorization

To access the Twitter API, you must apply for a Twitter developer account - that takes time and effort.

You can copy the API credentials from your dev account to this project's local config on machine. See setup instructions in Documentation for more details.

Documentation

Documentation

Development

If you are interested in how this project works, see the boris/lib/twitter.py module. That includes functions to connect and post to the Twitter API. It also combines the configured messages, emojis and hashtags randomly to generate a status.

Am I allowed to make a bot?

You are allowed by Twitter to make a bot account, but one that follows Twitter's restrictions.

I cover this in more details in the Bots section of my Python Twitter Guide project.

License

Released under MIT.