From b100d9c98673cf3c3dfc1a11a655d90003a61b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tollk=C3=BChn?= Date: Thu, 8 Oct 2026 09:48:54 +0200 Subject: [PATCH] - rename from jitsi_calendar to atocal, to reflect more the usage. This plugin allows to create events - add initial documentation --- README.md | 80 +++++++++++++++++++++++++++ appinfo/info.xml | 10 ++-- lib/AppInfo/Application.php | 6 +- lib/Controller/CalendarController.php | 4 +- templates/confirm.php | 26 ++++----- templates/style.css | 30 +++++----- 6 files changed, 118 insertions(+), 38 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..86c2711 --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +# AToCal — Add To Calendar + +A Nextcloud app that lets remote applications create events in the +authenticated user's Nextcloud Calendar via a simple link. + +## How it works + +``` +remote app Nextcloud (atocal) + | | + | GET /apps/atocal/confirm | + | summary, start, end, ... | + |----------------------------->| + | | confirm page + |<-----------------------------| + | | + | POST /apps/atocal/create | (CSRF token from form) + |----------------------------->| + | | event in "Personal" calendar + |<-----------------------------| redirect to Calendar app +``` + +The remote app links the user to the confirm page. The user reviews +the event and submits the form. The event lands in the user's +"Personal" calendar and the browser opens the Calendar app. + +## Routes + +| Method | Path | Purpose | +|--------|------|---------| +| GET | `/apps/atocal/confirm` | Show confirmation page | +| POST | `/apps/atocal/create` | Create the event | + +## Link parameters (GET `/confirm` and form POST `/create`) + +| Parameter | Required | Rules | +|-----------|----------|-------| +| `summary` | yes | max 255 chars | +| `start` | yes | datetime-local, e.g. `2026-10-07T14:15` | +| `end` | yes | after `start`, same format | +| `description` | no | max 10000 chars | +| `location` | no | HTTPS URL | +| `url` | no | HTTPS URL; merged into description | +| `organizer` | no | email address | + +Dates carry no timezone and are interpreted in the user's Nextcloud +timezone (server default as fallback). + +Example: + +``` +https://cloud.example.com/apps/atocal/confirm?summary=Kickoff&start=2026-10-12T10:00&end=2026-10-12T11:00&location=https%3A%2F%2Fmeet.example.com%2Fkickoff +``` + +## Requirements + +- Nextcloud 34 or 35 +- Calendar app enabled +- A writable calendar named "Personal" + (event creation fails with a friendly error otherwise) + +## Install + +Copy this directory to the Nextcloud server as +`custom_apps/atocal`, then: + +``` +occ app:enable atocal +``` + +## Structure + +``` +appinfo/info.xml app metadata +appinfo/routes.php routes +lib/AppInfo/Application.php container setup +lib/Controller/CalendarController.php confirm/create logic +templates/confirm.php confirmation page +templates/style.css page styles +``` diff --git a/appinfo/info.xml b/appinfo/info.xml index c059b23..8696f52 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -1,15 +1,15 @@ - jitsi_calendar - Jitsi Calendar - Create Jitsi meetings in the user's Nextcloud Calendar + atocal + Add To Calendar + Create events in the user's Nextcloud Calendar - Allows the Jitsi meeting launcher to create calendar events in the authenticated user's Nextcloud Calendar. + Allows remote applications to create calendar events in the authenticated user's Nextcloud Calendar. 1.0.0 AGPL Stefan Tollkühn s.tollkuehn@bnvb-ingenieure.de - JitsiCalendar + AToCal integration diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 40c4f06..2dc35f3 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -2,15 +2,15 @@ declare(strict_types=1); -namespace OCA\JitsiCalendar\AppInfo; +namespace OCA\AToCal\AppInfo; -use OCA\JitsiCalendar\Controller\CalendarController; +use OCA\AToCal\Controller\CalendarController; use OCP\AppFramework\App; use OCP\AppFramework\IAppContainer; class Application extends App { - public const APP_ID = 'jitsi_calendar'; + public const APP_ID = 'atocal'; public function __construct(array $urlParams = []) { diff --git a/lib/Controller/CalendarController.php b/lib/Controller/CalendarController.php index 550e57c..cd2be32 100644 --- a/lib/Controller/CalendarController.php +++ b/lib/Controller/CalendarController.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace OCA\JitsiCalendar\Controller; +namespace OCA\AToCal\Controller; -use OCA\JitsiCalendar\AppInfo\Application; +use OCA\AToCal\AppInfo\Application; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\Attribute\NoAdminRequired; use OCP\AppFramework\Http\Attribute\NoCSRFRequired; diff --git a/templates/confirm.php b/templates/confirm.php index ffaa1a4..43dc05d 100644 --- a/templates/confirm.php +++ b/templates/confirm.php @@ -12,34 +12,34 @@ $h = static function (string $value): string { ?>
-
+
-
+

- Add Jitsi Meeting to Calendar + Add To Calendar

-

+

The following meeting will be added to your Nextcloud Calendar.

-
+
-
+
-
+
Title
-
+
Description @@ -47,25 +47,25 @@ $h = static function (string $value): string {
-
+
Start
-
+
End
-
+
Organizer
-
+
Location -
+