add gitignore
This commit is contained in:
61
.gitignore
vendored
Normal file
61
.gitignore
vendored
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/test.py
|
||||||
|
|
||||||
|
__pycache__
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# pyflow
|
||||||
|
__pypackages__/
|
||||||
|
|
||||||
|
# Environment
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
|
||||||
|
# PyCharm #
|
||||||
|
.idea/**/workspace.xml
|
||||||
|
.idea/**/tasks.xml
|
||||||
|
.idea/dictionaries
|
||||||
|
.idea/**/dataSources/
|
||||||
|
.idea/**/dataSources.ids
|
||||||
|
.idea/**/dataSources.xml
|
||||||
|
.idea/**/dataSources.local.xml
|
||||||
|
.idea/**/sqlDataSources.xml
|
||||||
|
.idea/**/dynamic.xml
|
||||||
|
.idea/**/uiDesigner.xml
|
||||||
|
.idea/**/gradle.xml
|
||||||
|
.idea/**/libraries
|
||||||
|
*.iws /out/
|
||||||
28
test.py
28
test.py
@@ -1,28 +0,0 @@
|
|||||||
import os
|
|
||||||
import caldav
|
|
||||||
from datetime import datetime
|
|
||||||
import requests
|
|
||||||
from icalendar import Calendar, cal, Event
|
|
||||||
|
|
||||||
url = 'http://ical-cdn.teamsnap.com/team_schedule/5f1ddc9e-15b0-4912-84a2-11cc70e9e375.ics'
|
|
||||||
r = requests.get(url)
|
|
||||||
username = os.getenv('username')
|
|
||||||
password = os.getenv('password')
|
|
||||||
c = cal.Calendar.from_ical(r.content)
|
|
||||||
|
|
||||||
calendar_ical = [{
|
|
||||||
'dtstart':e['DTSTART'].dt,
|
|
||||||
'dtstart': e['DTEND'].dt,
|
|
||||||
'summary': e['summary']
|
|
||||||
}
|
|
||||||
for e in c.subcomponents
|
|
||||||
if isinstance(e, Event)]
|
|
||||||
|
|
||||||
with caldav.DAVClient(url=url, username=username, password=password) as client:
|
|
||||||
my_principal = client.principal()
|
|
||||||
|
|
||||||
calendars = my_principal.calendars()
|
|
||||||
calendar = my_principal.calendar(cal_id="9E2AC562-4328-4CA0-B4D1-D730D9F5E9EF")
|
|
||||||
events_fetched = calendar.date_search(
|
|
||||||
start=datetime(2022, 5, 23), end=datetime(2022, 5, 24), expand=True)
|
|
||||||
pass
|
|
||||||
Reference in New Issue
Block a user