Quote:
Originally Posted by BeckyEbook
But ... How do I calculate line number for OPF (eg. in metadata, guide)?
|
Use the formula that KevinH provided and adjust the the character offset as follows:
Code:
coffset = charoffset(linenumber, colnumber, offlst)
if filename == 'content.opf':
coffset += linenumber - 1
BTW, if you want to check for toc, text and cover guide/landmarks items, you might be able recycle some of the code of the
KindleGen plugin, which checks for the presence of these items.