Set filename for rss posts

main
Bob Mottram 2020-10-08 15:35:26 +01:00
parent 72c9efdd76
commit ea3211e8ed
1 changed files with 6 additions and 0 deletions

View File

@ -70,8 +70,11 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
filename = basePath + '/' + newPostId.replace('/', '#') + '.json' filename = basePath + '/' + newPostId.replace('/', '#') + '.json'
if os.path.isfile(filename): if os.path.isfile(filename):
# don't create the post if it already exists # don't create the post if it already exists
# set the url
newswire[originalDateStr][1] = \ newswire[originalDateStr][1] = \
'/users/news/statuses/' + statusNumber '/users/news/statuses/' + statusNumber
# set the filename
newswire[originalDateStr][3] = filename
continue continue
rssTitle = item[0] rssTitle = item[0]
@ -118,8 +121,11 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
# save the post and update the index # save the post and update the index
if saveJson(blog, filename): if saveJson(blog, filename):
updateFeedsIndex(baseDir, domain, postId + '.json') updateFeedsIndex(baseDir, domain, postId + '.json')
# set the url
newswire[originalDateStr][1] = \ newswire[originalDateStr][1] = \
'/users/news/statuses/' + statusNumber '/users/news/statuses/' + statusNumber
# set the filename
newswire[originalDateStr][3] = filename
def runNewswireDaemon(baseDir: str, httpd, def runNewswireDaemon(baseDir: str, httpd,