Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tech] Calendar entries across monthly borders #110

Merged
merged 4 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Dockerfile.pfusch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ubuntu:22.04
LABEL maintainer="Raphael Lehmann <raphael+docker@rleh.de>"
LABEL description="Jekyll Pfusch image"

WORKDIR /work

ADD Gemfile /work

ENV LANG="en_US.UTF-8"
ENV TZ=Europe/Berlin
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -qq && \
apt-get upgrade -y -qq && \
apt-get install -y -qq \
ruby-full \
rubygems \
libffi-dev \
build-essential && \
apt-get clean -qq
RUN gem install jekyll bundler
RUN bundle install
14 changes: 2 additions & 12 deletions _data/calendar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -635,12 +635,7 @@
- title: TechTurbo 2023
datum: "2023-11-30"
uhrzeit: "16.00h"
dauer: 8
ort: "Gruppenunterkunft Auszeit Eifel, Auf der Batterie 9, Schleiden"
- title: TechTurbo 2023
datum: "2023-12-01"
uhrzeit: "00.00h"
dauer: 62
dauer: 70
ort: "Gruppenunterkunft Auszeit Eifel, Auf der Batterie 9, Schleiden"

- title: Frühstück
Expand Down Expand Up @@ -825,12 +820,7 @@
- title: TechTurbo 2024
datum: "2024-11-28"
uhrzeit: "18.00h"
dauer: 54
ort: "Gruppenunterkunft Auszeit Eifel, Auf der Batterie 9, Schleiden"
- title: TechTurbo 2024
datum: "2024-12-01"
uhrzeit: "00.00h"
dauer: 14
dauer: 68
ort: "Gruppenunterkunft Auszeit Eifel, Auf der Batterie 9, Schleiden"

- title: Geschäftsführende Versammlung
Expand Down
23 changes: 14 additions & 9 deletions static/calendar.ics
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,25 @@ DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
{% assign uids = "" -%}
{% for termin in site.data.calendar -%}
{% assign start_uhrzeit = termin.uhrzeit | remove: "h" | remove: "." | append: "00" -%}
{% assign start = termin.datum | remove: "-" | append: "T" | append: start_uhrzeit -%}
{% assign start_date = termin.datum | append: " " | append: termin.uhrzeit | remove: "h" | replace: ".", ":" | date: '%s' -%}
{% assign start = start_date | date: '%Y%m%dT%H%M%S' -%}
{% if uids contains start -%}
{% assign uidaddition = termin.ort | url_encode -%}
{% assign uid = start | append: uidaddition -%}
{% else -%}
{% assign uid = start -%}
{% endif -%}
{% assign uids = uids | append: "," | append: uid -%}
{% if termin.dauer -%}
{% assign dauer = termin.dauer | times: 100 -%}
{% assign dauer_seconds = termin.dauer | times: 3600 -%}
{% else -%}
{% assign dauer = 100 -%}
{% assign dauer_seconds = 3600 -%}
{% endif -%}
{% assign end_uhrzeit = termin.uhrzeit | remove: "h" | remove: "." | plus: dauer -%}
{% assign dauer_tage = end_uhrzeit | divided_by: 2400 -%}
{% assign end_uhrzeit = end_uhrzeit | modulo: 2400 -%}
{% assign end = termin.datum | remove: "-" | plus: dauer_tage | append: "T" | append: end_uhrzeit | append: "00" -%}
{% assign end = start_date | plus: dauer_seconds | round | date: '%Y%m%dT%H%M%S' -%}
BEGIN:VEVENT
UID:meeting+{{ start }}@techaachen.de
UID:meeting+{{ uid }}@techaachen.de
SUMMARY:TechAachen - {{ termin.title }}
LOCATION:{{ termin.ort }}
DTSTART;TZID=Europe/Berlin:{{ start }}
Expand Down
Loading