nsbin/export-calendar.sh
Nico Schottelius 70ccf5edbe add script to export emacs calendar
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
2025-09-12 09:34:23 +02:00

20 lines
760 B
Bash
Executable file

#!/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}