[[https://melpa.org/#/fb2-reader][file:https://melpa.org/packages/fb2-reader-badge.svg]]
Plugin for Emacs to read FictionBook2 ebooks.
Features:
Coming soon:
integration with https://github.com/jumper047/librera-sync
rendering book in org-mode
Screenshots
Main window
[[./images/main_window.png]]
Header line
[[./images/headerline.gif]]
Metadata screen
[[./images/metadata.png]]
Book loading screen
[[./images/splash_screen.png]]
Outline
[[./images/outline.png]]
TL;DR Add to your config and open any .fb2 or .fb2.zip document.
(use-package fb2-reader :mode ("\.fb2\(\.zip\)?\'" . fb2-reader-mode) :commands (fb2-reader-continue) :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
Install =fb2-reader= from MELPA and add that string to your config:
(require 'fb2-reader)
Also you can set it up with use-package:
(use-package fb2-reader :commands (fb2-reader-continue))
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:
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. You can continue reading by executing =M-x fb2-reader-continue=. Key bindings listed below:
Fb2-reader: |----------+-----------------------------------------| | Key | Action | |----------+-----------------------------------------| | =[=, =]= | Jump to previous or next chapter | |----------+-----------------------------------------| | =p=, =n= | Jump to previous or next displayed link | |----------+-----------------------------------------| | =l=, =B= | Jump to last used link's location | |----------+-----------------------------------------| | =B=, =N= | Jump to last used link's target | |----------+-----------------------------------------| | =g= | Reload current book | |----------+-----------------------------------------| | =v= | View current book as xml | |----------+-----------------------------------------| | =x= | Reopen fb2.zip document as archive | |----------+-----------------------------------------| | =i= | View FB2 metadata | |----------+-----------------------------------------| | =j= | Jump to chapter via imenu | |----------+-----------------------------------------| | =o=, =t= | Show TOC outline | |----------+-----------------------------------------| | =c= | Toggle no-cursor mode | |----------+-----------------------------------------| Metadata: |----------+------------------------------------| | Key | Action | |----------+------------------------------------| | =p=, =n= | Jump to previous or next field | |----------+------------------------------------| | =P=, =N= | Jumps to previous or next category | |----------+------------------------------------| | =c= | Toggle no-cursor mode | |----------+------------------------------------| | =q= | Quit window | |----------+------------------------------------| Outline: |----------------+-------------------------------------------------| | Key | Action | |----------------+-------------------------------------------------| | =p=, =n= | Jump to previous or next heading | |----------------+-------------------------------------------------| | =RET= | Follow link | |----------------+-------------------------------------------------| | =C-o=, =SPACE= | Display link (withoiut switching to fb2 buffer) | |----------------+-------------------------------------------------| | =M-RET= | Follow link and quit TOC window | |----------------+-------------------------------------------------| | =o=, =t= | Switch to fb2 window | |----------------+-------------------------------------------------| | =q= | Quit TOC window | |----------------+-------------------------------------------------| | =Q= | Kill TOC window | |----------------+-------------------------------------------------|
Aknowledgements Heavily inspired by [[https://github.com/spline1986][@spline1986's]] [[https://github.com/spline1986/fb2-mode][fb2-mode]]. Also kudos for [[https://github.com/vlichevsky][@vlichevsky]] - his testing is extremely helpful!