Convert Figma logo to code with AI

BasioMeusPuga logoLector

Qt based ebook reader

1,540
211
1,540
49

Top Related Projects

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database

20,899

The official source code repository for the calibre ebook manager

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

20,734

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

6,787

Read e-books in style

Quick Overview

Lector is an open-source ebook reader and library management software for Linux, Windows, and macOS. It supports various ebook formats, including EPUB, MOBI, AZW, and PDF, offering a clean and customizable reading experience with library organization features.

Pros

  • Cross-platform compatibility (Linux, Windows, macOS)
  • Supports multiple ebook formats (EPUB, MOBI, AZW, PDF, etc.)
  • Customizable reading interface with various themes and layout options
  • Integrated library management with metadata editing capabilities

Cons

  • Limited advanced features compared to some commercial ebook readers
  • May have occasional stability issues on certain systems
  • User interface can be less intuitive for some users
  • Development pace can be slow at times

Getting Started

To get started with Lector:

  1. Download the latest release from the GitHub repository.
  2. Install the application following the instructions for your operating system.
  3. Launch Lector and add your ebook files or directories to the library.
  4. Select a book to start reading or use the library management features to organize your collection.

For Linux users, you can install Lector using pip:

pip install lector

After installation, launch Lector from the command line:

lector

Note: Depending on your system, you may need to use pip3 instead of pip and ensure that Python is properly installed and configured in your PATH.

Competitor Comparisons

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database

Pros of calibre-web

  • Web-based interface accessible from any device with a browser
  • Supports multiple users with customizable permissions
  • Integrates with Calibre's existing library structure

Cons of calibre-web

  • Requires an existing Calibre library and database
  • Less focused on the reading experience compared to Lector
  • May have a steeper learning curve for users unfamiliar with Calibre

Code Comparison

Lector (Python):

def load_book(self, filename):
    self.book = ebooklib.read_epub(filename)
    self.metadata = self.book.get_metadata('DC', 'title')[0][0]

calibre-web (Python):

def get_book_metadata(book_id):
    db = ub.get_db()
    return db.session.query(db.Books).filter(db.Books.id == book_id).first()

Both projects use Python, but Lector focuses on direct ebook handling, while calibre-web interacts with a database to manage book metadata.

calibre-web is better suited for users who want a web-based library management system accessible from multiple devices, especially if they already use Calibre. Lector, on the other hand, is more appropriate for users looking for a dedicated e-book reader application with a focus on the reading experience itself.

20,899

The official source code repository for the calibre ebook manager

Pros of Calibre

  • More comprehensive feature set, including e-book management, conversion, and syncing
  • Larger and more active community, resulting in frequent updates and extensive plugin ecosystem
  • Supports a wider range of e-book formats and devices

Cons of Calibre

  • Heavier resource usage and larger installation footprint
  • More complex user interface, which may be overwhelming for some users
  • Slower startup time due to its extensive feature set

Code Comparison

Lector (Python):

def load_settings(self):
    settings_file = self.get_settings_path()
    if os.path.exists(settings_file):
        with open(settings_file, 'r') as f:
            self.settings = json.load(f)

Calibre (Python):

def load_user_preferences(self):
    if os.path.exists(prefs['library_path']):
        with open(os.path.join(prefs['library_path'], 'metadata.db'), 'rb') as f:
            self.library_db = pickle.load(f)

Both projects use Python and handle file operations for settings or preferences. Calibre's code snippet suggests a more complex data structure (using pickle for serialization) compared to Lector's simpler JSON-based approach.

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

Pros of Koodo Reader

  • Cross-platform support (Windows, macOS, Linux, and web)
  • More modern and polished user interface
  • Supports a wider range of ebook formats, including EPUB, PDF, MOBI, and more

Cons of Koodo Reader

  • Larger file size and potentially higher resource usage
  • Less focus on lightweight performance compared to Lector
  • May have a steeper learning curve for users who prefer simpler interfaces

Code Comparison

Lector (Python):

def load_book(self, filename):
    self.book = ebooklib.read_epub(filename)
    self.metadata = self.book.get_metadata('DC', 'title')[0][0]
    self.chapters = self.book.get_items_of_type(ebooklib.ITEM_DOCUMENT)

Koodo Reader (JavaScript):

const loadBook = async (filePath) => {
  const book = await ePub(filePath);
  const metadata = await book.loaded.metadata;
  const chapters = await book.loaded.navigation;
  return { book, metadata, chapters };
};

Both examples show basic book loading functionality, but Koodo Reader uses modern JavaScript with async/await for potentially better performance and readability.

20,734

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 comprehensive feature set, including advanced PDF reflow and extensive customization options
  • Supports a wider range of e-reader devices and platforms
  • Larger and more active community, resulting in frequent updates and improvements

Cons of KOReader

  • Steeper learning curve due to its extensive features and settings
  • Potentially overwhelming interface for users seeking a simpler reading experience
  • Requires more system resources, which may impact performance on older devices

Code Comparison

KOReader (Lua):

local InputContainer = require("ui/widget/container/inputcontainer")
local FrameContainer = require("ui/widget/container/framecontainer")
local CenterContainer = require("ui/widget/container/centercontainer")
local ConfirmBox = require("ui/widget/confirmbox")
local UIManager = require("ui/uimanager")

Lector (Python):

from PyQt5 import QtWidgets, QtCore, QtGui
from PyQt5.QtWidgets import QFileDialog, QDialog, QWidget, QHBoxLayout
from PyQt5.QtGui import QIcon, QFont, QImage, QPixmap
from PyQt5.QtCore import Qt, QSize
import os

Both projects use different programming languages, with KOReader utilizing Lua and Lector using Python with PyQt5 for its GUI. KOReader's code structure appears more modular, while Lector's code suggests a focus on desktop GUI development.

6,787

Read e-books in style

Pros of Foliate

  • More modern and polished user interface
  • Better support for GNOME desktop environment
  • Wider range of supported ebook formats, including CBZ and FB2

Cons of Foliate

  • Limited to Linux systems, while Lector is cross-platform
  • Fewer customization options for reading experience
  • Less robust library management features

Code Comparison

Foliate (JavaScript):

const book = new Epub(path);
book.open().then(() => {
    const toc = book.navigation.toc;
    const spine = book.spine;
});

Lector (Python):

def load_book(self, filename):
    self.book = ebooklib.read_epub(filename)
    self.metadata = self.book.get_metadata('DC', 'title')[0][0]
    self.chapters = self.book.get_items_of_type(ebooklib.ITEM_DOCUMENT)

Both projects use different programming languages and libraries for handling ebooks. Foliate uses JavaScript with the Epub.js library, while Lector uses Python with the ebooklib library. The code snippets show basic book loading and metadata extraction, demonstrating the different approaches taken by each project.

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

Lector

Qt based ebook reader

Currently supports:

  • pdf
  • epub
  • djvu
  • fb2
  • mobi
  • azw / azw3 / azw4
  • cbr / cbz
  • md

Contribute

Paypal

Bitcoin: 17jaxj26vFJNqQ2hEVerbBV5fpTusfqFro

Requirements

Needed

PackageVersion tested
Python3.6
PyQt55.10.1
python-lxml4.3.0
python-beautifulsoup44.6.0
python-xmltodict0.11.0

Optional

PackageVersion testedRequired for
python-pymupdf1.14.5PDF support
python-djvulibre0.8.4DjVu support
python-markdown3.0.1Markdown support
textile3.0.4TXT support

Support

When reporting issues:

  • Make sure you're at the latest commit.
  • Run with $EXECUTABLEPATH debug.
  • Include the log ~/.local/share/Lector/Lector.log AND terminal output.
  • If you're having trouble with a book while the rest of the application / other books work, please link to a copy of the book itself.
  • If nothing is working, please make sure the requirements mentioned above are all installed, and are at least at the version mentioned.

Installation

Manual

  1. Install dependencies - I recommend using your package manager for this.

  2. Clone repository

  3. Type the following in the root directory:

     $ python setup.py build
     # python setup.py install
    
  4. OR launch with lector/__main__.py

Available packages

Translations

  1. There is a SAMPLE.ts file here. Open it in Qt Linguist.
  2. Pick the language you wish to translate to.
  3. Translate relevant strings.
  4. Try to resist the urge to include profanity.
  5. Save the file as Lector_<language> and send it to me, preferably as a pull request.

Please keep the translations short. There's only so much space for UI elements.

Screenshots

Main window

alt tag

Table view

alt tag

Book reading view

alt tag

Distraction free view

alt tag

Annotation support

alt tag

Comic reading view

alt tag

Bookmark support

alt tag

View profiles

alt tag

Metadata editor

alt tag

In program dictionary

alt tag

Settings window

alt tag

Attributions

License

Lector is released under the GNU General Public License v3.0 or any later version. See the LICENSE file for details.