Skip to content

carlosrsabreu/devo-abastecer

Repository files navigation

⛽️ Devo Abastecer (beta)

Important

⛽️ Update Gas Prices from DRETT 📈 Publish History Plot 💅 Format Codebase

🇵🇹 Informação acessível com os preços dos combustíveis na Madeira, publicada semanalmente no Twitter recorrendo a um bot.
🇬🇧 Up-to-date fuel prices in Madeira, conveniently updated weekly on Twitter via our automated bot.

Fuel price history

Gas History

Functionality Overview

This project automates the process of updating and publishing fuel prices in Madeira. The sequence summary below provides an overview of the main functionalities and interactions between components:

sequenceDiagram

    participant 🐍 joram.py
    participant 🐍 update_gas_prices.py
    participant 🐍 add_history.py
    participant 🐍 post_tweet.py

    🐍 update_gas_prices.py -->> 🐍 update_gas_prices.py: 🐍 constants.py: import constants
    🐍 update_gas_prices.py ->> 🐍 joram.py: 🆕 retrieve newest pdf gas info
    🐍 joram.py -->> 🐍 joram.py: 🌐 joram: get pdf content
    🐍 joram.py -->> 🐍 update_gas_prices.py: 🏷️ gas prices and creation date
    🐍 update_gas_prices.py -->> 🐍 update_gas_prices.py: 🐍 functions.py: retrieve week
    🐍 update_gas_prices.py -->> 🐍 update_gas_prices.py: 🐍 functions.py: replace key names
    🐍 update_gas_prices.py -->> 🐍 update_gas_prices.py: 📅 add start date, end date
    🐍 update_gas_prices.py ->> 🐍 update_gas_prices.py: 💾 update gas_info.json
    🐍 update_gas_prices.py ->> 🐍 add_history.py: 📊 add price to history
    🐍 add_history.py ->> 🐍 add_history.py: 💾 update gas_info_history.csv
    🐍 add_history.py ->> 🐍 add_history.py: 💾 update gas_info_history.json
    🐍 update_gas_prices.py ->> 🐍 post_tweet.py: 📩 make tweet
    🐍 post_tweet.py -->> 🐍 post_tweet.py: 📨 format tweet message
    🐍 post_tweet.py -->> 🐍 post_tweet.py: 📮 post tweet

Loading

About

Twitter bot that publishes weekly the fuel prices updates on Madeira island.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages