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

My book is not displayed properly!

You can help by testing out whether it's a problem with Epub.js, or a problem specific to Foliate:

  1. Go to https://futurepress.github.io/epub.js/examples/input.html (It's best to test with a WebKit-based browser, as there are sometimes WebKit specific issues)
  2. Use the input button at the top of that page to choose your file. Note that the button might not show if your viewport is too small. Try resizing the window or zooming out if you don't see the button.
  3. The prev/next button on their example is currently broken. However, if you open your browser's developer tools, you should be able to use the console and run rendition.next() and rendition.prev().
  4. If it doesn't work, consider reporting the issue upstream. If it only fails in Foliate, you can report it here.
Clone this wiki locally