This nodejs app will let you test IcalCalendar behavior:
- Get a list of the events retrieved from your calendar(s)
- Get the next event happening across all your calendars
- Get a list of your events happening today
- Get a list of your events happening tomorrow
- Clone the repo
git clone https://github.com/runely/calendar-homey-test.git
- Install dependencies
npm i
- Add your calendars
- Create the file
calendars.json
- Insert the following to test the test calendar
{ "calendars": [ { "name": "Default", "uri": "https://raw.githubusercontent.com/runely/calendar-homey-test/master/calendars/default.ics", "import": true, "eventLimit": { "value": 2, "type": "months" }, "options": { "saveAll": false, "saveActive": false, "showMeetingUrls": false, "printAllEvents": false, "printEventByIndex": -1, "printEventByUID": "" }, "logProperties": [], "tz": "Europe/Oslo" } ] }
- Add your own calendars to the list
- If you want to test a local ics file, swap out the uri with full path to the ics file and add
"isLocalFile": true
to"options"
- If you want to test a local ics file, swap out the uri with full path to the ics file and add
- Create the file
- Get a list of the events retrieved from your calendar(s)
npm run calendars
- Get the next event happening across all your calendars aswell
npm run calendars-and-next-event
- Get a list of your events happening today aswell
npm run calendars-and-todays-events
- Get a list of your events happening tomorrow aswell
npm run calendars-and-tomorrows-events
To change how far into the future you want to retrieve events:
- Open
calendars.json
and find the calendar you want to adjust - Change
value
to any number andtype
to one of the predefined types- "days", "hours", "milliseconds", "minutes", "months", "quarters", "seconds", "weeks", "years"
If you want to save all events retrieved/parsed through node-ical:
- Open
calendars.json
and find the calendar you want to adjust - Set
saveAll
totrue
to save the file, otherwise set it tofalse
- If set to
true
, the file will be saved tocontents/raw/<name>_<date>.json
If you want to save active events retrieved/parsed through node-ical:
- Open
calendars.json
and find the calendar you want to adjust - Set
saveActive
totrue
to save the file, otherwise set it tofalse
- If set to
true
, the file will be saved tocontents/active/<name>_<date>.json
Change timezone per calendar:
- Open
calendars.json
and find the calendar you want to adjust - Add or change the property
tz
and set the timezone you want for that calendar
Show meeting urls:
- Open
calendars.json
and find the calendar you want to adjust - Change
showMeetingUrl
from false to true
Print all events to console:
- Open
calendars.json
and find the calendar you want to adjust - Change
printAllEvents
from false to true
Print event by index to console:
- Open
calendars.json
and find the calendar you want to adjust - Change
printEventByIndex
from -1 to 0 or higher
Print event by UID to console:
- Open
calendars.json
and find the calendar you want to adjust - Change
printEventByUID
from "" to "UID-of-event"
Add properties you want printed to console per event per calendar:
-
Open
calendars.json
and find the calendar you want to adjust -
Add
event
to thelogProperties
array for console logging out the whole eventAND/OR
-
Add one or more of these event property names to the
logProperties
arraytype
params
tzid
description
rrule
recurrences
recurrenceid
exdate
uid
summary
start
datetype
end
class
priority
dtstamp
transparency
status
sequence
location
method
prodid
version
WR-CALNAME
WR-TIMEZONE
LIC-LOCATION
created
lastmodified
organizer
attendee
url
attach
categories
calscale
MICROSOFT-CDO-APPT-SEQUENCE
MICROSOFT-CDO-BUSYSTATUS
MICROSOFT-CDO-INTENDEDSTATUS
MICROSOFT-CDO-ALLDAYEVENT
MICROSOFT-CDO-IMPORTANCE
MICROSOFT-CDO-INSTTYPE
MICROSOFT-DONOTFORWARDMEETING
MICROSOFT-DISALLOW-COUNTER
MICROSOFT-CDO-OWNERAPPTID
MICROSOFT-EVENTPROPERTIESTODELETE
MICROSOFT-ONLINEMEETINGCONFLINK
MICROSOFT-ONLINEMEETINGINFORMATION
MICROSOFT-SCHEDULINGSERVICEUPDATEURL
MICROSOFT-SKYPETEAMSMEETINGURL
MICROSOFT-SKYPETEAMSPROPERTIES
MICROSOFT-LOCATIONS
MS-OLK-AUTOFILLLOCATION
MS-OLK-CONFTYPE
APPLE-STRUCTURED-LOCATION
APPLE-TRAVEL-ADVISORY-BEHAVIOR
APPLE-TRAVEL-START