From 9f5d011ad572aa60fbad6d19a7c012f2bca0b3c5 Mon Sep 17 00:00:00 2001 From: vuk Date: Mon, 15 Apr 2024 20:40:48 +0200 Subject: [PATCH] bice vremena za blog, ja moram stranicu za donacije da pravim --- atom_gen.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/atom_gen.py b/atom_gen.py index 091a2d1..52b7485 100755 --- a/atom_gen.py +++ b/atom_gen.py @@ -11,20 +11,20 @@ import os blogs_dir = os.fsencode("blog") -def blogposts_list_gen(): - output_list = [] - for file in os.listdir(blogs_dir): - filename = os.fsdecode(file) - if filename.endswith(".md"): - full_path = "blog/" + filename - - author = subprocess.run("lowdown -X author " + full_path, capture_output=True, shell=True, text=True).stdout.strip() - title = subprocess.run("lowdown -X title " + full_path, capture_output=True, shell=True, text=True).stdout.strip() - time = subprocess.run("lowdown -X time " + full_path, capture_output=True, shell=True, text=True).stdout.strip() - content_html = subprocess.run("lowdown " + full_path, capture_output=True, shell=True, text=True).stdout.strip() - - output_list.append([author, title, time, content_html, full_path]) - return output_list +#def blogposts_list_gen(): +# output_list = [] +# for file in os.listdir(blogs_dir): +# filename = os.fsdecode(file) +# if filename.endswith(".md"): +# full_path = "blog/" + filename +# +# author = subprocess.run("lowdown -X author " + full_path, capture_output=True, shell=True, text=True).stdout.strip() +# title = subprocess.run("lowdown -X title " + full_path, capture_output=True, shell=True, text=True).stdout.strip() +# time = subprocess.run("lowdown -X time " + full_path, capture_output=True, shell=True, text=True).stdout.strip() +# content_html = subprocess.run("lowdown " + full_path, capture_output=True, shell=True, text=True).stdout.strip() +# +# output_list.append([author, title, time, content_html, full_path]) +# return output_list def events_list_gen(): output_list = [] @@ -69,5 +69,3 @@ def feedgen(blogs, events): fg_blog.atom_file('site/atom_blog.xml') fg_events.atom_file('site/atom_events.xml') - -feedgen(blogposts_list_gen(), events_list_gen())