added todos

This commit is contained in:
ebby 2026-09-26 16:26:59 +02:00
parent 2e28361c75
commit 8f5849e97d
16 changed files with 13 additions and 4 deletions

View file

@ -5,7 +5,7 @@ import feedparser
FEED_URL="https://blauwasser-mausis.de/rss.xml"
def check_blog_rss_and_send_mail():
def check_blog_rss_and_send_admin_mail():
feed = feedparser.parse(FEED_URL)
for article in feed.entries:
date_string = str(article["published"])
@ -13,4 +13,11 @@ def check_blog_rss_and_send_mail():
if date_object > (datetime.now() - timedelta(days=1)):
print(f"Neu: {article["title"]}")
# TODO: Send Mail to Tim to power on newsletter
title = str(article["title"])
description = str(article["summary"])
# TODO: create link
# TODO: create Template with jinja2
# TODO: send mail to blauwasser-mausis@proton.me

View file

@ -1,4 +1,4 @@
from backend.internal.xml_reader import check_blog_rss_and_send_mail
from backend.internal.xml_reader import check_blog_rss_and_send_admin_mail
from .routers import users, comments
from backend.internal.database import create_db_and_tables
from fastapi import APIRouter
@ -6,7 +6,9 @@ from fastapi import FastAPI
from fastapi_crons import Crons, get_cron_router
# TODO: Newsletter
# TODO: env
# TODO: TLS
# TODO: Deploy
app = FastAPI()
@ -14,7 +16,7 @@ crons = Crons(app)
@crons.cron("0 14 * * *", name="RSS-Check")
async def check_for_new_article():
check_blog_rss_and_send_mail()
check_blog_rss_and_send_admin_mail()
@app.on_event("startup")