Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
EventGen
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
chaotikum
EventGen
Commits
fa856102
Commit
fa856102
authored
8 months ago
by
Lukas Ruge
Browse files
Options
Downloads
Patches
Plain Diff
add ctf team
parent
4403f345
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ctf.txt
+15
-0
15 additions, 0 deletions
ctf.txt
eventgenutils.py
+8
-0
8 additions, 0 deletions
eventgenutils.py
main.py
+30
-4
30 additions, 4 deletions
main.py
osm.txt
+1
-1
1 addition, 1 deletion
osm.txt
with
54 additions
and
5 deletions
ctf.txt
0 → 100644
+
15
−
0
View file @
fa856102
---
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."
---
This diff is collapsed.
Click to expand it.
eventgenutils.py
+
8
−
0
View file @
fa856102
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
main.py
+
30
−
4
View file @
fa856102
...
...
@@ -41,14 +41,22 @@ TAG_DES_OFFENEN_HACKSPACES = True
MOINC3
=
True
# Congress.
MAUS
_TUEROE
FFNER
_
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
)
This diff is collapsed.
Click to expand it.
osm.txt
+
1
−
1
View file @
fa856102
...
...
@@ -9,6 +9,6 @@ contact: luebeck@lists.openstreetmap.de
organizer: OSM Lübeck
locations:
- Augenprüfraum
- Co
n
fy
Zone
- Co
m
fyZone
short: "Stammtisch von und für OpenStreetMap Begeisterte"
---
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment