Files
silverbullet-icalendar/README.md
Marek S. Lukasiewicz 1de79df25d Define the event object
2025-01-05 17:14:34 +01:00

2.4 KiB

SilverBullet iCalendar Plug

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.

Installation

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!

Configuration

This plug can be configured with Space Config, these are the default values and their usage:

icalendar:
  # where to get the iCalendar data from
  sources:
  - url: https://example.com/calendar.ics
    # override calName for events from this source, otherwise X-WR-CALNAME is used
    name: Example calendar

Usage

The plug provides the query source ical-event, which corresponds to VEVENT object

Examples

Select events that start on a given date

```query
ical-event
where start =~ /^2024-01-04/
select summary, description
```

Roadmap

  • Add instructions for popular services:
    • Nextcloud
    • Google Calendar
  • Write config schema
  • Add calName property to event object
  • Command for plug version with lower priority (cf. silverbullet-grep)
  • Cache the calendar according to REFRESH-INTERVAL or X-PUBLISHED-TTL, command for manual update
  • More query sources:
    • ical-todo for VTODO components
    • ical-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)

Contributing

If you find bugs, report them on the issue tracker on GitHub.

Building from source

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).

License

MIT, following SilverBullet