Skip to content

betzerra/daily-bot

Repository files navigation

daily-bot

Set up

  1. cp config.yml.example config.yml
  2. Edit config.yml (see "Config File")
  3. bundle install

Installing RMagick

This is needed for the vaccines_step when generating the graphs.

Raspbian

sudo apt-get update
sudo apt-get install libmagickcore-dev libmagickwand-dev
gem install rmagick

source

Config File

Check an example file here.

Mandatory tokens (Telegram)

telegram:
  token: telegram_token
  chat_id: chat_id

⚠️ This key / values are mandatory.

Script

clarinete news

Gets trending news from this URL.

- type: clarinete_news

covid

Shows a summary with daily increments about COVID-19 cases.

- type: covid
  country: argentina

⚠️ You have to specify the country.

dollar

Shows the dollar (blue and oficial) exchange rate in Argentina 💸

- type: dollar

random_message

Posts one random message

- type: random_message
  messages:
    - random message 1
    - random message 2
    - random message 3

random_gif

Posts a gif that contains one tag from the ones you specify.

script:
  - type: random_gif
    tags:
      - firs tag
      - second tag
      - third tag

giphy:
  token: giphy_token

Get an API Token.

Squanchy (Random Quotes from an API)

Fetches random quote from this URL

- type: squanchy

vaccines

Posts a COVID-19 vaccine daily stats from Argentina.

- type: vaccines
  text_summary_enabled: true
  graph_period_days: 14

weather

Posts current weather information (checkout weather_forecast, is cooler).

script:
- type: weather
  city: Buenos Aires
  
openweather:
  token: openweather_token

Get an API Token

weather_forecast

script:
- type: weather_forecast
  lat: -34.586217
  lon: -58.477769
  
openweather:
  token: openweather_token

weather_forecast will show a daily forecast given an specific location.

Get an API Token

Run the app

  1. Make sure you have added your bot into the channel (or group) you want.
  2. ruby app.rb

Run this daily

I used cron jobs

Tests

make test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages