Generates a matchday overview automatically.
- import libraries
- creates a class to store match data
- creates a function that gets the title of the matchday
- creates a function that centers text horizontally
- creates a function that draws a match on the image
- creates a function that loads the matches from online sources
- creates a function that puts all the text and icons together as 1 image
- creates a function that normalizes official team names
- creates a function that gets the city based on the normalized team name
- creates a function that displays error messages
- creates a function that displays succes messages
- load city names from json
- load matches from online sources
- load images from /res folder
- load fonts
- calculate how many posts to make
- make that amount of posts
Amount of posts to make = matches // 3 (+1 if matches%3>0)Amount of matches on current post = 3 if len(matches) - (index * 3) >= 3 else len(matches) % 3
- os -> to clear screen
- re -> to normalize team names
- json -> to translate teams to cities
- datetime -> to get the date names
- requests -> to get the matches from online sources
- PIL -> to generate the post using text and images
- bs4 -> to find the matches inside the html code of the requests