A Flask-based web application that displays university course schedules, lab sessions, and announcements in a 16:9 kiosk format. Perfect for displaying in hallways, computer labs, or department offices.
- Dynamic Schedule Display: Shows lecture and lab schedules organized by day of the week
- Smart Pagination: Automatically creates slides to handle busy days with many events
- Time-based Announcements: Displays relevant announcements based on current date
- Responsive Design: Clean, readable interface suitable for kiosk displays
- Raspberry Pi Ready: Automated installation script for dedicated kiosk deployment
- Python 3.7 or higher
- pip (Python package installer)
-
Clone or download the project files to your desired directory:
cd /path/to/your/project
-
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment:
- Windows:
.venv\Scripts\activate
- macOS/Linux:
source .venv/bin/activate
- Windows:
-
Install required dependencies:
pip install flask flask-cors
-
Create the data directory and CSV files (see Data Setup section below)
-
Run the application:
python app.py
-
Access the kiosk display:
For a more detailed setup guide, see Raspberry Pi Kiosk Display Setup Guide
For a complete, production-ready kiosk setup on Raspberry Pi that automatically starts on boot:
-
Transfer your project files to your Raspberry Pi
-
Make the installation script executable:
chmod +x install_kiosk.sh
-
Run the automated installation script:
./install_kiosk.sh
-
Follow the prompts to complete the installation
-
Add your CSV data files to
/opt/kiosk-display/data/
-
Reboot to see the kiosk display start automatically:
sudo reboot
The installation script will:
- Install all required system packages and dependencies
- Set up the Flask application as a systemd service
- Configure Chromium to launch automatically in fullscreen kiosk mode
- Optimize the system for kiosk display usage
- Create backup and uninstall scripts for easy maintenance
If your Raspberry Pi doesn't output to HDMI properly (especially with KVM switches, splitters, or some monitors), add this line to /boot/firmware/config.txt
:
sudo nano /boot/firmware/config.txt
Add:
hdmi_force_hotplug=1
Then reboot. This forces HDMI output even when no display is detected at boot time.
your-project/
├── app.py # Main Flask application
├── install_kiosk.sh # Automated Raspberry Pi installation script
├── data/ # Data directory
│ ├── lecture_schedule.csv # Lecture schedule data
│ ├── lab_schedule.csv # Lab schedule data
│ └── announcements.csv # Announcements data
├── static/ # Static files
│ └── styles.css # Global style rules
├── templates/ # HTML templates (not included in provided code)
│ ├── schedule.html # Main paginated schedule template
└── .venv/ # Virtual environment (created during setup)
Create a data/
directory in your project root and add the following CSV files:
Controls what announcements are displayed based on date ranges.
Format:
StartDate,EndDate,Title,Announcement
08/25,08/31,Week 1: Module Name,"This week we will introduce the course and begin our first module..."
09/01,09/07,Week 2: Module Name,"This week we continue with..."
Fields:
StartDate
: Start date in MM/DD formatEndDate
: End date in MM/DD formatTitle
: Announcement titleAnnouncement
: Full announcement text (use quotes if contains commas)
Contains regular lecture schedules.
Format:
Subj,Crse,Sec,Title,Days,Time,Instructor,Location
CSCI,1100,1,Using Info Tech Lecture,M,08:15 am-10:15 am,"Chelsie Dubay, Ryan Haas",Rogers Stout Hall 118
CSCI,1100,2,Using Info Tech Lecture,TWR,10:30 am-11:50 am,"John Smith",Rogers Stout Hall 102
Fields:
Subj
: Subject code (e.g., CSCI)Crse
: Course number (e.g., 1100)Sec
: Section numberTitle
: Course titleDays
: Days of week (M=Monday, T=Tuesday, W=Wednesday, R=Thursday, F=Friday, S=Saturday, Su=Sunday)Time
: Time range in 12-hour formatInstructor
: Instructor name(s)Location
: Classroom location
Contains lab schedules with date ranges.
Format:
Subj,Crse,Sec,Title,Days,Time,Instructor,Date (MM/DD),Location
CSCI,1150,001,Using Information Tech Lab,M,08:55 am-10:15 am,"Chelsie Dubay, Ryan Haas",08/25-12/11,Sam Wilson Hall 320
Fields:
- Same as lecture_schedule.csv, plus:
Date (MM/DD)
: Date range when lab is active (MM/DD-MM/DD format)
-
Activate your virtual environment (if not already activated):
# Windows .venv\Scripts\activate # macOS/Linux source .venv/bin/activate
-
Start the Flask application:
python app.py
-
Access the application:
- Main kiosk display: http://localhost:5000
- Simple view: http://localhost:5000/simple
After running the installation script:
- Check service status:
sudo systemctl status kiosk-display
- View logs:
sudo journalctl -u kiosk-display -f
- Restart service:
sudo systemctl restart kiosk-display
- Update data: Copy new CSV files to
/opt/kiosk-display/data/
- Automatic Pagination: Days with many events are automatically split across slides
- Time-based Announcements: Only shows announcements that are currently active
- Smart Grouping: Events are grouped by day and sorted by start time
- Special Handling: "Using Info Tech" courses are automatically renamed to CSCI 1100/1150
-
Use a production WSGI server like Gunicorn:
pip install gunicorn gunicorn -w 4 -b 0.0.0.0:8000 app:app
-
Set up a reverse proxy (nginx recommended) to serve the application
-
Consider using systemd or similar to manage the service
- Set up auto-refresh in your browser to reload the page periodically
- Use fullscreen mode for best kiosk experience
- Consider using a dedicated kiosk browser or kiosk mode in Chrome/Firefox
- Adjust
max_events_per_day
in thepaginate_schedule()
function call (currently set to 5) - Modify the
DAYS_MAP
dictionary to change day abbreviations - Update the
_standardize_uit_name()
function to handle other course naming conventions
The application can be extended to read from databases or other data sources by modifying the parsing functions:
parse_lecture_csv()
parse_lab_csv()
parse_announcements_file_csv()
- Import errors: Make sure your virtual environment is activated and dependencies are installed
- File not found errors: Ensure the
data/
directory exists and contains the required CSV files - Date parsing issues: Check that date formats in CSV files match the expected MM/DD format
- Display issues: Verify that your HTML templates are properly configured\
- Emojis don't display in Chromium:
sudo apt install fonts-noto-color-emoji; fc-cache -f -v; reboot
- Service won't start: Check logs with
sudo journalctl -u kiosk-display
- Chromium won't launch: Verify the start script is executable and Flask service is running
- No HDMI output: Add
hdmi_force_hotplug=1
to/boot/firmware/config.txt
and reboot - Display turns off: The installation script disables screen savers, but some displays may still power down
The application runs in debug mode by default during development, which provides helpful error messages. For production, the installation script configures Gunicorn for better performance and reliability.
For Raspberry Pi kiosk installations:
# Copy new CSV files to the data directory
sudo cp your-new-files.csv /opt/kiosk-display/data/
# The service will automatically pick up changes
The installation script creates a backup script at /home/pi/backup_kiosk_config.sh
. Run it to create a backup of your current configuration:
/home/pi/backup_kiosk_config.sh
To completely remove the kiosk installation:
/home/pi/uninstall_kiosk.sh
Do whatever you want.