Skip to content
Snippets Groups Projects
Commit fa856102 authored by Lukas Ruge's avatar Lukas Ruge
Browse files

add ctf team

parent 4403f345
No related branches found
No related tags found
No related merge requests found
ctf.txt 0 → 100644
---
layout: [eventcal]
title: "CTF-Team Treffen"
eventdate: <EVENTSTART>
eventend: <EVENTEND>
#https://www.uuidgenerator.net/
uid: <UUID>
contact: CTF-Matrix-Chat
organizer: WuPo
projects:
- ctf
locations:
- ComfyZone
short: "Alle zwei Wochen trifft sich potentiell das CTF Team. Nur nach absprache, wenn Leute Lust haben."
---
......@@ -33,6 +33,11 @@ def is_nth_xday_of_month(_date_candidate, _year, _mo, _n, _x):
return False
def is_days_away_from(_date_candidate, _past_date_to_calculate_distance):
print(_date_candidate)
print(_past_date_to_calculate_distance)
return (_date_candidate-_past_date_to_calculate_distance).days
def is_wednesday(_date_candidate):
wd = _date_candidate.weekday()
return wd == WED
......@@ -109,6 +114,9 @@ def last_saturday_in_march(_date_candidate):
return _date_candidate == _last_saturday
def close_to_christmas_time_or_congress_or_first_of_january(_date_candidate):
return is_december(_date_candidate) and _date_candidate.day > 22 or is_january(_date_candidate) and _date_candidate.day == 1
def is_equal_month(_date_candidate):
if _date_candidate.month % 2 == 1:
return True
......
......@@ -41,14 +41,22 @@ TAG_DES_OFFENEN_HACKSPACES = True
MOINC3 = True
# Congress.
MAUS_TUEROEFFNER_TAG = False
# MAUS TÜRÖFFNER TAG
# Der Maus Türöffner Tag ist immer am Tag der Deutschen Einheit
MAUS_TUEROEFFNER_TAG = False
GETTING_SPACE_CLEAN = False
# GETTING SPACE CLEAN
# Erster Montag des Monats, außer das ist der 01.01 oder 01.05, dann der zweite Montag dieser Monate
GETTING_SPACE_CLEAN = False
NOOK_ORGA = True
# NOOK ORGA
# Dritter Montag jeden zweiten Monat von januar bis Mai, dann monatlich von Juni bis September
NOOK_ORGA = True
# CTF
# Jeden zweiten Dienstag. Am 02.07.2024 war ein CTF, wir rechnen also von dort.
# Wenn der Termin zwischen den 23.12 und 01.01 (jeweils inklusive fällt) gibt es keinen Termin
CTF = True
#################################################
# Year to create events for
......@@ -132,9 +140,17 @@ def is_maus_tueroeffner_tag(_date_candidate):
def is_getting_space_clean(_date_candidate):
return utils.is_first_monday_of_month_except_january_an_may_if_monday_is_first(_date_candidate)
def is_nook_orga(_date_candidate):
return utils.is_third_monday_of_month_and_uneven_month_before_june_or_before_september(_date_candidate)
def is_ctf(_date_candidate):
return not utils.close_to_christmas_time_or_congress_or_first_of_january(_date_candidate) and (
utils.is_days_away_from(_date_candidate,
datetime.datetime.strptime("2024-07-02", utils.date_format)) % 14 == 0)
def create_open_space(_date):
utils.create_event("openspace", _date, start_hour=19)
......@@ -182,9 +198,15 @@ def create_moin_c3(_date):
def create_getting_space_clean(_date):
utils.create_event("getting-space-clean", _date, start_hour=18, start_minute=30, end_hour=20, end_minute=00)
def create_nook_orga(_date):
utils.create_event("nook-orga", _date, start_hour=19, start_minute=30, end_hour=21, end_minute=00)
def create_ctf(_date):
utils.create_event("ctf", _date, start_hour=20, start_minute=00, end_hour=22, end_minute=00)
def create_maus_tueroeffner_tag(_date):
utils.create_event("maus", _date, start_hour=14, end_hour=19, end_minute=00)
......@@ -244,8 +266,12 @@ while date_to_check <= datetime.datetime.strptime(str(YEAR) + "-12-31", utils.da
if result:
create_getting_space_clean(date_to_check)
if NOOK_ORGA:
result= is_nook_orga(date_to_check)
result = is_nook_orga(date_to_check)
if result:
create_nook_orga(date_to_check)
if CTF:
result = is_ctf(date_to_check)
if result:
create_ctf(date_to_check)
date_to_check += datetime.timedelta(days=1)
......@@ -9,6 +9,6 @@ contact: luebeck@lists.openstreetmap.de
organizer: OSM Lübeck
locations:
- Augenprüfraum
- Confy Zone
- ComfyZone
short: "Stammtisch von und für OpenStreetMap Begeisterte"
---
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment