nsbin/export-calendar.sh

21 lines
760 B
Bash
Raw Permalink Normal View History

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