mirror of https://gitlab.com/bashrc2/epicyon
Post cache path
parent
b0f514d329
commit
9e429b495d
|
@ -3927,7 +3927,8 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
postJsonObject=loadJson(postFilename)
|
postJsonObject=loadJson(postFilename)
|
||||||
if postJsonObject:
|
if postJsonObject:
|
||||||
cachedFilename= \
|
cachedFilename= \
|
||||||
self.server.baseDir+'/postcache/'+ \
|
self.server.baseDir+'/accounts/'+ \
|
||||||
|
nickname+'@'+self.server.domain+'/postcache/'+ \
|
||||||
fields['postUrl'].replace('/','#')+'.html'
|
fields['postUrl'].replace('/','#')+'.html'
|
||||||
if os.path.isfile(cachedFilename):
|
if os.path.isfile(cachedFilename):
|
||||||
print('Edited blog post, removing cached html')
|
print('Edited blog post, removing cached html')
|
||||||
|
@ -3936,6 +3937,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
postJsonObject['object']['summary']=fields['subject']
|
postJsonObject['object']['summary']=fields['subject']
|
||||||
|
# TODO format message
|
||||||
postJsonObject['object']['content']=fields['message']
|
postJsonObject['object']['content']=fields['message']
|
||||||
saveJson(postJsonObject,postFilename)
|
saveJson(postJsonObject,postFilename)
|
||||||
print('Edited blog post, resaved '+postFilename)
|
print('Edited blog post, resaved '+postFilename)
|
||||||
|
|
Loading…
Reference in New Issue