Skip to content

Some database migrations for bootstrapping a dummy Kobo database

License

Notifications You must be signed in to change notification settings

marcus-crane/kobodbgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kobodbgen

This repository contains SQL migrations and seed files that builds a rough approximation of a Kobo database useful for testing.

At present, only the Bookmark and content tables are present which is mainly what I use for October

Usage

There are two prerequisites:

For macOS users, you can try brew install sqlite goose

From there, running ./initdb.sh will generate a KoboReader.sqlite file with all existing migrations and seeds applied.

Background

The seed files were created using public domain epubs/kepubs available from Standard Ebooks.

The exact sources are available under the epubs folder for reference.

Files were loaded onto a Kobo Libra 2, manually highlighted and then exported as insert statements using TablePlus.

A variety of files and import methods are used to capture differences that can occur under the hood.

The following books were used:

Name Author Format Notes
Tractatus Logico-Philosophicus Ludwig Wittgenstein kepub Manually copied onto root of device
813 Maurice Leblanc kepub Loaded onto Kobo using Calibre 6.11.0 on macOS + converted using Calibre kepub plugin due to Calibre not recognising file as a kepub
Don Quixote Miguel de Cervantes Saavedra epub Manually copied onto root of device
The Private Memoirs and Confessions of a Justified Sinner James Hogg epub Loaded onto Kobo using Calibre 6.11.0 on macOS

From there, each book was manually opened and highlighted more or less randomly.

In hindsight, I realised I forgot to add notes to any of the highlights but I'll probably extend the list of books over time anyway.

Do note that the above files are formatted cleanly by Standard Ebooks and it would be useful to add in some messier epubs to reflect what is lying on the internet.

Credits

Special thanks to Standard Ebooks for their ongoing library of high quality, public domain titles.

About

Some database migrations for bootstrapping a dummy Kobo database

Topics

Resources

License

Stars

Watchers

Forks

Languages