Skip to content

Commit

Permalink
calender cache
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzapanther committed Nov 25, 2023
1 parent 788e376 commit cc2bf7c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
14 changes: 14 additions & 0 deletions wwfunc/packages/wildweb/calcache/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import requests

from filecache import filecache

@filecache(10 * 60)
def main():
resp = requests.get("https://calendar.google.com/calendar/ical/62da059a43acfa2924e50e6aaa43e3aed3728f7eda51af7d7a43f0313404e09c%40group.calendar.google.com/public/basic.ics")
return {
"headers": {
"Content-Type": "text/calendar"
},
"statusCode": 200,
"body": resp.text
}
7 changes: 7 additions & 0 deletions wwfunc/packages/wildweb/calcache/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

virtualenv --without-pip virtualenv

pip install -r requirements.txt --target virtualenv/lib/python3.11/site-packages
1 change: 1 addition & 0 deletions wwfunc/packages/wildweb/calcache/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
filecache==0.81

0 comments on commit cc2bf7c

Please sign in to comment.