Skip to content

davidbradway/DPS-Menu-Scraper

Repository files navigation

DPS Menu Scraper

Turn PDFs Lunch menus into Calendars.

Setup

One-time setup:

pip install -r requirements.txt
python setup.py

Set up Google API access as described here, here, and here.

Usage

To (re-)generate calendar menus:

python pdf_2_ics.py

The repository has also been set up to run the above script via a Github Actions workflow. It is currently configured to run once a night, for the first 5 days of each month. This creates a ZIP of the created ICS files, which can then be downloaded by the repository owners. It can then be posted as outlined below to the set of Google Calendars maintained by the same folks.

To post events to calendars (if you have write access):

python gcal.py

This has been tested with Python 3.11.11 and the following library versions:

arrow==1.3.0
attrs==25.1.0
beautifulsoup4==4.13.3
cachetools==5.5.1
certifi==2025.1.31
charset-normalizer==3.4.1
click==8.1.8
colorama==0.4.6
emoji==2.14.1
google-api-core==2.24.1
google-api-python-client==2.161.0
google-auth==2.38.0
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.1
googleapis-common-protos==1.67.0
httplib2==0.22.0
ics==0.7.2
idna==3.10
joblib==1.4.2
lxml==5.3.1
nltk==3.9.1
oauthlib==3.2.2
proto-plus==1.26.0
protobuf==5.29.3
pyasn1==0.6.1
pyasn1_modules==0.4.1
pyparsing==3.2.1
pypdf==5.3.0
python-dateutil==2.9.0.post0
python-docx==1.1.2
pytz==2025.1
regex==2024.11.6
requests==2.32.3
requests-oauthlib==2.0.0
rsa==4.9
six==1.17.0
soupsieve==2.6
TatSu==5.13.1
tqdm==4.67.1
types-python-dateutil==2.9.0.20241206
typing_extensions==4.12.2
uritemplate==4.1.1
urllib3==2.3.0

Critical Acclaim

“Gods!! This calendar link is amazing! Thank you sooooooo much!!”

“Thank you!! Super helpful, much appreciated!!”

“David, this is seriously the best email I’ve ever gotten!!! Thank you so much, looking up the menu everyday was so annoying, and my only old-guy solution was printing it onto paper 😂 … AMAZING!”

“This is amazing, David. My kiddo will not eat at school anymore (infuriating) but I know a lot of people will truly get a lot out of this. And right now, using our superpowers for the greater good is all we got! And it is extra important. Thanks“

“You sir are the man! Well done!”

“Incredible”

“Not all hoagies wear capes. Thanks David!”

“Thanks David! … I've heard from a lot of folks that the menu situation is annoying. So definitely it would be valuable to host on ekpowe.org for families as well.“

“Works great!!! Thanks!”

“This is awesome. Thanks!”

“Those are serious superpowers, David! awesome!”

“This is fantastic! My son asks about the menu every morning and I love having it on my calendar.”

Get the calendars!

About

Turns Lunch Menu PDFs posted on DPS website into CAL files for Google Calendar

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •