Convert Figma logo to code with AI

johnfactotum logofoliate

Read e-books in style

6,114
283
6,114
179

Top Related Projects

19,281

The official source code repository for the calibre ebook manager

16,575

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices

A cross platform desktop reading app, based on the Readium Desktop toolkit

A modern ebook manager and reader with sync and backup capacities for Windows, macOS, Linux and Web

Quick Overview

Foliate is a modern and user-friendly eBook viewer for Linux systems. It supports various eBook formats, including EPUB, PDF, and MOBI, and offers a clean, customizable interface with features like text-to-speech, annotations, and dictionary lookups.

Pros

  • Sleek and intuitive user interface
  • Supports multiple eBook formats
  • Offers advanced features like text-to-speech and annotations
  • Actively maintained and regularly updated

Cons

  • Limited to Linux systems (not available for Windows or macOS)
  • May have occasional performance issues with large PDF files
  • Some features may require additional system dependencies

Getting Started

To install Foliate on Ubuntu or Debian-based systems:

sudo add-apt-repository ppa:apandada1/foliate
sudo apt update
sudo apt install foliate

For other Linux distributions, check the project's GitHub page for specific installation instructions.

To launch Foliate, simply search for it in your applications menu or run the following command in the terminal:

foliate

Once launched, you can open an eBook file by clicking on the "Open" button or dragging and dropping the file into the application window.

Competitor Comparisons

19,281

The official source code repository for the calibre ebook manager

Pros of Calibre

  • More comprehensive e-book management features, including library organization, metadata editing, and format conversion
  • Cross-platform support (Windows, macOS, Linux) with a native desktop application
  • Extensive plugin ecosystem for customization and additional functionality

Cons of Calibre

  • Larger application size and resource usage
  • Steeper learning curve due to its extensive feature set
  • User interface can feel cluttered and outdated compared to more modern alternatives

Code Comparison

Foliate (JavaScript):

import Gio from 'gi://Gio';
import GLib from 'gi://GLib';

export function getLocale() {
    return GLib.get_language_names()[0];
}

Calibre (Python):

from calibre.utils.localization import get_lang

def get_locale():
    return get_lang().replace('_', '-')

Both projects use different programming languages and frameworks, making direct code comparison challenging. Foliate is built with JavaScript and GNOME technologies, while Calibre uses Python. The code snippets show similar functionality for retrieving the system locale, but implemented differently based on their respective ecosystems.

16,575

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices

Pros of KOReader

  • More extensive device support, including e-ink readers and Android devices
  • Advanced features like text-to-speech and custom CSS styling
  • Larger and more active community, resulting in frequent updates and improvements

Cons of KOReader

  • Steeper learning curve due to more complex interface and features
  • Less polished and modern user interface compared to Foliate
  • Primarily designed for e-ink devices, which may impact performance on other platforms

Code Comparison

KOReader (Lua):

local ReaderUI = require("apps/reader/readeruiMenu")
local ReaderView = require("ui/widget/readerview")

function ReaderUI:init()
    self.view = ReaderView:new()
    -- Additional initialization code
end

Foliate (JavaScript):

const { GObject, Gtk } = imports.gi
const View = GObject.registerClass({
    GTypeName: 'FoliateView',
}, class View extends Gtk.Box {
    _init(params) {
        super._init(params)
        // View initialization code
    }
})

Both projects use different programming languages and frameworks, reflecting their target platforms and design philosophies. KOReader's Lua codebase is optimized for e-ink devices, while Foliate's JavaScript implementation leverages the GNOME ecosystem for desktop environments.

A cross platform desktop reading app, based on the Readium Desktop toolkit

Pros of Thorium Reader

  • Cross-platform support (Windows, macOS, Linux)
  • Robust EPUB3 support with advanced features like text-to-speech
  • Active development with frequent updates

Cons of Thorium Reader

  • Larger file size and resource usage
  • Steeper learning curve for new users
  • Less native integration with some operating systems

Code Comparison

Foliate (JavaScript):

const { GObject, Gtk } = imports.gi
const { Settings } = imports.preferences
const window = new Gtk.ApplicationWindow({
    application: application,
    title: _('Foliate')
})

Thorium Reader (TypeScript):

import { app, BrowserWindow } from "electron";
import * as path from "path";

function createWindow() {
  const win = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      preload: path.join(__dirname, "preload.js")
    }
  });
}

Both projects use different technologies for their user interfaces. Foliate utilizes GTK for a native Linux look, while Thorium Reader employs Electron for cross-platform compatibility.

A modern ebook manager and reader with sync and backup capacities for Windows, macOS, Linux and Web

Pros of Koodo Reader

  • Cross-platform support (Windows, macOS, Linux, and web)
  • More extensive file format support, including PDF and DJVU
  • Built-in dictionary and translation features

Cons of Koodo Reader

  • Larger application size due to being built with Electron
  • May have higher resource usage compared to native applications
  • Less integrated with GNOME desktop environment

Code Comparison

Foliate (JavaScript):

const { GObject, Gtk, Gdk, GdkPixbuf, Gio, GLib } = imports.gi
const { spawn } = imports.misc.util

class FoliateWindow extends Gtk.ApplicationWindow {
    // ...
}

Koodo Reader (TypeScript):

import React from "react";
import { connect } from "react-redux";
import { withRouter } from "react-router-dom";
import ReaderHeader from "../../components/readerHeader";
import ReaderContent from "../../components/readerContent";

Summary

Foliate is a native GNOME application written in JavaScript, offering a lightweight and well-integrated experience for Linux users. Koodo Reader, built with Electron and React, provides cross-platform support and a wider range of features, but at the cost of larger file size and potentially higher resource usage. The choice between the two depends on the user's priorities regarding platform support, feature set, and system resource considerations.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Foliate

Read books in style.

Screenshot

Installation

Run Time Dependencies

  • gjs (>= 1.76)
  • gtk4 (>= 4.12)
  • libadwaita (>= 1.4; gir1.2-adw-1 in Debian-based distros)
  • webkitgtk-6.0 (webkitgtk6.0 in Fedora; gir1.2-webkit-6.0 in Debian-based distros)

Optional Dependencies

To enable auto-hyphenation, you will need to install hyphenation rules, e.g., hyphen-en for English, hyphen-fr for French, etc. (which strictly speaking are optional dependencies for WebkitGTK, not Foliate itself).

For text-to-speech support, install speech-dispatcher and output modules such as espeak-ng.

If installed, tracker (>= 3; gir1.2-tracker-3.0 in Debian-based distros) and tracker-miners can be used to track the locations of files.

Obtaining the Source

The repo uses git submodules. Before running or installing, make sure you clone the whole thing with --recurse-submodules:

git clone --recurse-submodules https://github.com/johnfactotum/foliate.git 

Or download the tarball (the .tar.xz file) from the Releases page.

Run without Building or Installing

It's possible to run directly from the source tree without building or installing. Simply run

gjs -m src/main.js

This can be useful if you just want to quickly try out Foliate or test a change.

But note that this will run it without using GSettings, so settings will not be saved. To solve this, you can compile the schema by running

glib-compile-schemas data

Then you can set the schema directory when running the app:

GSETTINGS_SCHEMA_DIR=data gjs -m src/main.js

Building and Installing from Source

The following dependencies are required for building:

  • meson (>= 0.59)
  • pkg-config
  • gettext

To install, run the following commands:

meson setup build
sudo ninja -C build install

To uninstall, run

sudo ninja -C build uninstall

Installing to a Local Directory

By default Meson installs to /usr/local. You can install without root permissions by choosing a local prefix, such as $PWD/run:

meson setup build --prefix $PWD/run
ninja -C build install

You can then run it with

GSETTINGS_SCHEMA_DIR=run/share/glib-2.0/schemas ./run/bin/foliate

Flatpak

Foliate is available on Flathub.

For developement with Flatpak, use GNOME Builder to open and run the project.

Snap

Foliate is available on the Snap Store. To install:

sudo snap install foliate

Screenshots

Dark mode

Wikipedia lookup

Book metadata

Annotations

Popup footnote

Vertical writing

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The following JavaScript libraries are bundled in this software:

  • foliate-js, which is MIT licensed.
  • zip.js, which is licensed under the BSD-3-Clause license.
  • fflate, which is MIT licensed.
  • PDF.js, which is licensed under Apache License 2.0.

Buy Me A Coffee