Skip to content
Snippets Groups Projects
Select Git revision
  • renovate/github.com-blevesearch-bleve-v2-2.x
  • renovate/golang-1.x
  • master default protected
  • sql
  • batch
  • debian
  • search_api
  • 0.2.1e
  • 0.2.1d
  • 0.2.1c
  • 0.2.1b
  • 0.2.1a
  • 0.2.1
13 results

liber

  • Clone with SSH
  • Clone with HTTPS
  • ale's avatar
    ale authored
    4baff6ac
    History

    liber

    Software to manage an ebook collection. It supports EPUB, MOBI and PDF formats, and it will fetch metadata and cover images on external sources (currently Google Books). It offers powerful search functionality over a HTTP interface.

    Another useful feature is the ability to synchronize remote collections (currently in one direction only), making it possible for a group of people to manage a centralized ebook repository.

    Installation

    Binaries are available in the form of Debian packages. They will take care of installing all the necessary dependencies. If this isn't an option, you can build the software from source.

    Debian packages

    Add this line to your sources.list:

    deb http://www.incal.net/ale/debian liber/

    Then make sure the GPG key used to sign the repository is installed, update the package sources, and install the liber package:

    $ wget -O- http://www.incal.net/ale/debian/repo.key \
        | sudo apt-key add -
    $ sudo apt-get update
    $ sudo apt-get install liber

    Build from source

    To compile liber from source, you will need a working Go environment (note that the Go version in Debian wheezy is too old, you should install a more recent version from the Go website).

    Building and installing the code is the simply a matter of running

    $ go get -d git.autistici.org/ale/liber
    $ go install git.autistici.org/ale/liber/...

    This will place the resulting liber executable in $GOPATH/bin.

    Usage

    liber will store its database in a local directory, ~/.liber by default. Use the --db-dir option if you'd like to change this.

    If you want to manage a local collection, the assumption is that you are storing all your ebooks in a single place (below a single directory, possibly organized into further subdirectories). You can control this with the (mandatory) option --book-dir.

    Indexing a local ebook collection

    To index a local ebook collection, run the following command:

    $ liber --book-dir=/path/to/ebooks --update

    The tool will attempt to identify books on Google Books. It is possible that more than one match is found, in which case liber will open a dialog box to ask you interactively to pick the right match.

    You can run liber --update as many times as you like (for example whenever you add an ebook to your collection), it will automatically detect new files and files that have been removed.

    Integration with Calibre

    If you use Calibre to mantain your ebook collection, you can index it with liber by simply pointing its --book-dir option at the Calibre library directory. liber will read Calibre metadata files and cover images, and it will not perform remote searches for book metadata.

    Searching

    You can search the index from the command line, for example:

    $ liber --search "Das Kapital"

    This will print a list of documents that match the query. For the full query syntax, see the Bleve documentation.

    Synchronizing with a remote server

    To upload the contents of the local database (including the file contents themselves) to a remote liber server, run the following command:

    $ liber --sync=http://remote.server.address/

    Running the HTTP interface

    The HTTP interface can be started with:

    $ liber --http-server=:3000 --book-dir=/path/to/ebooks

    This will start an HTTP server on port 3000, listening on all interfaces. The HTTP server needs some templates and static content which the Debian package installs in /usr/share/liber/htdocs.

    The HTTP server will store uploaded files into the directory specified by --book-dir. You should use the same value that you passed to liber --update.