Skip to content

Simple weather app made with Python and QtDesigner.

Notifications You must be signed in to change notification settings

Sm4rtSt1ck/bebther

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bebther

Simple weather app made with Python and QtDesigner.
The app is considered an open-source project, so feel free to modify and share Bebther as long as you attribute the original authors

Features

  • Shows weather info for different regions from different weather providers
  • Get and compare weather info between two days or regions
  • Save current weather info to the DataBase to compare it with the next day's weather
  • Open a screenshot-ready window containing weather info to share it with your friends
  • Add your own weather providers using a unique modular system

Known Issues

  • General unstability
  • Autorun being unstable sometimes
  • Autorun not working on Python 2:

    Python's system alias is python for Python 3 and py for Python 2, so the batch file tries to run non-existent for Win7 python comandlet.

  • UI freezing upon parsing data
  • AccuWeather parser failing to parse data

    AccuWeather's API has a 60 requests per day limit, so it doesn't return anything when the limit is exceeded

Installing a new parser

The Bebther application has a unique modular system allowing users to install or create their own parsers.

  1. Download the parser file from any resource you trust

    Be advised that the Python language allows the parser's developer perform any operations they want with your OS
    Parser file's name should end with Parser.py. example: owmParser.py

  2. Put the file in the ./Parsers/ folder
  3. Update the application's parsers list either using the UI button or by restarting the application
  4. Your new parser should show up in the parsers list in the application

Creating a new parser

The Bebther application has a unique modular system allowing users to install or create their own parsers.

  1. Create a python file in a ./Parsers/ directory

    IMPORTANT: the file's name should end with Parser.py, example: owmParser.py

  2. Create a class called Parser and inherit baseParser so it would be easier to follow the data type
  3. Create a parser information fields in your parser class

    Bold are neccessary

    Fields

    • [str] name - parsed resource's name, will be shown in the UI
    • [str] description - short description of the parser or the parsed resource
    • [str] url - link to the parsed resource's website
    • [str] apikey - parsed resource's API key if needed

    Methods

    • [str] getCity(cityName: str) - takes city name and returns its location ID
    • [dict] getData()(location_key: str) - takes location ID string and returns formatted data dictionary
  4. Create a getCity method that will take a city name and return a location ID that suits for your parser
  5. Create a getData method that will return a formatted dictionary of weather data

    PLEASE FOLLOW THE DATA FORMAT

    • Temperature
    • Humidity
    • WindSpeed
    • Pressure
    • UVIndex
    • DayTemperature
    • NightTemperature
    • SunriseTime
    • SunsetTime
  6. Update the application's parsers list either using the UI button or by restarting the application
  7. Your parser should show up in the parsers list in application's UI
    Feel free to share your parser in any possible way

Used Materials

Icons

All icons belong to flaticon
Barometer icon Barometer by Those Icons
Drop icon Drop by Good Ware
Night-mode icon Night-mode by rsetiawan
Sunny icon Sunny by kosonicon
Sunrise icon Sunrise by Secret Studio
Sunset icon Sunset by Nikita Golubev
Ultraviolet icon Ultraviolet by Freepik
Wind icon Wind by Freepik
Diskette icon Diskette by Yogi Aprelliyanto
Reset icon Reset by inkubators
Thanks to all creators listed above for their work and letting us use their materials free of charge

Authors

Created in terms of Yandex Lyceum pyQt project

  • Vsevolod Levitan (@1ffycat/@Iffycat) GitHub VK
  • Leonid Pashnin (@Sm4rtSt1ck) GitHub VK