Skip to content

Commit e8f66a3

Browse files
committed
Simplify ical for now
1 parent ed67a6d commit e8f66a3

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

_layouts/calendar-deadlines.ics

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,53 @@ METHOD:PUBLISH
33
VERSION:2.0
44
PRODID:-//{{ site.url }}//{{ site.github_repo }}//EN
55
X-PUBLISHED-TTL:PT1H{% for conf in site.data.conferences %}
6-
{%- if conf.cfp_ext -%}{%- assign cfp = conf.cfp_ext -%}{%- assign extended = "(extended)" -%}{%- else -%}{%- assign cfp = conf.cfp -%}{%- endif -%}
6+
{%- if conf.cfp_ext -%}
7+
{%- assign cfp = conf.cfp_ext -%}
8+
{%- assign extended = "(extended)" -%}
9+
{%- else -%}
10+
{%- assign cfp = conf.cfp -%}
11+
{%- endif -%}
12+
{%- if conf.timezone contains "UTC" -%}
13+
{%- assign tz = conf.timezone | split: "UTC" -%}
14+
{%- if tz[1] contains "-" -%}
15+
{%- assign tz = tz[1] | replace: "-", "+" -%}
16+
{%- elsif tz[1] contains "+" -%}
17+
{%- assign tz = tz[1] | replace: "+", "-" -%}
18+
{%- else -%}
19+
{%- assign tz = tz[1] -%}
20+
{%- endif -%}
21+
{%- else -%}
22+
{%- assign tz = "+0" -%}
23+
{%- endif -%}
724
{%- capture desc -%}<a href="{{conf.link}}">{{ conf.conference }} {{ conf.year }}</a> found on <a href="https://pythondeadlin.es">PythonDeadlin.es</a>.{%- endcapture -%}
825
{% if conf.workshop_deadline and conf.workshop_deadline != "TBA" %}
926
BEGIN:VEVENT
1027
SUMMARY:{{ conf.conference }} {{ conf.year }} Workshop Deadline
11-
UID:{{conf.conference | slugify: "latin"}}-{{conf.year}}-workshop {%- if conf.timezone contains "UTC" -%} {%- assign tz = conf.timezone | split: "UTC" -%} {%- if tz[1] contains "-" -%} {%- assign tz = tz[1] | replace: "-", "+" -%} {%- else if tz[1] contains "+" -%} {%- assign tz = tz[1] | replace: "+", "-" -%} {%- else assign tz = tz[1] -%} {%- endif -%}
12-
ORGANIZER:pythondeadlin.es
13-
{%- capture desc -%}<a href="{{conf.link}}">{{ conf.conference }} {{ conf.year }}</a> found on <a href="https://pythondeadlin.es">PythonDeadlin.es</a>.{%- endcapture -%}
14-
{{ desc | prepend: "DESCRIPTION:" | normalize_whitespace | wrap_lines }}
15-
DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%SZ" }}
16-
DTSTART;TZID=/Etc/GMT{{ tz }}:{{ conf.workshop_deadline | date: "%Y%m%dT%H%M%S" }}
17-
{% else %}
28+
UID:{{conf.conference | slugify: "latin"}}-{{conf.year}}-workshop
1829
ORGANIZER:pythondeadlin.es
1930
{{ desc | prepend: "DESCRIPTION:" | normalize_whitespace | wrap_lines }}
2031
DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%SZ" }}
21-
DTSTART;TZID=/{{ conf.timezone | default: "Etc/GMT+12" }}:{{ conf.workshop_deadline | date: "%Y%m%dT%H%M%S" }}
22-
{% endif %}END:VEVENT
32+
DTSTART;TZID=GMT{{ tz }}:{{ conf.workshop_deadline | date: "%Y%m%dT%H%M%S" }}
33+
END:VEVENT
2334
{%- endif -%}
2435
{% if conf.tutorial_deadline and conf.tutorial_deadline != "TBA" %}
2536
BEGIN:VEVENT
2637
SUMMARY:{{ conf.conference }} {{ conf.year }} Tutorial Deadline
27-
UID:{{conf.conference | slugify: "latin"}}-{{conf.year}}-tutorial {%- if conf.timezone contains "UTC" -%} {%- assign tz = conf.timezone | split: "UTC" -%} {%- if tz[1] contains "-" -%} {%- assign tz = tz[1] | replace: "-", "+" -%} {%- else if tz[1] contains "+" -%} {%- assign tz = tz[1] | replace: "+", "-" -%} {%- else assign tz = tz[1] -%} {%- endif -%}
38+
UID:{{conf.conference | slugify: "latin"}}-{{conf.year}}-tutorial
2839
ORGANIZER:pythondeadlin.es
2940
{{ desc | prepend: "DESCRIPTION:" | normalize_whitespace | wrap_lines }}
3041
DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%SZ" }}
31-
DTSTART;TZID=/Etc/GMT{{ tz }}:{{ conf.tutorial_deadline | date: "%Y%m%dT%H%M%S" }}
32-
{% else %}
33-
ORGANIZER:pythondeadlin.es
34-
{{ desc | prepend: "DESCRIPTION:" | normalize_whitespace | wrap_lines }}
35-
DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%SZ" }}
36-
DTSTART;TZID=/{{ conf.timezone | default: "Etc/GMT+12" }}:{{ conf.tutorial_deadline | date: "%Y%m%dT%H%M%S" }}
37-
{% endif %}END:VEVENT
42+
DTSTART;TZID=GMT{{ tz }}:{{ conf.tutorial_deadline | date: "%Y%m%dT%H%M%S" }}
43+
END:VEVENT
3844
{%- endif -%}
39-
{% if cfp != "TBA" %}
45+
{% if cfp != "TBA" and cfp != "None" and cfp != "Cancelled" %}
4046
BEGIN:VEVENT
4147
SUMMARY:{{ conf.conference }} {{ conf.year }} Deadline {{ extended }}
42-
UID:{{conf.conference | slugify: "latin"}}-{{conf.year}} {%- if conf.timezone contains "UTC" -%} {%- assign tz = conf.timezone | split: "UTC" -%} {%- if tz[1] contains "-" -%} {%- assign tz = tz[1] | replace: "-", "+" -%} {%- else if tz[1] contains "+" -%} {%- assign tz = tz[1] | replace: "+", "-" -%} {%- else assign tz = tz[1] -%} {%- endif -%}
43-
ORGANIZER:pythondeadlin.es
44-
{{ desc | prepend: "DESCRIPTION:" | normalize_whitespace | wrap_lines }}
45-
DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%SZ" }}
46-
DTSTART;TZID=/Etc/GMT{{ tz }}:{{ cfp | date: "%Y%m%dT%H%M%S" }}
47-
{% else %}
48+
UID:{{conf.conference | slugify: "latin"}}-{{conf.year}}
4849
ORGANIZER:pythondeadlin.es
4950
{{ desc | prepend: "DESCRIPTION:" | normalize_whitespace | wrap_lines }}
5051
DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%SZ" }}
51-
DTSTART;TZID=/{{ conf.timezone | default: "Etc/GMT+12" }}:{{ cfp | date: "%Y%m%dT%H%M%S" }}
52-
{% endif %}END:VEVENT
52+
DTSTART;TZID=GMT{{ tz }}:{{ cfp | date: "%Y%m%dT%H%M%S" }}
53+
END:VEVENT
5354
{%- endif -%}{% endfor %}
5455
END:VCALENDAR

0 commit comments

Comments
 (0)