def gen_opf(self, book_idx):
        """
        生成项目文件
        :return:
        :rtype:
        """
        if self._chapterization:
            title = '{title}-{book_idx}'.format(title=self._title, book_idx=book_idx)
            book = 'book-{book_idx}'.format(book_idx=book_idx)
            toc = 'toc-{book_idx}'.format(book_idx=book_idx)
        else:
            title = '{title}'.format(title=self._title)
            book = 'book'
            toc = 'toc'

        opf_file = """<?xml version="1.0" encoding="utf-8"?>
<package unique-identifier="uid" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:asd="http://www.idpf.org/asdfaf">
    <metadata>
        <dc-metadata  xmlns:dc="http://purl.org/metadata/dublin_core" xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/">
            <dc:Title>{title}</dc:Title>
            <dc:Language>zh-cn</dc:Language>
            <dc:Creator>{author}</dc:Creator>
            <dc:Copyrights>{author}</dc:Copyrights>
            <dc:Publisher>Alexander.Li</dc:Publisher>
            <x-metadata>
                <EmbeddedCover>{cover}</EmbeddedCover>
            </x-metadata>
        </dc-metadata>
    </metadata>
    <manifest>
        <item id="toc" properties="nav" href="{book}.html" media-type="application/xhtml+xml"/>
        <item id="content" media-type="application/xhtml+xml" href="{book}.html"></item>
        <item id="cover-image" media-type="image/png" href="{cover}"/>
        <item id="ncx" media-type="application/x-dtbncx+xml" href="{toc}.ncx"/>
    </manifest>
    <spine toc="ncx">
        <itemref idref="cover-image"/>
        <itemref idref="toc"/>
        <itemref idref="content"/>
    </spine>
    <guide>
        <reference type="toc" title="{title_name}" href="{book}.html#toc"/>
        <reference type="content" title="Book" href="{book}.html"/>
    </guide>
</package>
        """.format(
            title_name='目录',
            author=self._author,
            title=title,
            cover=self._cover_img,
            book=book,
            toc=toc
        )
        return opf_file
生成项目文件
        :return:
        :rtype: