forked from indymedia/epicyon
Simplify
parent
395ee53424
commit
6c8298c554
|
@ -38,25 +38,20 @@ def htmlHashTagSwarm(baseDir: str, actor: str) -> str:
|
||||||
if daysSinceEpochStr 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:
|
||||||
|
while True:
|
||||||
line = tagsFile.readline()
|
line = tagsFile.readline()
|
||||||
tagCtr = 0
|
if not line:
|
||||||
while line:
|
break
|
||||||
if ' ' not in line:
|
elif ' ' not in line:
|
||||||
line = tagsFile.readline()
|
|
||||||
break
|
break
|
||||||
postDaysSinceEpochStr = line.split(' ')[0]
|
postDaysSinceEpochStr = line.split(' ')[0]
|
||||||
if not postDaysSinceEpochStr.isdigit():
|
if not postDaysSinceEpochStr.isdigit():
|
||||||
line = tagsFile.readline()
|
|
||||||
break
|
break
|
||||||
postDaysSinceEpoch = int(postDaysSinceEpochStr)
|
postDaysSinceEpoch = int(postDaysSinceEpochStr)
|
||||||
if postDaysSinceEpoch < daysSinceEpoch:
|
if postDaysSinceEpoch < daysSinceEpoch:
|
||||||
break
|
break
|
||||||
if postDaysSinceEpoch == daysSinceEpoch:
|
elif postDaysSinceEpoch == daysSinceEpoch:
|
||||||
if tagCtr == 0:
|
|
||||||
tagSwarm.append(hashTagName)
|
tagSwarm.append(hashTagName)
|
||||||
tagCtr += 1
|
|
||||||
|
|
||||||
line = tagsFile.readline()
|
|
||||||
break
|
break
|
||||||
|
|
||||||
if not tagSwarm:
|
if not tagSwarm:
|
||||||
|
|
Loading…
Reference in New Issue