From 8f4b56863ec87113e879d0b358319470cff81a97 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Tue, 25 May 2021 02:35:09 -0600 Subject: add tags as categories --- ChangeLog | 2 ++ src/pyssg/rss.py | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index bbe5f7c..4d9d286 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ CHANGES ======= +* add content:encoded tag in rss and update readme + v0.3.0 ------ diff --git a/src/pyssg/rss.py b/src/pyssg/rss.py index 4cd4695..742b6b2 100644 --- a/src/pyssg/rss.py +++ b/src/pyssg/rss.py @@ -7,6 +7,8 @@ from .configuration import Configuration VERSION = importlib.metadata.version('pyssg') +# This is static right here since an rss feed +# requires very specific date format DFORMAT = '%a, %d %b %Y %H:%M:%S GMT' @@ -46,6 +48,11 @@ class RSSBuilder: i_f = f'{i_f} {url}\n' i_f = f'{i_f} {url}\n' i_f = f'{i_f} {date}\n' + # TODO: maybe make this optional? + # add the tags as categories + if p.tags is not None: + for t in p.tags: + i_f = f'{i_f} {t.capitalize()}\n' i_f = f'{i_f} {p.summary}\n' i_f = f'{i_f} \n' i_f = f'{i_f} \n' -- cgit v1.2.3-70-g09d2