Compare commits

..

4 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
3285d23223 Merge branch 'master' of ssh://ssh.nx2.site:50022/nx2/dotfiles 2025-06-06 13:52:54 +02:00
Lennart J. Kurzweg (Nx2)
a8629627ea no printlastlog sshd 2025-06-06 13:52:04 +02:00
Lennart J. Kurzweg (Nx2)
68c749474e lr euma 2025-06-06 13:51:51 +02:00
Lennart J. Kurzweg (Nx2)
e0b43bcbe5 dysk 2025-06-06 13:51:42 +02:00
3 changed files with 22 additions and 15 deletions

View File

@@ -6,6 +6,7 @@
cmake cmake
dig dig
du-dust du-dust
dysk
exiftool exiftool
eza eza
ffmpeg ffmpeg

View File

@@ -25,13 +25,17 @@ import requests
def filter_events(events): def filter_events(events):
return [event for event in events if ("LR" in event.name) or ("TBD" in event.name)] return [event for event in events if ("LR" in event.name) or ("TBD" in event.name)]
def fetch_and_save_ical_events(ical_url, save_path): def fetch_and_save_ical_events(ical_urls, save_path):
""" """
Fetch events from an iCal URL and save them as a single combined calendar. Fetch events from an iCal URL and save them as a single combined calendar.
""" """
try: try:
# Create a new combined calendar
combined_calendar = Calendar()
for url in ical_urls:
# Fetch the iCal data # Fetch the iCal data
response = requests.get(ical_url) response = requests.get(url)
response.raise_for_status() response.raise_for_status()
# Parse the iCal data # Parse the iCal data
@@ -40,8 +44,6 @@ def fetch_and_save_ical_events(ical_url, save_path):
# Adjust events # Adjust events
adjusted_events = filter_events(list(calendar.events)) adjusted_events = filter_events(list(calendar.events))
# Create a new combined calendar
combined_calendar = Calendar()
for event in adjusted_events: for event in adjusted_events:
combined_calendar.events.add(event) combined_calendar.events.add(event)
@@ -58,10 +60,13 @@ def fetch_and_save_ical_events(ical_url, save_path):
if __name__ == "__main__": if __name__ == "__main__":
# Replace with your iCal URL and target file path # Replace with your iCal URL and target file path
ICAL_URL = "https://zlypher.github.io/lol-events/cal/league-of-legends-nlc.ical" ICAL_URLS = [
"https://zlypher.github.io/lol-events/cal/league-of-legends-nlc.ical",
"https://zlypher.github.io/lol-events/cal/league-of-legends-emea-masters.ical"
]
SAVE_PATH = "${config.services.nginx.virtualHosts."${hyper.domain}".root}/lr.ics" SAVE_PATH = "${config.services.nginx.virtualHosts."${hyper.domain}".root}/lr.ics"
fetch_and_save_ical_events(ICAL_URL, SAVE_PATH) fetch_and_save_ical_events(ICAL_URLS, SAVE_PATH)
''); '');
in '' in ''
${nx_cal_lr}/bin/nx_cal_lr ${nx_cal_lr}/bin/nx_cal_lr

View File

@@ -16,6 +16,7 @@
ports = [ secrets.ssh.port ]; ports = [ secrets.ssh.port ];
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
PrintLastLog = false;
}; };
}; };
} }