Merge remote-tracking branch 'origin/master' into materialize-cwsvJudo-homepage

Conflicts:
	homepage/cwsvJudo/.gitignore
This commit is contained in:
marko
2025-03-09 14:23:51 +01:00
121 changed files with 3776 additions and 70 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

View File

@@ -1,11 +1,7 @@
<h2>Formulare zum Herunterladen</h2>
<ul>
<li>
<a href="https://www.homepage-baukasten-dateien.de/cwsv-sport/cwsvGeb%C3%BChrenordnung.pdf"
title="Geb&uuml;hrenordnung des CWSV">Geb&uuml;hrenordnung</a>
</li>
<li>
<a href="https://www.homepage-baukasten-dateien.de/cwsv-sport/cwsvAufnahmeantrag.pdf"
title="Antragsformulare f&uuml;r die Aufnahme in den Chemnitzer WSV">Aufnahmeantrag</a>
</li>
<li><a href="https://www.homepage-baukasten-dateien.de/cwsv-sport/cwsvGebuehrenordnung.pdf"
title="Geb&uuml;hrenordnung des CWSV">Geb&uuml;hrenordnung</a></li>
<li><a href="https://www.homepage-baukasten-dateien.de/cwsv-sport/cwsvAufnahmeantrag.pdf"
title="Antragsformulare f&uuml;r die Aufnahme in den Chemnitzer WSV">Aufnahmeantrag</a></li>
</ul>

View File

@@ -22,10 +22,24 @@
Wohngebietssportverein e. V.</h2>
<!-- Eine kleiner Bereich für aktuelle Neuigkeiten--> <!-- Nicht zu vieles, aktuell halten!!!-->
<!-- Idee: jede News ist eine h4-Überschrift und ein center-Element in einer div-->
<!-- Idee: nur centerElement, wenn es nur ein Bild ist. Text sollte linksbündig sein.--> <!-- HighlandGames-2024 -->
<!-- Idee: nur centerElement, wenn es nur ein Bild ist. Text sollte linksbündig sein.-->
<!-- Birgit Ehrenplakette -->
<div class="newsBox">
Zur Information: Ab dem 19.12.2024 hat unser Präsident Hendrik Ludwig sein Amt nieder gelegt.
Zu unserer Präsidiumssitzung am 10.12.2024 wurde unsere Vizepräsidentin Birgit Hiebner vom Stadtsportbund Chemnitz
mit einer Auszeichnung überrascht.
<img class="center" src="https://img.webme.com/pic/c/cwsv-sport/birgit-ehrenplakette.jpg"
title="Birgit Ehrenplakette" alt="Birgit erhält die Ehrenplakette des Landessportbundes Sachsen" />
Sie erhielt als höchste Auszeichnung des Landessportbundes Sachsen die Ehrenplakette für langjährige, verdienstvolle
Tätigkeit bei der Entwicklung des Sportes verliehen.
<img class="center" src="https://img.webme.com/pic/c/cwsv-sport/birgit-ehrenplakette-urkunde.jpg"
title="Urkunde Ehrenplakette" alt="Urkunde zur Ehrenplakette des Landessportbundes Sachsen" />
Sie bedankt sich hierfür sehr herzlich.
</div>
<!-- Rücktritt President -->
<div class="newsBox">Zur Information: Ab dem 19.11.2024 hat unser Pr&auml;sident Hendrik Ludwig sein Amt nieder gelegt.
</div>
<!-- Marita Champion des Ehrenamtes -->
<div class="newsBox"><img class="center" src="https://img.webme.com/pic/c/cwsv-sport/champion-des-ehrenamtes.jpg"
title="Auszeichnung Champion des Ehrenamtes" alt="Auszeichnung Champion des Ehrenamtes" /> Zu unserer
Pr&auml;sidiumssitzung am 29.08.2024 war es uns eine gro&szlig;e Ehre unser langj&auml;hriges Vereinsmitglied seit
@@ -61,7 +75,7 @@
title="PayPal - The safer, easier way to pay&#xA;online!" alt="Donate with PayPal button" border="0" /> <img
alt="" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" style="display: none !important;" x3i433pnl=""
d22q4wuy3="" xmqo9fcaa="" pv56i2hu5="" czfe9x85v="" o0aypinyl="" sb7ofhfmh="" vqrtauiqc="" jlm4vk2m1=""
width="1" hidden="" height="1" border="0" go2q6fhd9="" />
width="1" hidden="" height="1" border="0" go2q6fhd9="" xxqzs5eph="" c1awwuu3a="" />
</form>
</div>
<h3 style="text-align:center;">CWSV e.V. - Sport f&uuml;r jedermann</h3>
@@ -112,21 +126,21 @@
alt="Gef&ouml;rdert vom Freistaat Sachsen" width="100%" /> <!-- Banner unten --> <img
src="//img.webme.com/pic/c/cwsv-sport/bannerCwsvLinks.2048w.png"
alt="Chemnitzer Freizeit- und Wohngebietssportverein e. V." width="100%" /> <!-- static structured data infos -->
<script type="application/ld+json"> {
<script type="application/ld+json"> {
"@context" : "https://schema.org",
"@type" : "SportsClub",
"@type" : "SportsClub",
"address" : {
"@type": "PostalAddress",
"addressLocality": "Chemnitz",
"addressRegion": "Deutschland",
"postalCode": "09119",
"addressLocality": "Chemnitz",
"addressRegion": "Deutschland",
"postalCode": "09119",
"streetAddress": "Straße Usti nad Labem 42"
},
"geo":{
"@type": "GeoCoordinates",
"latitude": "50.8078784",
"longitude": "12.8124339"
},
},
"name":"Chemnitzer Freizeit- und Wohngebietssportverein",
"url":"https://cwsv-sport.de",
"image": "//img.webme.com/pic/c/cwsv-sport/cwsvLogo.x300.png",

View File

@@ -4,5 +4,7 @@ temp/*
scripts/*
!scripts/*.template
node_modules
# don't commit any secrets
Makefile.local
Makefile.local

View File

@@ -6,7 +6,7 @@
"configurations": [
{
"name": "post",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "testApi.py",
"console": "integratedTerminal",
@@ -18,7 +18,7 @@
},
{
"name": "getTrainees",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "testApi.py",
"console": "integratedTerminal",
@@ -26,5 +26,17 @@
"args": [
"GET",
"--endpoint", "trainees" ]
} ]
},
{
"name": "bdCheck",
"type": "debugpy",
"request": "launch",
"program": "bdCheck.py",
"console": "integratedTerminal",
"justMyCode": true,
"args": [
]
},
]
}

View File

@@ -3,71 +3,109 @@ from datetime import datetime
from MatrixIm import MatrixIm
def get_days_since_birthday(birthday: datetime.date, today: datetime.date=datetime.now()) -> int:
def get_days_since_birthday(
birthday: datetime.date, today: datetime.date = datetime.now()
) -> int:
# get number of days distance to birthday in this year:
this_year = (datetime(today.year, birthday.month, birthday.day) - today).days
# The birthday is already past return it
if this_year <= 0:
return this_year
# otherwise we have to take the distance to last years birthday
return (datetime(today.year-1, birthday.month, birthday.day) - today).days
return (datetime(today.year - 1, birthday.month, birthday.day) - today).days
def get_days_until_birthday(birthday: datetime.date, today: datetime.date=datetime.now()) -> int:
def get_days_until_birthday(
birthday: datetime.date, today: datetime.date = datetime.now()
) -> int:
# get number of days distance to birthday in this year:
this_year = (datetime(today.year, birthday.month, birthday.day) - today).days
# The birthday is already past return it
if this_year >= 0:
return this_year
# otherwise we have to take the distance to next years birthday
return (datetime(today.year+1, birthday.month, birthday.day) - today).days
return (datetime(today.year + 1, birthday.month, birthday.day) - today).days
with open("testApi.config.yaml", "r") as yaml_file:
from yaml import safe_load
config = safe_load(yaml_file)
trainees = [{
"name": {"family": t['name'], "given": t['vorname']}
, "date_of_birth": datetime.strptime(t['gebDatum'], "%Y-%m-%d")
} for t in testApi.apiCall.call(
response = testApi.apiCall.call(
method="GET",
host="cwsvJudo.bplaced.net",
url="participo/api/trainees",
headers={
"Authorization": f"Basic: {config['apiKey']}"
}
) if t['gebDatum'] not in [None, "0000-00-00"]]
MatrixIm.post(
message="last birthdays: \n" + "\n".join([
f"- {t['name']['given']} {t['name']['family']}: {get_days_since_birthday(t['date_of_birth'])} ({t['date_of_birth'].strftime('%d.%m.')})"
for t in sorted(
[t for t in trainees if get_days_since_birthday(t['date_of_birth'])>-14]
, key=lambda t: get_days_since_birthday(t['date_of_birth'])
)
])
, home_server_url="https://matrix.org"
, room_id="!vFXxgKsLbRLdWCSTIO:matrix.org"
, credentials={
'user': "@ukenth-the-grumpy:matrix.org"
, 'password': "DQpSs1yn9Y26c1zo"
}
headers={"Authorization": f"Basic: {config['apiKey']}"},
)
MatrixIm.post(
message="next birthdays: \n" + "\n".join([
f"- {t['name']['given']} {t['name']['family']}: {get_days_until_birthday(t['date_of_birth'])} ({t['date_of_birth'].strftime('%d.%m.')})"
for t in sorted(
[t for t in trainees if get_days_until_birthday(t['date_of_birth'])<14]
, key=lambda t: get_days_until_birthday(t['date_of_birth'])
try:
trainees = [
{
"name": {"family": t["name"], "given": t["vorname"]},
"date_of_birth": datetime.strptime(t["gebDatum"], "%Y-%m-%d"),
}
for t in testApi.apiCall.call(
method="GET",
host="cwsvJudo.bplaced.net",
url="participo/api/trainees",
headers={"Authorization": f"Basic: {config['apiKey']}"},
)
])
, home_server_url="https://matrix.org"
, room_id="!vFXxgKsLbRLdWCSTIO:matrix.org"
, credentials={
'user': "@ukenth-the-grumpy:matrix.org"
, 'password': "DQpSs1yn9Y26c1zo"
}
)
if t["gebDatum"] not in [None, "0000-00-00"]
]
MatrixIm.post(
message="last birthdays: \n"
+ "\n".join(
[
f"- {t['name']['given']} {t['name']['family']}: {get_days_since_birthday(t['date_of_birth'])} ({t['date_of_birth'].strftime('%d.%m.')})"
for t in sorted(
[
t
for t in trainees
if get_days_since_birthday(t["date_of_birth"]) > -14
],
key=lambda t: get_days_since_birthday(t["date_of_birth"]),
)
]
),
home_server_url="https://matrix.org",
room_id="!vFXxgKsLbRLdWCSTIO:matrix.org",
credentials={
"user": "@ukenth-the-grumpy:matrix.org",
"password": "DQpSs1yn9Y26c1zo",
},
)
MatrixIm.post(
message="next birthdays: \n"
+ "\n".join(
[
f"- {t['name']['given']} {t['name']['family']}: {get_days_until_birthday(t['date_of_birth'])} ({t['date_of_birth'].strftime('%d.%m.')})"
for t in sorted(
[
t
for t in trainees
if get_days_until_birthday(t["date_of_birth"]) < 14
],
key=lambda t: get_days_until_birthday(t["date_of_birth"]),
)
]
),
home_server_url="https://matrix.org",
room_id="!vFXxgKsLbRLdWCSTIO:matrix.org",
credentials={
"user": "@ukenth-the-grumpy:matrix.org",
"password": "DQpSs1yn9Y26c1zo",
},
)
except Exception as e:
MatrixIm.post(
message=f"bdCheck: Exception {e} ({repr(e)})\nResponse was {response}",
home_server_url="https://matrix.org",
room_id="!vFXxgKsLbRLdWCSTIO:matrix.org",
credentials={
"user": "@ukenth-the-grumpy:matrix.org",
"password": "DQpSs1yn9Y26c1zo",
},
)