Calibre

From Indie IT Wiki
Jump to: navigation, search

Calibre is a free and open source ebook library management application developed by users of e-books for users of e-books. It has a cornucopia of features divided into the following main categories:

  • Library Management
  • E-book conversion
  • Syncing to e-book reader devices
  • Downloading news from the web and converting it into e-book form
  • Comprehensive e-book viewer
  • Content server for online access to your book collection

Calibre Headless Server

Transmission > FileBot > Calibre > Kindle, Phone, Tablet

Create a directory for Calibre to add books from...

mkdir ~/Downloads/Calibre

Download a book to test...

cd ~/Downloads/Calibre
wget http://www.gutenberg.org/ebooks/1342.kindle.noimages -O pride.mobi

Add the downloaded book to your Calibre Library...

xvfb-run calibredb add ~/Downloads/pride.mobi --library-path ~/"Calibre Library"

Check to make sure it has added the book to the database...

xvfb-run calibredb list

Now, run the Calibre Server for the first time to test things work...

calibre-server --daemonize --port 8181 --with-library ~/"Calibre Library"

Access the Libary web page in your favourite web browser at...

http://ip.address.of.server:8181

Create a Cron job to add books every hour...

crontab -e
@hourly xvfb-run calibredb add /home/user/Downloads/Calibre/ -r --with-library "/home/user/Calibre Library" && rm -rf /home/user/Downloads/Calibre/*

Now create an Upstart script for Debian to launch Calibre when the server boots...

sudo nano /etc/init/calibre-server.conf

description "Calibre (ebook manager) content server"

start on runlevel [2345]
stop on runlevel [^2345]

respawn

env LIBRARY_PATH="/home/user/Calibre Library"
env MAX_COVER='300x400'
env PORT='8181'

script
    exec /usr/bin/calibre-server --with-library "$LIBRARY_PATH" --max-cover $MAX_COVER --auto-reload --port $PORT
end script

Stop and restart the server...

sudo stop calibre-server
sudo start calibre-server

If you use Transmission, you can add these lines to the end of your automated script when a torrent completes...

find ~/Downloads/transmission/ -type f -iname '*.epub' -exec cp -f '{}' ~/Downloads/Books/ \;
find ~/Downloads/transmission/ -type f -iname '*.epub' -exec cp -f '{}' ~/Downloads/Calibre/ \;
find ~/Downloads/transmission/ -type f -iname '*.mobi' -exec cp -f '{}' ~/Downloads/Books/ \;
find ~/Downloads/transmission/ -type f -iname '*.mobi' -exec cp -f '{}' ~/Downloads/Calibre/ \;

Enjoy  :-)

Thanks - https://www.digitalocean.com/community/tutorials/how-to-create-a-calibre-ebook-server-on-ubuntu-14-04

NOTES

http://www.mobileread.com/forums/showthread.php?p=3340493#post3340493

ID=$(calibredb list --separator=';' | sed '/^$/d' | tail -n1 | awk -F';' '{ print $1 }'); echo ${ID}
TITLE=$(calibredb list --separator=';' | sed '/^$/d' | tail -n1 | awk -F';' '{ print $2 }'); echo ${TITLE}
AUTHOR=$(calibredb list --separator=';' | sed '/^$/d' | tail -n1 | awk -F';' '{ print $3 }'); echo ${AUTHOR}

Android Apps

Moon+ Reader

Start App > Net Library > Menu 3 Dots > Add New Catalog > Local Calibre > IP Address + Port > OK

It doesn't get any easier.

Adding Books Using Kindle Web Browser

About

Your Kindle includes an experimental web browser that enables you to surf the web and view most Amazon web pages. Web Browser supports JavaScript, SSL, and cookies, but does not support media plug-ins. You must have a Wi-Fi connection to access most websites.

To launch Web Browser, tap the Menu button, then select Experimental Browser. The first time you access this page, you will find a list of default bookmarks for commonly used sites. You can access these bookmarks later, by selecting Bookmarks from the Web Browser menu.

To enter a URL, tap the search field at the top of the screen. Use the onscreen keyboard to enter the web address. A .com key is added to the keyboard when you are entering URLs. The address field will retain the last URL you entered.

Bookmarks

To bookmark a web page, tap the Menu button and select Bookmark this Page. To delete a bookmark, tap the Menu button and select Bookmarks. Tap the Remove button at the bottom of the page, tap to select the checkbox next to the URL(s) you want to remove, then tap the Remove button.

Downloading Files

Some websites may have books or documents that you want to download and read on your Kindle. You will be asked to confirm if you want to download these items to your Kindle Home screen. Supported file types for download include Kindle content (.AZW, .AZW1, .AZW2, and .AZW3), unprotected Mobipocket books (.MOBI, .PRC), and text files (.TXT).

Just point the web browser on your device to the computer running the Content Server and you will be able to browse your book collection. For example, if the computer running the server has IP address 192.168.1.252 on port 8181, in the browser, you would type:

http://192.168.1.252:8181

You can then browse the Calibre Library on the Content Server, download the .MOBI file and then open it to read.

Latest Changes

http://calibre-ebook.com/whats-new

Manual

https://manual.calibre-ebook.com

Installing (and Updating)

 sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"

Command Line Interface

https://manual.calibre-ebook.com/generated/en/cli-index.html

Converting From EPUB To Kindle MOBI

ebook-convert book_name.epub book_name.mobi

https://manual.calibre-ebook.com/generated/en/ebook-convert.html

Fixing Broken Ebooks

epub-fix --epubcheck --unmanifested file.epub

How to make e-books show up under "Books" on the Kindle Fire

http://howto.cnet.com/8301-11310_39-57349056-285/how-to-make-e-books-show-up-under-books-on-the-kindle-fire/

Wireless Sync Books

Calibre Companion Android is an app that can be used to transfer books wirelessly to your Android device. The app is maintained by a core calibre developer and allows Calibre to connect to your Android device wirelessly, just browse files on the device in Calibre and use the Send to device button to transfer files to your device wirelessly.

Calibre also has a builtin web server, the Content Server. You can browse your calibre collection on your Android device is by using the calibre content server, which makes your collection available over the net. First perform the following steps in calibre:-

  1. Set the Preferred Output Format in calibre to EPUB for normal Android devices or MOBI for Kindles (The output format can be set under Preferences->Interface->Behavior)
  2. Convert the books you want to read on your device to EPUB/MOBI format by selecting them and clicking the Convert button.
  3. Turn on the Content Server in calibre’s preferences and leave calibre running.

Now on your Android device, open the browser and browse to http://192.168.1.2:8080/

Replace 192.168.1.2 with the local IP address of the computer running calibre. If your local network supports the use of computer names, you can replace the IP address with the network name of the computer. If you have changed the port the calibre content server is running on, you will have to change 8080 as well to the new port.

The local IP address is the IP address you computer is assigned on your home network. A quick Google search will tell you how to find out your local IP address. You can now browse your book collection and download books from calibre to your device to open with whatever ebook reading software you have on your android device.

Some reading programs support browsing the calibre library directly. For example, in Aldiko, click My Catalogs, then + to add a catalog, then give the catalog a title such as “calibre” and provide the URL listed above. You can now browse the calibre library and download directly into the reading software.

The above was shamelessly ripped from the Calibre FAQ Page.

Headless Server Install

http://www.mobileread.com/forums/showthread.php?t=225535

http://linuxphilia.blogspot.co.uk/2012/06/my-wife-and-i-like-to-read-books-on-go.html

http://www.linux-magazine.com/Online/Blogs/Productivity-Sauce/Turn-Raspberry-Pi-into-an-Ebook-Server-with-Calibre

http://www.mobileread.com/forums/showthread.php?t=159421