Configuration
Meal plan automation settings.
Basic Settings
Enable or disable automatic meal plan posting.Set to
false to disable the meal plan feature entirely.URL to the PDF meal plan.
The URL should point directly to a PDF file. The bot downloads this PDF and converts it to an image.
Check interval in minutes.The bot checks if it’s time to post the meal plan every 30 minutes. This doesn’t need to be exact since posting only happens at the scheduled day and time.
Lower values make the posting time more precise but use more resources. 30 minutes is a good default.
Scheduling
Day of the week to post the meal plan.Valid values:
MondayTuesdayWednesdayThursdayFridaySaturdaySunday
Cafeterias typically post weekly plans on Monday mornings.
Time of day to post the meal plan (24-hour format).Format:
HH:MM:SSThe bot posts the meal plan when both the day matches and the current hour matches the configured hour.Time is checked against the server’s local timezone.
Image Settings
PDF to image conversion settings.
DPI (dots per inch) for rendering the PDF.Higher values produce sharper images but larger file sizes. 400 DPI is a good balance for readable text.
Image quality from 0-100.100 is maximum quality (least compression). Lower values reduce file size.
Whether to flatten the image layers.Set to
true to merge all layers in the PDF. Usually not needed for simple meal plans.Maximum width in pixels.The image will be scaled to fit within this width while maintaining aspect ratio.
Maximum height in pixels.The image will be scaled to fit within this height while maintaining aspect ratio.
How It Works
- Every
checkminutes, the bot checks the current day and time - If it matches
postOnDayandpostAtHour, the bot:- Downloads the PDF from the configured URL
- Converts it to a PNG image using the image settings
- Posts it to the configured meal plan channel
- Pings users with the
mealplannotifyrole - Adds a button for users to subscribe to notifications
- The bot tracks which days it has posted to avoid duplicates
Force Posting
Staff members can manually trigger a meal plan post using:Example Post
mealplannotify role and get pinged for future meal plans.
System Requirements
Install ImageMagick:Ubuntu/Debian
macOS