main
Bob Mottram 2020-10-07 22:26:03 +01:00
parent e090a3c047
commit c440e31bc9
2 changed files with 33 additions and 10 deletions

View File

@ -10,7 +10,7 @@ import os
import time
from collections import OrderedDict
from newswire import getDictFromNewswire
from posts import createPublicPost
from posts import createNewsPost
from utils import saveJson
from utils import getStatusNumber
@ -94,15 +94,11 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
followersOnly = False
useBlurhash = False
commentsEnabled = False
blog = createPublicPost(baseDir,
blog = createNewsPost(baseDir,
'news', domain, port, httpPrefix,
rssDescription, followersOnly, False,
False, commentsEnabled,
None, None, None, useBlurhash,
None, None, rssTitle,
False,
None, None, None)
rssTitle)
if not blog:
continue

View File

@ -1193,6 +1193,33 @@ def createBlogPost(baseDir: str,
return blog
def createNewsPost(baseDir: str,
nickname: str, domain: str, port: int, httpPrefix: str,
content: str, followersOnly: bool, saveToFile: bool,
attachImageFilename: str, mediaType: str,
imageDescription: str, useBlurhash: bool,
subject: str) -> {}:
clientToServer = False
inReplyTo = None
inReplyToAtomUri = None
schedulePost = False,
eventDate = None
eventTime = None
location = None
blog = \
createPublicPost(baseDir,
nickname, domain, port, httpPrefix,
content, followersOnly, saveToFile,
clientToServer,
attachImageFilename, mediaType,
imageDescription, useBlurhash,
inReplyTo, inReplyToAtomUri, subject,
schedulePost,
eventDate, eventTime, location)
blog['object']['type'] = 'Article'
return blog
def createQuestionPost(baseDir: str,
nickname: str, domain: str, port: int, httpPrefix: str,
content: str, qOptions: [],