Pancake is a CLI/Emacs web/gopher/file browser.

It utilizes pandoc and external downloaders such as curl, adding support for Gopher directories, RDF, and plain text files, invoking external applications (e.g., image and PDF viewers) depending on its configuration, and transforming HTML documents using user-defined XSLTs. The focus is on efficient information retrieval.

User interaction capabilities are rather basic, as it is intended to be combined with software that provides better user interfaces – such as emacs, tmux, screen.

See README for more information. Breaking changes are possible between 0.1.x releases; see ChangeLog and git log for recent changes.

1 Other text-based web/gopher browsers

Wikipedia lists a few major text-based web browsers, including Emacs-based ones. Pancake provides a combination of the things I liked about those, and the ones I have missed in those:

  • Multi-protocol support (via curl or other pluggable downloaders).
  • Multi-format support (via pandoc and additional readers).
  • Plain CLI.
  • An Emacs interface without unnecessary blocking, and general support for embedding.
  • Simplicity and small codebase, thanks to reusing the programs mentioned above.
  • Efficient UI.
  • Use of external programs to handle file types which it doesn't support.
  • XSLT-based HTML document uncluttering.
  • RDF support.

There are some drawbacks as well:

  • A large executable file (about 90 Mio uncompressed).
  • Not as hackable in Elisp as pure (or mostly) Elisp browsers.
  • Not as portable as C or Elisp ones.
  • A relatively small set of features.
  • Somewhat worse HTML parsing and rendering in some cases.
  • No HTML form input support.
  • Quite possibly more, depending on one's preferences.

2 Installation

2.1 Pancake

cabal install would build and install pancake and its documentation. Alternatively, basic Debian packages and binary releases are available.

Redland librdf should be available (librdf-dev on Debian, redland-devel on CentOS).

2.2 Emacs interface

M-x package-install-file RET /path/to/pancake.el RET. To set it as your default emacs browser:

(require 'pancake)
(setq browse-url-browser-function 'pancake)

To load and show all images automatically (not just after saving them manually):

(add-hook 'pancake-display-hook 'pancake-load-images)

Though it might be desirable to write a wrapper to only show those on specific websites, e.g. webcomics, and perhaps specific images only.

2.3 RDF cache

Pancake will look for labels for RDF nodes in its cache directory; those can be loaded manually with something like the following:

cd ~/.cache/pancake
rdfproc rdf-cache parse http://xmlns.com/foaf/0.1/
rdfproc rdf-cache parse http://www.w3.org/1999/02/22-rdf-syntax-ns
rdfproc rdf-cache parse http://www.w3.org/2000/01/rdf-schema
rdfproc rdf-cache parse http://purl.org/dc/elements/1.1/
rdfproc rdf-cache parse http://purl.org/ontology/mo/

3 Screenshots


Figure 1: Gopher directory, Emacs


Figure 2: gnu.org, xterm


Figure 3: Wikipedia article, Emacs


Figure 4: RDF (FOAF) document, Emacs