silverbullet-icalendar
is a Plug for SilverBullet which I made for my girlfriend.
It reads external iCalendar data, also known as iCal and .ics
format, used in CalDAV protocol.
Run the {[Plugs: Add]} command in SilverBullet and add paste this URI into the dialog box:
ghr:Maarrk/silverbullet-icalendar
Then run the {[Plugs: Update]} command and off you go!
This plug is configured with Space Config, short example:
icalendar:
# where to get the iCalendar data from
sources:
- url: https://example.com/calendar.ics
# this will be set as sourceName on all results from this source
name: Example calendar
Instructions to get the source URL for some calendar services:
- Nextcloud (source):
- Edit calendar (pencil icon to the right of the name)
- Share calendar link
- Details (three dots icon), copy subscription link
- Verify that the link ends with
?export
- Google Calendar (source):
- Calendar settings (pencil icon to the right of the name)
- Settings and Sharing, scroll down to Integrate calendar
- Copy the link for Secret address in iCal format
The plug provides the query source ical-event
, which corresponds to VEVENT
object
Select events that start on a given date
```query
ical-event
where start =~ /^2024-01-04/
select summary, description
```
- Cache the calendar according to
REFRESH-INTERVAL
orX-PUBLISHED-TTL
, command for manual update - More query sources:
ical-todo
forVTODO
componentsical-calendar
showing information about configured calendars
- Describe the properties of query results
- Support
file://
URL scheme (use an external script or filesystem instead of authentication on CalDAV)
Pull requests with short instructions for various calendar services are welcome. If you find bugs, report them on the issue tracker on GitHub.
To build this plug, make sure you have SilverBullet installed. Then, build the plug with:
deno task build
Or to watch for changes and rebuild automatically
deno task watch
Then, copy the resulting .plug.js
file into your space's _plug
folder. Or build and copy in one command:
deno task build && cp *.plug.js /my/space/_plug/
SilverBullet will automatically sync and load the new version of the plug (or speed up this process by running the {[Sync: Now]} command).
MIT, following SilverBullet