Giter VIP home page Giter VIP logo

fb2-reader's Introduction

FB2-reader

Major mode to read FictionBook2 documents.

Features:

  • read .fb2 and .fb2.zip files
  • reach book formatting
  • showing current title in header line
  • internal links (select from keyboard, jumb back and forth)
  • navigation (next/previous chapters, imenu support)
  • restoring last read position

Coming soon:

TL;DR

Add to your config and open any .fb2 or .fb2.zip document.

(use-package fb2-reader
  :load-path "path/to/fb2-reader-dir"
  :mode (("\\.fb2\\(.zip\\|\\)$" . fb2-reader-mode))
  :custom
  ;; This mode renders book with fixed width, adjust to your preferences.
  (fb2-reader-page-width 120)
  (fb2-reader-image-max-width 400)
  (fb2-reader-image-max-height 400))

Installation

Plain

Download fb2-reader.el, put it somewhere in your load-path, add that string to your config:

(add-to-list 'load-path "path/to/fb2-reader-dir")
(require 'fb2-reader)
(add-to-list 'auto-mode-alist '("\\.fb2\\(.zip\\|\\)$" . fb2-reader-mode))

Also you can set it up with use-package:

(use-package fb2-reader
  :load-path "path/to/fb2-reader-dir"
  :mode (("\\.fb2\\(.zip\\|\\)$" . fb2-reader-mode)))

Melpa

Coming soon

Customization

Every book rendered as buffer with certain width, so you may want to tune variables related to your monitor’s size or reading preferences:

  • fb2-reader-page-width - width of rendered book
  • fb2-reader-image-max-width and fb2-reader-image-max-height - max. width and height of an images in book.

You can view all available options with M-x customize-group fb2-reader.

Usage

Just open an .fb2 or .fb2.zip file. First opening will take a time - book will be rendered and saved to cache, so all next ones will be quick. Default bindings listed below:

KeyDescription
[, ]Jump to previous or next chapter
p, nJump to previous or next displayed link
l, rHistory navigation (for now, actualy, it just
B, Njumps between last link target and location)
rReload current book

Aknowledgements

Heavily inspired by @spline1986’s fb2-mode

fb2-reader's People

Contributors

jumper047 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.