forked from indymedia/epicyon
Number and string
parent
c483c19bae
commit
01225a8330
|
@ -3747,7 +3747,8 @@ def htmlCalendar(translate: {}, \
|
||||||
def htmlHashTagCloud(baseDir: str,path: str) -> str:
|
def htmlHashTagCloud(baseDir: str,path: str) -> str:
|
||||||
"""Returns a tag cloud of today's hashtags
|
"""Returns a tag cloud of today's hashtags
|
||||||
"""
|
"""
|
||||||
daysSinceEpoch=str((datetime.utcnow() - datetime(1970,1,1)).days)+' '
|
daysSinceEpoch=(datetime.utcnow() - datetime(1970,1,1)).days
|
||||||
|
daysSinceEpochStr=str(daysSinceEpoch)+' '
|
||||||
nickname=getNicknameFromActor(path)
|
nickname=getNicknameFromActor(path)
|
||||||
tagCloud=[]
|
tagCloud=[]
|
||||||
for subdir, dirs, files in os.walk(baseDir+'/tags'):
|
for subdir, dirs, files in os.walk(baseDir+'/tags'):
|
||||||
|
@ -3755,7 +3756,7 @@ def htmlHashTagCloud(baseDir: str,path: str) -> str:
|
||||||
tagsFilename=os.path.join(baseDir+'/tags',f)
|
tagsFilename=os.path.join(baseDir+'/tags',f)
|
||||||
if not os.path.isfile(tagsFilename):
|
if not os.path.isfile(tagsFilename):
|
||||||
continue
|
continue
|
||||||
if daysSinceEpoch not in open(tagsFilename).read():
|
if daysSinceEpochStr not in open(tagsFilename).read():
|
||||||
continue
|
continue
|
||||||
with open(tagsFilename, 'r') as tagsFile:
|
with open(tagsFilename, 'r') as tagsFile:
|
||||||
lines=tagsFile.readlines()
|
lines=tagsFile.readlines()
|
||||||
|
|
Loading…
Reference in New Issue