Skip to content

Read epub book, update info and save #3

@eakarpov

Description

@eakarpov

Hello!

Is there a way to mutate an existing copy of the book?
Or how to create a minimal working version of epub with the lib? I filled in all required fields, but the file is corrupted when being saved. What do I need more?
I had an idea to read an existing epub book and change it with my info, but it seems like I cannot modify the book when read it.

var book = EpubBook(
                        title: "Test",
                        author: "No author",
                        content: EpubContent(
                          allFiles: {},
                        ),
                        schema: EpubSchema(
                          package: EpubPackage(
                            version: EpubVersion.epub2,
                            metadata: EpubMetadata(),
                            manifest: EpubManifest(),
                            spine: EpubSpine(
                              ltr: true,
                              tableOfContents: "",
                            ),
                            guide: EpubGuide(),
                          ),
                        ),
                        chapters: [
                          EpubChapter(
                            title: "Chapter",
                            htmlContent: "<div>Test something</div>",
                          )
                        ]
                    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions