Skip to content

Instantly share code, notes, and snippets.

@goncalor
Last active February 17, 2026 12:26
Show Gist options
  • Select an option

  • Save goncalor/aef56914c8a72faa3d056aadaeb5fab5 to your computer and use it in GitHub Desktop.

Select an option

Save goncalor/aef56914c8a72faa3d056aadaeb5fab5 to your computer and use it in GitHub Desktop.
Notes on reading manga on Kobo

Reading manga on Kobo

The .cbX formats

I like to use the .cbz format to read manga because it’s very simple. It’s just a .zip file containing the images for the manga pages with its extension changed to .cbz . (There’s also .cb7 and .cbr that use 7z or RAR archives.) Images are read in alphabetical file name order by the e-reader and displayed on screen. That’s just it.

The advantages of using these formats over .epub is they are simple to create (no specialised tools needed), no fuss with margins and such making your pages smaller on screen, and maybe faster page load times. The disadvantage is that they don’t really support metadata (title, artist, reading direction, etc.).

There’s however a metadata file introduced by a discontinued application (ComicRack) that adds metadata to the .cbX formats. This file is ComicInfo.xml documented here. This file is simply added to the archive and allows an e-reader to have the metadata about the book. An example:

Example ComicInfo.xml
<?xml version="1.0" encoding="utf-8"?>
<ComicInfo>
    <Title>YuYu Hakusho</Title>
    <Volume>1</Volume>
    <Year>1991</Year>
    <Month>4</Month>
    <Publisher>Shonen Jump</Publisher>
    <LanguageISO>en</LanguageISO>
    <Manga>YesAndRightToLeft</Manga>
</ComicInfo>

But…​ From my experiments with Kobo (I own an old Kobo Aura), doesn’t support getting the metadata from ComicInfo.xml. Which means the title will be whatever the .cbX filename is, no author, and…​ more importantly, no reading direction! So you end up reading your manga left to right.

While Kobo doesn’t add support for this (I may send them an email suggesting it…​), I’ve hacked my way into getting proper reading direction, title, and artist/author. It’s not as convenient as the metadata file would be, but it works.

Changing book (manga) metadata directly on Kobo

Caution
We’re going to mess directly with the Kobo’s database. Do it carefully and at your own risk.
Note
I’m writing this based on Kobo Aura, your mileage may vary with other Kobo.

After you write a book to Kobo’s storage and disconnect it from your computer, Kobo writes information about it into its internal database (where it’s stored, title, author, number of pages, size, etc., etc.). This database is stored at .kobo/KoboReader.sqlite, in SQLite format.

This means you can query it. For example after importing some .cbz into a directory named "Manga":

$ sqlite3 -column -header KoboReader.sqlite "select ContentID, Title, Attribution, PageProgressDirection, ContentType, MimeType from content where ContentID like '%/Manga/%.cbz'"

ContentID                                 Title       Attribution     PageProgressDirection  ContentType  MimeType
----------------------------------------  ----------  --------------  ---------------------  -----------  -----------------
file:///mnt/onboard/Manga/yuyu_vol01.cbz  yuyu_vol01  Unknown Author  default                6            application/x-cbz
file:///mnt/onboard/Manga/yuyu_vol02.cbz  yuyu_vol02  Unknown Author  default                6            application/x-cbz
file:///mnt/onboard/Manga/yuyu_vol03.cbz  yuyu_vol03  Unknown Author  default                6            application/x-cbz

You’ll notice metadata on .cbz books have ContentType=6 (I haven’t tested other .cbX formats to see what they get).

This knowledge of the database suffices to for example update all your YuYu Hakusho manga under the "Manga" directory stored as .cbz to read in right-to-left direction (PageProgressDirection=rtl) and have Yoshihiro Togashi as author (Attribution='Yoshihiro Togashi').

Caution
Be very careful with what you specify in the where clause. If you make a mistake you may end up updating books you don’t wish to, or the whole database!
Updating metadata
$ sqlite3 -column -header KoboReader.sqlite
sqlite> update content set PageProgressDirection='rtl', Attribution='Yoshihiro Togashi'
   ...> where ContentType=6 and ContentID like '%/Manga/YuYu%.cbz';
Verifying the change
sqlite> select ContentID, Title, Attribution, PageProgressDirection from content
   ...> where ContentID like '%/Manga/%.cbz';

ContentID                                Title      Attribution        PageProgressDirection
---------------------------------------  ---------  -----------------  ---------------------
file:///mnt/onboard/Manga/yuyu_vol1.cbz  yuyu_vol1  Yoshihiro Togashi  rtl
file:///mnt/onboard/Manga/yuyu_vol2.cbz  yuyu_vol2  Yoshihiro Togashi  rtl
file:///mnt/onboard/Manga/yuyu_vol3.cbz  yuyu_vol3  Yoshihiro Togashi  rtl

sqlite> .exit

For this example I haven’t bothered with changing the title, but you can do it in the same way that we changed the author.

Workflow

In short, the workflow to change the metadata directly on Kobo is:

  1. Store some .cbz files in Kobo

  2. Disconnect it from the computer

  3. Let it load the new books

  4. Reconnect it to the computer

  5. Make the changes you want to the database

  6. Disconnect it from the computer

That’s all. Happy reading!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment