From c6c17466eba2e9c7cca7282c231ac62f3a7b1900 Mon Sep 17 00:00:00 2001 From: vanten-s Date: Tue, 5 Sep 2023 15:22:39 +0200 Subject: [PATCH] Changed some things --- feed_generator | 2 +- frmWrk | 2 +- main.py | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/feed_generator b/feed_generator index a7d96ea..83a025e 160000 --- a/feed_generator +++ b/feed_generator @@ -1 +1 @@ -Subproject commit a7d96ea52ffa42139ac5466b5ea7d5aa3ee7900b +Subproject commit 83a025e6b14ab59cf8a8c54d1979f5f30297d6c9 diff --git a/frmWrk b/frmWrk index b454f70..0e9abf4 160000 --- a/frmWrk +++ b/frmWrk @@ -1 +1 @@ -Subproject commit b454f70fbb366ad8b6ec84c8a6d3ca47549264f2 +Subproject commit 0e9abf4fd60a07cb4c7ff6325a295e66164598eb diff --git a/main.py b/main.py index 8318891..2fbb24f 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,16 @@ import frmWrk.website as website import feed_generator +import markdown +import pathlib from time import sleep -webserver = website.WebServer("", 3000, "./src") +def article(path): + article_name = path.split("?")[1] + article_html = feed_generator.convert_markdown_to_html(pathlib.Path("feed_articles") / article_name) + + return article_html[0] + +webserver = website.WebServer("", 3000, "./src", overwrites={"/articles.html": article}) webserver.start()