Generate an EPUB with Images and Inspect Every Packaged Asset

An abstract editorial 3D still life illustrating Generate an EPUB with Images and Inspect Every Packaged Asset

Treat completion as three accepted state transitions

Generating an EPUB with images is not complete when an asset list has been prepared or when a file with the .epub extension appears. Move through three distinct states: plan accepts the intended inputs, export fixes the exact artifact to be inspected, and inspect accepts the local package structure. If one transition fails, stop there and return to the settings owned by that gate.

The dedicated sample contains two chapters, three inline images, and one cover. Its article-specific Stage 4 run passed all three gates and ended with four packaged images, zero missing resources, and valid true. The central lesson is not merely to reconcile four assets. It is to keep each gate’s accepted facts and unresolved questions separate.

Let plan accept the inputs—and nothing more

The first gate is plan. On the dedicated copy, it reported fileCount 2, chapterCount 2, and valid true. That result establishes that the two intended chapters were recognized as inputs. It does not establish that the three inline images and the cover reached the final package.

If either count is not two, return to manuscript selection. Changing the cover or opening a generated EPUB cannot repair the wrong input set. Limiting this gate to “two chapters accepted” prevents an input error from being carried into export.

Let export identify one artifact for inspection

The second gate is export. The run produced studio-382-260831.120000.epub in horizontal layout with version 1.0 metadata. The file was 6,472 bytes, and its recorded SHA-256 begins with a753. The name, size, and digest identify the exact artifact used by the next gate.

A successful export does not yet establish image inclusion or reading order. If no artifact is produced, the destination is wrong, or the metadata does not match the intended run, return to the export settings and output location. Accept only the intermediate state “artifact fixed for inspection.”

Let inspect decide local structural completion

The final gate is inspect. It reported entryCount 15 and spineItemCount 6. The spine order was cover, title, nav, p001, p002, and colophon. Both nav.xhtml and NCX were present, with two chapter items in each. The package contained four images, reported zero missing resources, had no issues, and returned valid true.

Those observations establish that the two chapters remained in reading order, that the three inline images plus the cover corresponded to four packaged image resources, and that the inspection reported no missing resource. Only at this gate can this controlled sample be called complete at the local structural level.

Return to the gate that rejected the run

The three gates are not different names for the same reconciliation. Their return points are specific:

This state-based rule avoids rebuilding everything after a failure. The rejected transition identifies the smallest repair scope.

Keep visual and external checks after valid true

Here, valid true applies to the locally generated package structure, reading order, navigation, image registration, and missing-resource report. The run did not judge sharpness, cropping, color, page balance, KDP acceptance, hardware readers, or every reading application.

After the inspect gate, open the EPUB in the intended reading environments and assess appearance separately. If a retailer rejects it, use that retailer’s diagnostic as another return point. Zero missing resources in a local inspection is not a promise of identical rendering or acceptance everywhere.

Separate Rune Studio’s public capability from this run

Rune Studio publicly supports generating EPUB 3 output from Markdown manuscripts. Its export process creates nav.xhtml, NCX, and a content.opf package document with a manifest and spine, packages referenced images, and registers a selected cover as a cover resource.

This article’s evidence comes from explicit CLI operations on a dedicated copy and the recorded plan, export, and inspect results. It does not establish automatic tracking of Finder or cloud-storage changes, visual quality, or retailer approval. Keep documented capability, measured states, and external checks as separate claims.

Conclusion: do not finish before the final gate is accepted

For this sample, plan accepted two chapters, export fixed the artifact, and inspect reported four images, zero missing resources, p001 and p002 in order, and valid true. Because all three transitions were accepted in sequence, the sample reached local structural completion.

The decisive rule is not a one-time asset reconciliation. It is to stop at each gate until that gate’s state is accepted and to return only to the layer that rejected the run. The existence of an EPUB is intermediate evidence; the accepted inspect state is the local finish line.