mirror of https://gitlab.com/bashrc2/epicyon
Simplify
parent
e090a3c047
commit
c440e31bc9
|
@ -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,
|
||||
'news', domain, port, httpPrefix,
|
||||
rssDescription, followersOnly, False,
|
||||
False, commentsEnabled,
|
||||
None, None, None, useBlurhash,
|
||||
None, None, rssTitle,
|
||||
False,
|
||||
None, None, None)
|
||||
blog = createNewsPost(baseDir,
|
||||
'news', domain, port, httpPrefix,
|
||||
rssDescription, followersOnly, False,
|
||||
None, None, None, useBlurhash,
|
||||
rssTitle)
|
||||
if not blog:
|
||||
continue
|
||||
|
||||
|
|
27
posts.py
27
posts.py
|
@ -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: [],
|
||||
|
|
Loading…
Reference in New Issue