RSS: create rss.xml, for wip, or www server with "X" ready items

This commit is contained in:
Cyrille L 2022-12-03 14:44:36 +01:00
parent 9483f72170
commit c3269acf57
3 changed files with 14 additions and 10 deletions

View File

@ -4,6 +4,6 @@ import rss, domain
def manage_publish(file_post, Force): def manage_publish(file_post, Force):
# At ending process... # At ending process..
# Create rss.xml for www # Create rss.xml for www
rss.find_www(domain.srv_www, 'www') rss.find_www(domain.srv_www, 'www')

View File

@ -29,13 +29,13 @@ rss_headers = '<?xml version="1.0" encoding="utf-8"?>\n' + \
domain.domain_name, domain.domain_name,
domain.sep_titles domain.sep_titles
) + \ ) + \
' <link>%s</link>\n'%domain.domain_url + \ ' <link>%s</link>\n'%domain.domain_url + \
' <description>%s</description>\n'%domain.domain_about + \ ' <description>%s</description>\n'%domain.domain_about + \
' <language>%s</language>\n'%domain.domain_lang + \ ' <language>%s</language>\n'%domain.domain_lang + \
' <lastBuildDate>%s</lastBuildDate>\n'%log.nowdate() + \ ' <lastBuildDate>%s</lastBuildDate>\n'%log.nowdate() + \
' <copyright>%s</copyright>\n'%domain.domain_license + \ ' <copyright>%s</copyright>\n'%domain.domain_license + \
' <webMaster>%s</webMaster>\n'%domain.domain_mail + \ ' <webMaster>%s</webMaster>\n'%domain.domain_mail + \
' <generator>Tyto - Littérateur</generator>\n' ' <generator>Tyto - Littérateur</generator>\n'
#==================================# #==================================#
@ -77,10 +77,10 @@ def find_www(srv, srv_type):
' <title>%s</title>\n'%post_title + \ ' <title>%s</title>\n'%post_title + \
' <link>%s</link>\n'%post_url + \ ' <link>%s</link>\n'%post_url + \
' <guid>%s</guid>\n'%post_url + \ ' <guid>%s</guid>\n'%post_url + \
' <pubDate>%s</pubDate>'%hash_srv[1] + \ ' <pubDate>%s</pubDate>\n'%hash_srv[1] + \
' <description>%s</description>\n'%post_about + \ ' <description>%s</description>\n'%post_about + \
' <author>%s</author>\n' + \ ' <author>%s</author>\n' + \
' </item>' ' </item>\n'
file = open(rss_file, 'a') file = open(rss_file, 'a')
file.write(rss_post) file.write(rss_post)

View File

@ -153,6 +153,10 @@ def manage_wip(file_post, Force):
msg_log = 'Edit Database: %s'%check.post_db msg_log = 'Edit Database: %s'%check.post_db
log.append_f(check.post_logs, msg_log, 0) log.append_f(check.post_logs, msg_log, 0)
# At ending process..
# Create rss.xml for www
rss.find_www(domain.srv_wip, 'wip')
#============================# #============================#
# HTML CONVERTERS # # HTML CONVERTERS #
# wip_tmp: new replacedlines # # wip_tmp: new replacedlines #