Skip to content
John Factotum edited this page Aug 7, 2019 · 25 revisions

Reading progress slider not showing up?

In order to display the slider, Epub.js must generate locations for the entire book. For books with lots of pages, this could take a while. In the meantime, you can still read the book and use all other functionalities normally.

Once the locations are generated, the info is cached (in ~/.cache/com.github.johnfactotum.Foliate) and should load instantly next time you open the book.

How are notes and bookmarks stored?

Your reading progress, bookmarks, and annotations are saved in ~/.local/share/com.github.johnfactotum.Foliate

If you're using the flatpak version, they should be in ~/.var/app/com.github.johnfactotum.Foliate/data/com.github.johnfactotum.Foliate

The data for each book is stored in a JSON file named after the book's identifier. If you'd like to sync or backup your progress and notes, simply copy these files and everything should just work™.

Inside the JSON file, the structure looks like this:

{
  "lastLocation": "epubcfi(/6/12[main2]!/4/2/2/2/1:0)", // your reading progress
  "annotations": [
    {
      "value": "epubcfi(/6/12[main2]!/4/2/2/2,/1:0,/1:286)",
      // highlight color
      "color": "aqua",
      // the highlighted text
      "text": "Good sense is, of all things among men, the most equally distributed; for every one thinks himself so abundantly provided with it, that those even who are the most difficult to satisfy in everything else, do not usually desire a larger measure of this quality than they already possess.",
      // ... and your note
      "note": "Very droll, René."
    },
    "bookmarks": [] // bookmarks are stored here
    "metadata": { /* the book's metadata is provided here for convenience, starting from v1.5.0 */ }
  ]
}

The "epubcfi(...)" parts are EPUB Canonical Fragment Identifiers, which is the "standardized method for referencing arbitrary content within an EPUB® Publication."

How to use text-to-speech?

Foliate supports espeak/espeak-ng and festival. The exact command can be configured in the preference dialog.

Other speech synthesis programs can be used, but Foliate expects the following interface:

  1. The program would read text from stdin and speak them
  2. Return when finished speaking
  3. Stop speaking when SIGINT is received
Clone this wiki locally