Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for caldav, icloud, ics calendars #43

Merged
merged 29 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d1faf88
Add support for caldav, icloud, ics calendars
anthonyscorrea Nov 7, 2022
d57d5a6
make ics datetimes timezone aware for comparison
mendhak Nov 14, 2022
2575727
Using icalevnt to get recurring and normal events
mendhak Nov 14, 2022
706f6bc
Local debugging capabilities for VSCode
mendhak Nov 20, 2022
016257d
Workaround, if dtend is not present, calculate it from duration
mendhak Nov 20, 2022
5573b0b
pip freeze, and local dev instructions
mendhak Nov 20, 2022
f833f1c
pip freeze, and local dev instructions
mendhak Nov 20, 2022
a325018
Install from requirements.txt, it's safer
mendhak Nov 20, 2022
c058119
Refactor to use common date format method
mendhak Nov 20, 2022
ed424d3
Use subcomponents to get caldav events
mendhak Nov 20, 2022
7b0b6da
Return max requested results
mendhak Nov 20, 2022
f1dfff4
Clean up unused module
mendhak Nov 20, 2022
57bfeee
Move caldav into calendar provider module
mendhak Nov 20, 2022
38dc61c
Move caldav into calendar provider
mendhak Nov 20, 2022
e5c66f7
use type to check instance type as isinstance for datetime.date retur…
mendhak Nov 20, 2022
2a29c7a
Move from and to date into the calling script
mendhak Nov 20, 2022
557fba8
Python linting and cleanup
mendhak Nov 20, 2022
28b9322
Move ICS into provider module
mendhak Nov 20, 2022
77f377d
Outlook calendar as provider module
mendhak Nov 22, 2022
5462bc5
Suffix Calendar to calendar classes
mendhak Nov 22, 2022
15d7950
Move google calendar into provider module
mendhak Nov 22, 2022
d0ef058
Remove util scripts as no longer needed
mendhak Nov 23, 2022
c18f304
Correct pip install instructions
mendhak Nov 23, 2022
6a08b41
Create empty calendar items if not enough events were fetched
mendhak Nov 23, 2022
1339555
ICS and CalDav instructions
mendhak Nov 23, 2022
4720937
Add to table of contents
mendhak Nov 23, 2022
4740bd9
Local debug instructions
mendhak Nov 24, 2022
0e5848c
Changelog
mendhak Nov 25, 2022
3d39847
Allow trailing spaces in markdown files
mendhak Nov 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8

# 4 space indentation
[*.{py,java,r,R}]
indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false
charset = utf-8
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ env.sh
*.pickle
credentials*
*.json
!.vscode/*
*.bin
test.svg
*.xml
venv
cache_
cache_
.venv
.env
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"EditorConfig.EditorConfig", "ms-python.python"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": [

]
}
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"envFile": "${workspaceFolder}/.env",
"preLaunchTask": "Source Shell"

}
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.defaultInterpreterPath": ".venv/bin/python",
"python.envFile": "${workspaceFolder}/env.sh",
"python.terminal.activateEnvironment": true,
"python.linting.flake8Enabled": true,
"python.linting.enabled": true
}
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Source Shell",
"type": "shell",
"command": "source env.sh; printenv > ${workspaceFolder}/.env;"
}
]
}
36 changes: 21 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,53 @@
## 2022-11-25
* ICS and CalDav calendar support added by [anthonyscorrea](https://github.com/mendhak/waveshare-epaper-display/pull/43)
* Moved pip package list into requirements.txt. The package versions are fixed, it's simpler to install, and better stability.
* Refactored the calendar code into providers and simplified the code for better reuse
* Added instructions and VSCode integration for running and debugging the project locally

## 2022-10-04
* Bugfix: an `&` ampersand in event title would cause image generation to crash.
* Bugfix: an `&` ampersand in event title would cause image generation to crash.

## 2022-04-21
* By default, past calendar events will disappear from the list.
* By default, past calendar events will disappear from the list.
* Added option to show all past events from today, `CALENDAR_INCLUDE_PAST_EVENTS_FOR_TODAY=1`

## 2022-04-13
* Add new layouts for the user to choose from. Set the value `export SCREEN_LAYOUT=1` to 2, 3, 4...
* Layouts contributed by @feh123 and @jmason
* Added the ability to have custom SVGs added onto the rendered output. Done via `screen-custom-get.py` and `screen-custom.svg`.
* Layouts contributed by @feh123 and @jmason
* Added the ability to have custom SVGs added onto the rendered output. Done via `screen-custom-get.py` and `screen-custom.svg`.
* Bugfix: Multi day events will now show start and end days. eg, "Monday - Wednesday"

## 2022-04-10
* Use friendly day names for calendar entries, like "Today", "Tonight", "Tomorrow".
* If the calendar entry is within the next 6 days use the day name "Monday" "Tuesday", else use "Mon Apr 18".
* Use friendly day names for calendar entries, like "Today", "Tonight", "Tomorrow".
* If the calendar entry is within the next 6 days use the day name "Monday" "Tuesday", else use "Mon Apr 18".

## 2022-04-08
* Add Met Éireann weather and alert provider by [@jmason](https://github.com/mendhak/waveshare-epaper-display/pull/34)

## 2022-03-06
* Add weather.gov as a weather and alert provider
* Add VisualCrossing instructions to the README
* Rename the weather and alert and calendar cache files to use a `cache_` prefix. A little consistency.
* Rename the weather and alert and calendar cache files to use a `cache_` prefix. A little consistency.

## 2022-01-07

* Add cryptography==36.0.0 to setup. It's used by msal, but version 36.0.1 from piwheels produces [illegal instruction](https://github.com/piwheels/packages/issues/273)
* Add gsfonts to setup. It contains Nimbus fonts required by the SVG.
* Add gsfonts to setup. It contains Nimbus fonts required by the SVG.

## 2021-12-29

* Updated instructions for Raspberry Pi OS Bullseye. Many dependencies stopped working, fixed it now.
* Removed some dependencies that aren't needed anymore! BCM not needed. WiringPi is deprecated. LibJpeg doesn't look needed.
* Replace Inkscape with CairoSVG. Inkscape broke some commandline args, and CairoSVG seems better suited for commandline anyway.
* Updated Google Calendar instructions, it's simpler for now, until Google break their URLs again.
* Updated instructions for Raspberry Pi OS Bullseye. Many dependencies stopped working, fixed it now.
* Removed some dependencies that aren't needed anymore! BCM not needed. WiringPi is deprecated. LibJpeg doesn't look needed.
* Replace Inkscape with CairoSVG. Inkscape broke some commandline args, and CairoSVG seems better suited for commandline anyway.
* Updated Google Calendar instructions, it's simpler for now, until Google break their URLs again.

## 2021-10-29

* Bug fix - Outlook calendar entries will now show in local time, instead of UTC.
* Bug fix - Outlook calendar entries will now show in local time, instead of UTC.

## 2021-08-13

* Calendar entries will include all events from today, even if they are past.
* Calendar entries will include all events from today, even if they are past.

## 2021-08-10

Expand All @@ -67,7 +73,7 @@

## Before all that

* Basic weather, time and event dashboard.
* Basic weather, time and event dashboard.
* There were a few weather providers hardcoded
* There was PiHole stats but I removed it
* There was TFL train times but I removed it
Loading