mirror of https://gitlab.com/bashrc2/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
|
||||
maxPostCtr=itemsPerPage*minPageNumber
|
||||
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',''))
|
||||
postsCtr+=1
|
||||
if postsCtr>=maxPostCtr:
|
||||
break
|
||||
else:
|
||||
postsCtr=createBoxIndex(boxDir,postsInBoxDict)
|
||||
|
||||
|
|
Loading…
Reference in New Issue