Next: , Previous: , Up: Emacspeak Commands And Options   [Contents][Index]


12.62 emacspeak-epub

12.62.1 Introduction

This module implements the Emacspeak EPub Bookshelf — a unified interface for organizing, locating and reading EPub EBooks on the emacspeak Audio Desktop. The epub reader is built using the Emacs Web Browser (EWW), and all of emacspeak’s EWW conveniences are available when reading EBooks — see See emacspeak-eww for useful tools including bookmarking and structured navigation. For now it supports epub2 — it will support epub3 some time in the future.

The main entry point is command emacspeak-epub bound to C-e g. This command opens a new bookshelf buffer unless the user has previously opened a specific bookshelf. A bookshelf is a buffer that lists books placed on a given bookshelf — these are listed by title and author. The bookshelf buffer is in a special mode that provides single-key commands for adding, removing and finding books, as well as for opening the selected book using Emacs’ built-in Web browser (eww).

The next few sections give a high-level overview of the emacspeak Bookshelf and EPub interaction, followed by detailed documentation on the various commands and user options.

12.62.2 Organizing EBooks On The Emacspeak Desktop

In the simplest case, EBooks can be placed under a specific directory (with sub-directories as needed). Customize user option emacspeak-epub-library-directory to point to this location. Here is a quick summary of commands for organizing, saving and opening a bookshelf:

a

emacspeak-epub-bookshelf-add-epub

b

emacspeak-epub-bookshelf-open

c

emacspeak-epub-bookshelf-clear

d

emacspeak-epub-bookshelf-remove-this-book

r

emacspeak-epub-bookshelf-rename

l

emacspeak-epub-locate-epubs

C-a

emacspeak-epub-bookshelf-add-directory

C-d

emacspeak-epub-bookshelf-remove-directory

C-l

emacspeak-epub-bookshelf-redraw

C-o

emacspeak-epub-bookshelf-open-epub

M-s

emacspeak-epub-bookshelf-save

C-x C-q

emacspeak-epub-bookshelf-refresh

C-x C-s

emacspeak-epub-bookshelf-save

12.62.3 Integrating With Project Gutenberg

Gutenberg integration provides one-shot commands for downloading the latest copy of the Gutenberg catalog and finding and downloading the desired epub for offline reading.

C

emacspeak-epub-gutenberg-catalog

g

emacspeak-epub-gutenberg-download

Once downloaded, these EBooks can be organized under emacspeak-epub-library-directory For more advanced usage, see the next section on integrating with Calibre catalogs.

12.62.4 Calibre Integration

Project Calibre enables the indexing and searching of large EBook collections. Read the Calibre documentation for organizing and indexing your EBook library. See user options named emacspeak-epub-calibre-* for customizing emacspeak to work with Calibre. Once set up, Calibre integration provides the following commands from the bookshelf buffer:

/

emacspeak-epub-calibre-results

A

emacspeak-epub-bookshelf-calibre-author

S

emacspeak-epub-bookshelf-calibre-search

T

emacspeak-epub-bookshelf-calibre-title

12.62.5 Reading EBooks From The Bookshelf

The most efficient means to read an EBook is to have EWW render the entire book — this works well even for very large EBooks given that EWW is efficient at rendering HTML. Rendering the entire book means that all of the contents are available for searching. To view an EBook in its entirety, use command emacspeak-epub-eww. You can open the EPub table of contents with command emacspeak-epub-open; for a well-constructed epub, this TOC should provide hyperlinks to each section listed in the table of contents.

RET

emacspeak-epub-eww

e

emacspeak-epub-eww

f

emacspeak-epub-browse-files

o

emacspeak-epub-open

12.62.6 emacspeak-epub Commands

12.62.6.1 emacspeak-calibre-mode

Command: emacspeak-calibre-mode
A Calibre Front-end.
Letters do not insert themselves; instead, they are commands.

key             binding
—             ——-

RET             emacspeak-epub-calibre-dired-at-point

In addition to any hooks its parent mode ‘special-mode’ might have run,
this mode runs the hook ‘emacspeak-calibre-mode-hook’, as the final or penultimate step
during initialization.

12.62.6.2 emacspeak-epub

Command: emacspeak-epub
C-e g
<fn> g
EPub  Interaction.
For detailed documentation, see M-x emacspeak-epub-mode

12.62.6.3 emacspeak-epub-bookshelf-add-directory

Command: emacspeak-epub-bookshelf-add-directory (directory &optional recursive)
        Add EPubs found in specified directory to the bookshelf.
Interactive prefix arg searches recursively in directory.

(fn DIRECTORY &optional RECURSIVE)

12.62.6.4 emacspeak-epub-bookshelf-add-epub

Command: emacspeak-epub-bookshelf-add-epub (epub-file)
Add epub file to current bookshelf.

(fn EPUB-FILE)

12.62.6.5 emacspeak-epub-bookshelf-calibre-author

Command: emacspeak-epub-bookshelf-calibre-author (pattern)
        Add results of an author search to current bookshelf.

(fn PATTERN)

12.62.6.6 emacspeak-epub-bookshelf-calibre-search

Command: emacspeak-epub-bookshelf-calibre-search (pattern)
        Add results of an title/author search to current bookshelf.

(fn PATTERN)

12.62.6.7 emacspeak-epub-bookshelf-calibre-title

Command: emacspeak-epub-bookshelf-calibre-title (pattern)
        Add results of an title search to current bookshelf.

(fn PATTERN)

12.62.6.8 emacspeak-epub-bookshelf-clear

Command: emacspeak-epub-bookshelf-clear
Clear all books from bookshelf.

12.62.6.9 emacspeak-epub-bookshelf-load

Command: emacspeak-epub-bookshelf-load
Load bookshelf metadata from disk.

12.62.6.10 emacspeak-epub-bookshelf-open

Command: emacspeak-epub-bookshelf-open (bookshelf)
        Load bookshelf metadata from specified bookshelf.

(fn BOOKSHELF)

12.62.6.11 emacspeak-epub-bookshelf-open-epub

Command: emacspeak-epub-bookshelf-open-epub (epub-file)
        Open epub file and add it to current bookshelf.

(fn EPUB-FILE)

12.62.6.12 emacspeak-epub-bookshelf-redraw

Command: emacspeak-epub-bookshelf-redraw (&optional author-first)
Redraw Bookshelf.
Optional interactive prefix arg author-first prints author at the
  left.

(fn &optional AUTHOR-FIRST)

12.62.6.13 emacspeak-epub-bookshelf-refresh

Command: emacspeak-epub-bookshelf-refresh
Refresh and redraw bookshelf.

12.62.6.14 emacspeak-epub-bookshelf-remove-directory

Command: emacspeak-epub-bookshelf-remove-directory (directory &optional recursive)
        Remove EPubs found in specified directory from the bookshelf.
Interactive prefix arg searches recursively in directory.

(fn DIRECTORY &optional RECURSIVE)

12.62.6.15 emacspeak-epub-bookshelf-remove-this-book

Command: emacspeak-epub-bookshelf-remove-this-book
        Remove the book on current line from this bookshelf.
No book files are deleted.

12.62.6.16 emacspeak-epub-bookshelf-rename

Command: emacspeak-epub-bookshelf-rename (name &optional overwrite)
        Saves current bookshelf to  specified name.
Interactive prefix arg ‘overwrite’ will overwrite existing file.

(fn NAME &optional OVERWRITE)

12.62.6.17 emacspeak-epub-bookshelf-save

Command: emacspeak-epub-bookshelf-save
Save bookshelf metadata.

12.62.6.18 emacspeak-epub-browse-files

Command: emacspeak-epub-browse-files (epub)
Browse list of HTML files in an EPub.
Useful if table of contents in toc.ncx is empty.

(fn EPUB)

12.62.6.19 emacspeak-epub-calibre-dired-at-point

Command: emacspeak-epub-calibre-dired-at-point
        Open directory containing current result.

12.62.6.20 emacspeak-epub-calibre-results

Command: emacspeak-epub-calibre-results
        Show most recent Calibre search results.

12.62.6.21 emacspeak-epub-delete

Command: emacspeak-epub-delete
Delete EPub under point.

12.62.6.22 emacspeak-epub-eww

Command: emacspeak-epub-eww (epub-file &optional broken-ncx)
        Display entire book  using EWW from EPub.
Uses content listed in toc.ncx or  equivalent by default.
Interactive prefix arg broken-ncx asks to use the list of html files
in the epub file instead.

(fn EPUB-FILE &optional BROKEN-NCX)

12.62.6.23 emacspeak-epub-google

Command: emacspeak-epub-google (query)
Search for Epubs from Google Books.

(fn QUERY)

12.62.6.24 emacspeak-epub-gutenberg-catalog

Command: emacspeak-epub-gutenberg-catalog (&optional refresh)
Open Gutenberg catalog.
Fetch if needed, or if refresh is T.

(fn &optional REFRESH)

12.62.6.25 emacspeak-epub-gutenberg-download

Command: emacspeak-epub-gutenberg-download (book-id &optional download)
Open web page for specified book.
Place download url for epub in kill ring.
With interactive prefix arg ‘download’, download the epub.

(fn BOOK-ID &optional DOWNLOAD)

12.62.6.26 emacspeak-epub-locate-epubs

Command: emacspeak-epub-locate-epubs (pattern)
Locate epub files using locate.

(fn PATTERN)

12.62.6.27 emacspeak-epub-mode

Command: emacspeak-epub-mode
An EPub Front-end.
Letters do not insert themselves; instead, they are commands.

key             binding
—             ——-

C-a             emacspeak-epub-bookshelf-add-directory
C-d             emacspeak-epub-bookshelf-remove-directory
C-k             emacspeak-epub-delete
C-l             emacspeak-epub-bookshelf-redraw
RET             emacspeak-epub-eww
C-o             emacspeak-epub-bookshelf-open-epub
C-x             Prefix Command
ESC             Prefix Command
/               emacspeak-epub-calibre-results
A               emacspeak-epub-bookshelf-calibre-author
C               emacspeak-epub-gutenberg-catalog
G               emacspeak-epub-google
O               emacspeak-epub-open-with-nov
S               emacspeak-epub-bookshelf-calibre-search
T               emacspeak-epub-bookshelf-calibre-title
a               emacspeak-epub-bookshelf-add-epub
b               emacspeak-epub-bookshelf-open
c               emacspeak-epub-bookshelf-clear
d               emacspeak-epub-bookshelf-remove-this-book
e               emacspeak-epub-eww
f               emacspeak-epub-browse-files
g               emacspeak-epub-gutenberg-download
l               emacspeak-epub-locate-epubs
n               next-line
o               emacspeak-epub-open
p               previous-line
r               emacspeak-epub-bookshelf-rename

M-s             emacspeak-epub-bookshelf-save

C-x C-q         emacspeak-epub-bookshelf-refresh
C-x C-s         emacspeak-epub-bookshelf-save

In addition to any hooks its parent mode ‘special-mode’ might have run,
this mode runs the hook ‘emacspeak-epub-mode-hook’, as the final or penultimate step
during initialization.

12.62.6.28 emacspeak-epub-next

Command: emacspeak-epub-next
Move to next book.

12.62.6.29 emacspeak-epub-open

Command: emacspeak-epub-open (epub-file)
Open specified Epub.
Filename may need to  be shell-quoted when called from Lisp.

(fn EPUB-FILE)

12.62.6.30 emacspeak-epub-open-with-nov

Command: emacspeak-epub-open-with-nov
Open ebook at point in nov-mode.

12.62.6.31 emacspeak-epub-previous

Command: emacspeak-epub-previous
Move to previous book.

12.62.6.32 emacspeak-epub-url-executor

Command: emacspeak-epub-url-executor (url)
        Custom URL executor for use in EPub Mode.

(fn URL)

12.62.7 emacspeak-epub Options

Variable: User Option emacspeak-epub-bookshelf-directory

Directory where we keep .bsf files defining various bookshelves.

Variable: User Option emacspeak-epub-calibre-root-dir

Root of Calibre library.

Variable: User Option emacspeak-epub-calibre-sqlite

Path to sqlite3.

Variable: User Option emacspeak-epub-gutenberg-mirror

Base URL for Gutenberg mirror.

Variable: User Option emacspeak-epub-gutenberg-suffix

Suffix of book type we retrieve.

Variable: User Option emacspeak-epub-html-to-text-command

Command to convert html to text on stdin.

Variable: User Option emacspeak-epub-library-directory

Directory under which we store Epubs.


Next: , Previous: , Up: Emacspeak Commands And Options   [Contents][Index]