2020-11-09 15:22:59 +00:00
|
|
|
__filename__ = "feeds.py"
|
|
|
|
__author__ = "Bob Mottram"
|
|
|
|
__license__ = "AGPL3+"
|
2021-01-26 10:07:42 +00:00
|
|
|
__version__ = "1.2.0"
|
2020-11-09 15:22:59 +00:00
|
|
|
__maintainer__ = "Bob Mottram"
|
2021-09-10 16:14:50 +00:00
|
|
|
__email__ = "bob@libreserver.org"
|
2020-11-09 15:22:59 +00:00
|
|
|
__status__ = "Production"
|
2021-06-15 15:08:12 +00:00
|
|
|
__module_group__ = "RSS Feeds"
|
2020-11-09 15:22:59 +00:00
|
|
|
|
|
|
|
|
2021-12-29 21:55:09 +00:00
|
|
|
def rss2tag_header(hashtag: str, http_prefix: str, domain_full: str) -> str:
|
2021-07-03 16:44:07 +00:00
|
|
|
return \
|
|
|
|
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + \
|
|
|
|
"<rss version=\"2.0\">" + \
|
|
|
|
'<channel>' + \
|
|
|
|
' <title>#' + hashtag + '</title>' + \
|
2021-12-26 10:00:46 +00:00
|
|
|
' <link>' + http_prefix + '://' + domain_full + \
|
2020-11-09 15:22:59 +00:00
|
|
|
'/tags/rss2/' + hashtag + '</link>'
|
|
|
|
|
|
|
|
|
2021-12-29 21:55:09 +00:00
|
|
|
def rss2tag_footer() -> str:
|
2021-07-03 16:44:07 +00:00
|
|
|
return '</channel></rss>'
|