A everyword bot implementation written in Ruby!
- Ruby (*nix package
ruby
or RubyInstaller) - A Twitter App
- Run
bundle install
to install the project dependencies. - Copy
config.example.yml
toconfig.yml
and add your application keys.source.example.txt
tosource.txt
and add your words.index.example.txt
toindex.txt
so the bot can count it's progress.
- Just execute
ruby everyword.rb
in the project directory.
Pretty simple, let's start explaining the setup:
source.txt
index.txt
source.txt
: You include all the words here that you want your bot to tweet!
index.txt
: Don't touch this file, it includes the line-number (zero-indexed), so the bot knows where to continue if it stops or crashes!
- The bot loads the index from the file, which is always 0 in the beginning (the first line)
- Looks up the word with the set index (0) and tweets that
- Increments the index by one and saves it to the index-file
- Repeat from 2
Besides the contents from source.txt
you can also customize other parts of the bot, main two being pre/suffixed contents in a tweet and the sleep time between tweets!
Prefixed Content Example (Line 48 of everyword.rb
)
client.update "Great #{get_line('source.txt', $index)}"
Suffixed Content Example (Line 48 of everyword.rb
)
client.update "#{get_line('source.txt', $index)} is great!"
Change Sleep Time (Line 50 of everyword.rb
)
sleep 30 * 60 # replace 30 with what you want, * 60 turns it into minutes
everyword is licensed under the aGPLv3 license.