Quote:
Originally Posted by KevinH
That is the spine itemref linear attribute. You can set it to None for default.
According to the spec, it determines if the referenced content is "primary" or not. It takes values "yes", "no", and can be left out entirely by setting it to None which then defaults to "yes".
|
Sorry, but i cant get this working.
Code:
uid = 'T12345'
bk.addfile(uid, 'Test0001.xhtml', xml, 'application/xhtml+xml')
bk.spine_insert_before(-1, uid, None, properties=None)
Code:
Traceback (most recent call last):
File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 301, in <module>
sys.exit(main())
File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 268, in main
ps.launch()
File "C:\Program Files\Sigil\plugin_launchers\python\launcher.py", line 149, in launch
container._w.write_opf()
File "C:\Program Files\Sigil\plugin_launchers\python\wrapper.py", line 268, in write_opf
data = utf8_str(self.build_opf())
File "C:\Program Files\Sigil\plugin_launchers\python\wrapper.py", line 256, in build_opf
data.append(self.build_spine_xml())
File "C:\Program Files\Sigil\plugin_launchers\python\wrapper.py", line 230, in build_spine_xml
for (id, linear, properties) in self.spine:
TypeError: 'NoneType' object is not iterable