forked from indymedia/epicyon
Read index line by line
parent
adcc5dcc1c
commit
049da094da
7
posts.py
7
posts.py
|
@ -2036,11 +2036,12 @@ def createBoxBase(session,baseDir: str,boxname: str, \
|
||||||
minPageNumber=pageNumber+4
|
minPageNumber=pageNumber+4
|
||||||
maxPostCtr=itemsPerPage*minPageNumber
|
maxPostCtr=itemsPerPage*minPageNumber
|
||||||
with open(indexFilename, 'r') as indexFile:
|
with open(indexFilename, 'r') as indexFile:
|
||||||
for postFilename in indexFile:
|
while postsCtr<maxPostCtr:
|
||||||
|
postFilename=indexFile.readline()
|
||||||
|
if not postFilename:
|
||||||
|
break
|
||||||
postsInBox[postsCtr]=os.path.join(boxDir, postFilename.replace('\n',''))
|
postsInBox[postsCtr]=os.path.join(boxDir, postFilename.replace('\n',''))
|
||||||
postsCtr+=1
|
postsCtr+=1
|
||||||
if postsCtr>=maxPostCtr:
|
|
||||||
break
|
|
||||||
else:
|
else:
|
||||||
postsCtr=createBoxIndex(boxDir,postsInBoxDict)
|
postsCtr=createBoxIndex(boxDir,postsInBoxDict)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue