From 70ccf5edbeb8b945dad739fd81cbbdc394dcc5ab Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 12 Sep 2025 09:34:23 +0200 Subject: [PATCH] add script to export emacs calendar Signed-off-by: Nico Schottelius --- export-calendar.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 export-calendar.sh diff --git a/export-calendar.sh b/export-calendar.sh new file mode 100755 index 0000000..22c42b3 --- /dev/null +++ b/export-calendar.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +emacs --batch ~/vcs/notes/public-agenda.org \ + --eval "(progn + (require 'org) + (org-icalendar-export-to-ics))" + +name=nico +endpoint=https://s3.k8s.place5.ungleich.ch +export KUBECONFIG=~/k8s/p5-admin.conf + +export S3_BUCKET_NAME=$(kubectl -n rook-ceph get configmap -o yaml ${name}-bucket-claim | yq .data.BUCKET_NAME) +export AWS_ACCESS_KEY_ID=$(kubectl -n rook-ceph get secrets -o yaml ${name}-bucket-claim | yq .data.AWS_ACCESS_KEY_ID | base64 -d ; echo "") +export AWS_SECRET_ACCESS_KEY=$(kubectl -n rook-ceph get secrets -o yaml ${name}-bucket-claim | yq .data.AWS_SECRET_ACCESS_KEY | base64 -d ; echo "") + + +s5cmd --endpoint-url ${endpoint} cp \ + --acl "public-read" \ + ~/vcs/notes/public-agenda.ics \ + s3://${S3_BUCKET_NAME}