This is a tool to extract the Arsenal menu from the UNamur website.
Simply add the URL of the GetCalendar
function to your calendar. The URL is https://arsenalextractor-2209-func.azurewebsites.net/api/getcalendar
If you want to select the menu for the summary, you can add the ?menu={yourMenu}
query parameter to the URL. Valid options are:
vege
: Vegetarian menuday
: Day menusoup
: Soup of the day
Example: https://arsenalextractor-2209-func.azurewebsites.net/api/getcalendar?menu=vege
will show the vegetarian menu in the summary of the event.
You can see the menu directly on your browser with this link.
You can simply add the calendar to your Google Calendar by clicking on the +Google Calendar
button in the bottom right corner. For other calendar providers, you can copy the URL above and add it to your calendar manually.
This project runs on Azure Functions. Extracted data is stored in Cosmos DB and can be exported to a ICS file to display the menu in a calendar.
The menu is an image, so we need to extract the text from it. To do so, we use the Form Recognizer API from Azure Cognitive Services.
The extraction is done by the MenuExtractor
function. It is triggered by a Timer Trigger. The timer is set to run every Friday at 10:00 AM. The function will then extract the menu for the current week and store it in Cosmos DB.
The GetCalendar
function is triggered by an HTTP request. It will then return the menu in a ICS file. This file or URL can be added to a calendar to display the menu. If you use the URL, the calendar will be updated automatically.
To deploy this project, you can use the Bicep file inside infrastructure
folder. Then you can upload the code to Azure Functions using the Azure Functions extension for Visual Studio Code.
The bicep file will create the following resources:
- Azure Functions
- Azure Cognitive Services Form Recognizer
- Azure Cosmos DB
- Azure Storage Account
- Azure Application Insights
It will also set the following application settings:
CosmosDbConnectionString
: Connection string to the Cosmos DBAzureFormRecognizer:Endpoint
: Endpoint of the Form Recognizer APIAzureFormRecognizer:ApiKey
: API key of the Form Recognizer API
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. I will be happy to review your PR.
My website: vsantele.dev
ETH: 0x4E7fFf04Eb923F6d83Beab3F87b57a78286CefA3