https://github.com/angristan/twitter-pic-bot
A very simple Ruby bot that tweets random pictures from a directory
https://github.com/angristan/twitter-pic-bot
bot ruby twitter
Last synced: over 1 year ago
JSON representation
A very simple Ruby bot that tweets random pictures from a directory
- Host: GitHub
- URL: https://github.com/angristan/twitter-pic-bot
- Owner: angristan
- License: mit
- Created: 2018-11-30T22:53:48.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-23T20:36:54.000Z (about 5 years ago)
- Last Synced: 2025-03-15T15:45:03.279Z (over 1 year ago)
- Topics: bot, ruby, twitter
- Language: Ruby
- Homepage:
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Twitter Picture Bot
A very simple bot that tweets random pictures from a directory
## Installation
```sh
$ git clone https://github.com/angristan/twitter-pic-bot
$ cd twitter-pic-bot
$ bundle install
```
## Configuration
Create an app on [app.twitter.con](https://apps.twitter.com/) and get your credentials.
Copy `.config-sample.rb` to `.config.rb` and fill it with these credentials.
## Usage
```sh
$ ruby bot.rb
```
It will tweet a random picture (`{jpg,jpeg,png,gif}`) from the `./media/` folder.
You can put this in a cron or modify the script to use [sleep()](https://ruby-doc.org/core-2.5.0/Kernel.html#method-i-sleep) in an infinite loop.