forked from indymedia/epicyon
Create a scheduled post index
parent
9744db2339
commit
9409f6dcc4
7
posts.py
7
posts.py
|
@ -564,7 +564,7 @@ def createPostBase(baseDir: str,nickname: str,domain: str,port: int, \
|
||||||
sensitive=True
|
sensitive=True
|
||||||
if replyToJson['object'].get('summary'):
|
if replyToJson['object'].get('summary'):
|
||||||
summary=replyToJson['object']['summary']
|
summary=replyToJson['object']['summary']
|
||||||
|
eventDateStr=None
|
||||||
if eventDate:
|
if eventDate:
|
||||||
eventName=summary
|
eventName=summary
|
||||||
if not eventName:
|
if not eventName:
|
||||||
|
@ -720,6 +720,11 @@ def createPostBase(baseDir: str,nickname: str,domain: str,port: int, \
|
||||||
if schedulePost:
|
if schedulePost:
|
||||||
if eventDate and eventTime:
|
if eventDate and eventTime:
|
||||||
outboxName='scheduled'
|
outboxName='scheduled'
|
||||||
|
scheduleIndexFile=baseDir+'/accounts/schedule.txt'
|
||||||
|
scheduleFile=open(scheduleIndexFile, "a+")
|
||||||
|
if scheduleFile:
|
||||||
|
scheduleFile.write(eventDateStr+' '+newPostId+'\n')
|
||||||
|
scheduleFile.close()
|
||||||
else:
|
else:
|
||||||
print('Unable to create scheduled post without date and time values')
|
print('Unable to create scheduled post without date and time values')
|
||||||
return newPost
|
return newPost
|
||||||
|
|
Loading…
Reference in New Issue