mirror of https://gitlab.com/bashrc2/epicyon
Timestamp in tag file
parent
2da2a331c2
commit
e886e81778
3
inbox.py
3
inbox.py
|
@ -87,7 +87,8 @@ def storeHashTags(baseDir: str,nickname: str,postJsonObject: {}) -> None:
|
||||||
tagName=tag['name'].replace('#','').strip()
|
tagName=tag['name'].replace('#','').strip()
|
||||||
tagsFilename=tagsDir+'/'+tagName+'.txt'
|
tagsFilename=tagsDir+'/'+tagName+'.txt'
|
||||||
postUrl=postJsonObject['id'].replace('/activity','').replace('/','#')
|
postUrl=postJsonObject['id'].replace('/activity','').replace('/','#')
|
||||||
tagline=nickname+' '+postUrl+'\n'
|
daysSinceEpoch=(datetime.datetime.utcnow() - datetime.datetime(1970,1,1)).days
|
||||||
|
tagline=str(daysSinceEpoch)+' '+nickname+' '+postUrl+'\n'
|
||||||
if not os.path.isfile(tagsFilename):
|
if not os.path.isfile(tagsFilename):
|
||||||
tagsFile=open(tagsFilename, "w+")
|
tagsFile=open(tagsFilename, "w+")
|
||||||
if tagsFile:
|
if tagsFile:
|
||||||
|
|
|
@ -397,8 +397,13 @@ def htmlHashtagSearch(domain: str,port: int, \
|
||||||
index-=1
|
index-=1
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
nickname=postId.split(' ')[0]
|
postFields=postId.split(' ')
|
||||||
postId=postId.split(' ')[1]
|
if len(postFields)!=3:
|
||||||
|
index=-1
|
||||||
|
continue
|
||||||
|
postDaysSinceEposh=int(postFields[0])
|
||||||
|
nickname=postFields[1]
|
||||||
|
postId=postFields[2]
|
||||||
postFilename=locatePost(baseDir,nickname,domain,postId)
|
postFilename=locatePost(baseDir,nickname,domain,postId)
|
||||||
if not postFilename:
|
if not postFilename:
|
||||||
index-=1
|
index-=1
|
||||||
|
|
Loading…
Reference in New Issue