mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Minor cleanup
This commit is contained in:
parent
ab1a2a9e09
commit
6de969a506
@ -2310,10 +2310,8 @@ class MobiWriter(object):
|
|||||||
parentIndex = sectionParent.parentIndex
|
parentIndex = sectionParent.parentIndex
|
||||||
self._write_section_node(indxt, indices, sectionParent.myCtocMapIndex, index, offset, length, c, firstArticle, lastArticle, parentIndex)
|
self._write_section_node(indxt, indices, sectionParent.myCtocMapIndex, index, offset, length, c, firstArticle, lastArticle, parentIndex)
|
||||||
|
|
||||||
last_name = "%04X"%c
|
|
||||||
|
|
||||||
# articles
|
# articles
|
||||||
for (i, article) in enumerate(list(sectionParent.articles)) :
|
for article in list(sectionParent.articles):
|
||||||
index = article.myCtocMapIndex
|
index = article.myCtocMapIndex
|
||||||
offset = article.startAddress
|
offset = article.startAddress
|
||||||
length = article.articleLength
|
length = article.articleLength
|
||||||
@ -2413,7 +2411,6 @@ class MobiWriter(object):
|
|||||||
# <navPoint> Article(s) child.depth() = 1
|
# <navPoint> Article(s) child.depth() = 1
|
||||||
# <navpoint> Section 2
|
# <navpoint> Section 2
|
||||||
|
|
||||||
documentType = "unknown"
|
|
||||||
sectionIndices = []
|
sectionIndices = []
|
||||||
sectionParents = []
|
sectionParents = []
|
||||||
currentSection = 0 # Starting section number
|
currentSection = 0 # Starting section number
|
||||||
@ -2421,7 +2418,6 @@ class MobiWriter(object):
|
|||||||
indxt, indices, c = StringIO(), StringIO(), 0
|
indxt, indices, c = StringIO(), StringIO(), 0
|
||||||
|
|
||||||
indices.write('IDXT')
|
indices.write('IDXT')
|
||||||
c = 0
|
|
||||||
last_name = None
|
last_name = None
|
||||||
|
|
||||||
# 'book', 'periodical' or None
|
# 'book', 'periodical' or None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user