2018-09-12 16:32:40 +00:00
.. |ss| raw :: html
<strike>
.. |se| raw :: html
</strike>
2018-09-12 16:41:58 +00:00
.. |nbsp| unicode :: 0xA0
:trim:
2018-08-27 14:51:38 +00:00
==================
Calibre-Web README
==================
2018-08-13 17:11:42 +00:00
2023-08-05 12:01:51 +00:00
This Ansible role installs
`Calibre-Web <https://github.com/janeczku/calibre-web#readme> `_ as a modern
client-server alternative to Calibre, for your
`Internet-in-a-Box (IIAB) <https://internet-in-a-box.org> `_ .
Calibre-Web provides a clean web interface for students to browse, read and
download e-books using a
`Calibre-compatible database <https://manual.calibre-ebook.com/db_api.html> `_ .
Teachers upload e-books, adjust e-book metadata, and create custom "bookshelf"
2023-08-06 17:02:59 +00:00
collections — to help students build the best local community library!
2023-08-05 12:01:51 +00:00
2024-01-01 04:57:58 +00:00
**NEW AS OF JANUARY 2024:** `IIAB's experimental new version of Calibre-Web <https://github.com/iiab/calibre-web/wiki> `_
2024-01-01 04:37:51 +00:00
**also lets you add YouTube and Vimeo videos (and local videos, e.g. from
2024-01-01 04:57:58 +00:00
teachers' phones) to expand your indigenous/local/family learning library!**
2023-12-22 20:25:44 +00:00
2023-08-05 12:01:51 +00:00
.. image :: https://www.yankodesign.com/images/design_news/2019/05/221758/luo_beetle_library_8.jpg
🍒 GURU TIPS 🍒
* Calibre-Web takes advantage of Calibre's own `/usr/bin/ebook-convert
<https://manual.calibre-ebook.com/generated/en/ebook-convert.html>`_ program
if that's installed — so consider also installing
`Calibre <https://calibre-ebook.com/whats-new> `_ during your IIAB
installation — *if you tolerate the weighty ~1 GB (of graphical OS libraries)
that Calibre mandates!*
* If you choose to also install Calibre (e.g. by running
`` sudo apt install calibre `` ) then you'll get useful e-book
importing/organizing tools like
`/usr/bin/calibredb <https://manual.calibre-ebook.com/generated/en/calibredb.html> `_ .
2023-08-06 14:59:38 +00:00
Install It
----------
2023-08-06 19:57:15 +00:00
Install Calibre-Web by setting these 2 variables in
`/etc/iiab/local_vars.yml <https://wiki.iiab.io/go/FAQ#What_is_local_vars.yml_and_how_do_I_customize_it%3F> `_ ::
2023-08-06 14:59:38 +00:00
calibreweb_install: True
calibreweb_enabled: True
2023-08-06 19:57:15 +00:00
Then install IIAB (`download.iiab.io <https://download.iiab.io> `_ ). Or if
IIAB's already installed, run::
2023-08-06 14:59:38 +00:00
cd /opt/iiab/iiab
sudo ./runrole calibre-web
2023-08-06 19:57:15 +00:00
NOTE: Calibre-Web's Ansible role (playbook) in
`/opt/iiab/iiab/roles <https://github.com/iiab/iiab/tree/master/roles> `_ is
`` calibre-web `` which contains a hyphen — *whereas its Ansible variables*
`` calibreweb_* `` *do NOT contain a hyphen!*
2018-08-13 17:11:42 +00:00
2018-08-28 10:07:51 +00:00
Using It
--------
2018-08-28 00:20:51 +00:00
2023-08-06 19:57:15 +00:00
Try Calibre-Web on your own IIAB by browsing to http://box/books (or
http://box.lan/books).
2018-08-28 10:07:51 +00:00
2023-08-06 15:38:19 +00:00
*Students* access it without a password (to read and download books).
2023-08-06 19:57:15 +00:00
*Teachers* add and arrange books using an administrative account, by clicking
**Guest** then logging in with::
2018-08-13 17:11:42 +00:00
2018-08-27 23:00:01 +00:00
Username: Admin
Password: changeme
2018-08-13 17:11:42 +00:00
2023-08-06 15:38:19 +00:00
🍒 GURU TIPS 🍒
2023-08-06 19:57:15 +00:00
* If Calibre-Web's configuration file (app.db) goes missing, the administrative
account will revert to::
2023-08-06 15:38:19 +00:00
Username: admin
Password: admin123
2018-08-15 13:35:10 +00:00
2023-08-06 19:57:15 +00:00
* If you lose your password, you can change it with the
`` -s [username]:[newpassword] `` command-line option:
https://github.com/janeczku/calibre-web/wiki/FAQ#what-do-i-do-if-i-lose-my-admin-password
2018-08-15 13:35:10 +00:00
2018-08-14 02:29:59 +00:00
Configuration
-------------
2023-08-04 22:51:35 +00:00
To configure Calibre-Web browse to http://box/books then click **Guest** to log
in as user **Admin** (default passwords above!)
2018-08-27 10:58:11 +00:00
2023-08-04 22:51:35 +00:00
Then click the leftmost **Admin** button to administer — considering all 3
**Configuration** buttons further below.
These critical settings are stored in::
2018-08-27 23:00:01 +00:00
/library/calibre-web/config/app.db
2023-08-04 22:51:35 +00:00
Whereas your e-book metadata is stored in a Calibre-style database::
2018-08-27 23:00:01 +00:00
/library/calibre-web/metadata.db
2024-06-14 13:14:23 +00:00
Videos' metadata is stored in database::
/library/calibre-web/xklb-metadata.db
2018-08-28 00:27:50 +00:00
See also::
2018-08-27 23:00:01 +00:00
/library/calibre-web/metadata_db_prefs_backup.json
2023-08-06 19:57:15 +00:00
Finally, take note of Calibre-Web's
`FAQ <https://github.com/janeczku/calibre-web/wiki/FAQ> `_ and official docs on
its
`Runtime Configuration Options <https://github.com/janeczku/calibre-web/wiki/Configuration> `_
and
`Command Line Interface <https://github.com/janeczku/calibre-web/wiki/Command-Line-Interface> `_ .
2019-02-27 00:59:40 +00:00
2023-08-06 17:02:59 +00:00
Backend
-------
2023-08-06 18:52:28 +00:00
You can manage the backend Calibre-Web server with systemd commands like::
2023-08-06 17:02:59 +00:00
systemctl status calibre-web
systemctl stop calibre-web
2023-08-06 18:52:28 +00:00
systemctl restart calibre-web
2023-08-06 17:02:59 +00:00
2023-08-06 19:57:15 +00:00
Run all commands
`as root <https://unix.stackexchange.com/questions/3063/how-do-i-run-a-command-as-the-system-administrator-root> `_ .
2023-08-06 17:18:36 +00:00
2023-08-06 17:02:59 +00:00
Errors and warnings can be seen if you run::
journalctl -u calibre-web
Log verbosity level can be
`adjusted <https://github.com/janeczku/calibre-web/wiki/Configuration#logfile-configuration> `_
within Calibre-Web's **Configuration > Basic Configuration > Logfile
2023-10-16 13:29:14 +00:00
Configuration**.
2023-08-06 17:02:59 +00:00
2023-11-02 15:34:33 +00:00
Finally, http://box/live/stats (Calibre-Web's **About** page) can be a very
2023-11-02 15:37:16 +00:00
useful list of ~42 `Calibre-Web dependencies <https://github.com/janeczku/calibre-web/wiki/Dependencies-in-Calibre-Web-Linux-and-Windows> `_
(mostly Python packages, and the version number of each that's installed).
2023-11-02 15:31:12 +00:00
2018-08-29 21:14:16 +00:00
Back Up Everything
------------------
2018-08-27 23:00:01 +00:00
2018-08-28 00:33:55 +00:00
Please back up the entire folder `` /library/calibre-web `` before upgrading —
2023-08-07 01:52:06 +00:00
as it contains your Calibre-Web content **and** configuration settings!
2018-08-15 13:35:10 +00:00
2018-08-14 02:29:59 +00:00
Upgrading
---------
2018-08-27 14:51:38 +00:00
2023-08-07 01:52:06 +00:00
"Reinstalling" Calibre-Web automatically installs the latest version — if your
2018-08-29 21:26:45 +00:00
Internet-in-a-Box (IIAB) is online.
2018-08-14 02:29:59 +00:00
2023-08-07 01:52:06 +00:00
But first: back up your content **and** configuration settings, as explained above.
2018-08-27 23:00:01 +00:00
2022-03-07 15:24:42 +00:00
**Also move your /library/calibre-web/config/app.db AND/OR
2022-03-07 15:26:22 +00:00
/library/calibre-web/metadata.db out of the way — if you're sure you want to
2022-03-07 15:24:42 +00:00
fully reset your Calibre-Web settings (to install defaults) AND/OR remove all
2023-08-06 17:18:36 +00:00
e-book metadata! Then run, as root**::
2018-08-27 23:00:01 +00:00
cd /opt/iiab/iiab
2022-03-07 15:34:36 +00:00
./runrole --reinstall calibre-web
2018-08-14 02:29:59 +00:00
2018-09-12 17:56:06 +00:00
Or, if you just want to upgrade Calibre-Web code alone, prior to proceeding
2018-08-28 00:27:50 +00:00
manually::
2018-08-14 02:29:59 +00:00
2022-02-16 04:55:25 +00:00
cd /usr/local/calibre-web-py3
2018-08-27 23:00:01 +00:00
git pull
2018-08-14 02:29:59 +00:00
2023-08-05 18:18:28 +00:00
This older way is *no longer recommended* ::
2022-03-07 13:52:00 +00:00
cd /opt/iiab/iiab
2022-03-08 03:20:26 +00:00
./iiab-install --reinstall # OR: ./iiab-configure
2022-03-07 13:52:00 +00:00
2018-08-14 02:29:59 +00:00
Known Issues
------------
2018-08-27 14:51:38 +00:00
2018-09-12 16:41:58 +00:00
* |ss| Trying to access an empty public bookshelf causes a system error. |se| |nbsp| Appears fixed as of 2018-09-12: `janeczku/calibre-web#620 <https://github.com/janeczku/calibre-web/issues/620> `_
2018-08-27 10:58:11 +00:00
2018-09-12 16:32:40 +00:00
* |ss| As of August 2018, it's sometimes impossible to set the language of an
2018-09-12 16:41:58 +00:00
e-book: `#1040 <https://github.com/iiab/iiab/issues/1040> `_ , `janeczku/calibre-web#593 <https://github.com/janeczku/calibre-web/issues/593> `_ |se| |nbsp| Appears fixed as of 2018-09-12: `janeczku/calibre-web#620 <https://github.com/janeczku/calibre-web/issues/620> `_
2018-08-29 16:55:11 +00:00
2018-09-12 17:56:06 +00:00
* |ss| As of August 2018, Calibre-Web doesn't yet include Calibre's e-book
2018-08-28 10:07:51 +00:00
conversion functionality (e.g. Calibre 3.27.1 [released 2018-07-06] allows
2018-09-12 22:30:42 +00:00
teachers to convert between PDF, EPUB, TXT etc — to permit reading on a
wider array client devices and client software). |se| |nbsp| Fixed by
`janeczku/calibre-web#609 <https://github.com/janeczku/calibre-web/issues/609> `_
in early September 2018.
2018-09-12 17:17:03 +00:00
2018-09-12 22:30:42 +00:00
* |ss| This new Calibre-Web feature (which depends on Calibre's ebook-converter
program) needs to be manually configured as of 2018-09-12:
`janeczku/calibre-web#624 <https://github.com/janeczku/calibre-web/issues/624> `_
|se| |nbsp| Fixed by `#1127 <https://github.com/iiab/iiab/pull/1127> `_ on 2018-09-12.
2018-09-12 22:48:57 +00:00
To manually enable the converting of e-books (automated above, should no
longer be necessary!) log in to http://box/books as Admin/changeme (etc) then
click Admin -> Basic Configuration -> External binaries. Then change these
2 settings:
2018-09-12 17:17:03 +00:00
* Change radio button "No converter" to "Use calibre's ebook converter"
* In textfield "Path to convertertool" type in: `` /usr/bin/ebook-convert ``
2018-09-12 22:48:57 +00:00
Then:
2018-09-12 17:17:03 +00:00
* Submit
2018-09-12 17:56:06 +00:00
* Verify that "ebook-convert" appears on Calibre-Web's "About" page at http://box/books/stats
* Test it by clicking any e-book -> Edit metadata -> Convert book format
2018-08-28 10:07:51 +00:00
2018-09-12 22:30:42 +00:00
* |ss| http://192.168.0.x:8083 does not work, as a result of `iptables <https://github.com/iiab/iiab/blob/master/roles/network/templates/gateway/iiab-gen-iptables#L93> `_ ,
2018-08-29 17:27:09 +00:00
even when `` services_externally_visible: true `` . This is fixable, but perhaps
2018-08-29 21:35:47 +00:00
it's not a priority, as URL's like {http://192.168.0.x/books,
2018-09-12 22:30:42 +00:00
http://10.8.0.x/books, http://127.0.0.1/books and http://box/books} all work. |se| |nbsp| Marked as "wontfix" on 2018-09-12: `#1050 <https://github.com/iiab/iiab/issues/1050> `_
2018-08-29 17:27:09 +00:00
2020-02-02 17:30:19 +00:00
* |ss| Calibre-Web does not currently use version numbers, so glitches may
2018-08-29 21:42:22 +00:00
occasionally arise, when upstream developers change its master branch without
2020-02-02 17:30:19 +00:00
warning. |se|
2018-08-29 17:27:09 +00:00
2020-02-02 17:30:19 +00:00
* |ss| Imagemagick policy prevents generating thumbnails for PDF's during upload: `#1530 <https://github.com/iiab/iiab/issues/1530> `_ `janeczku/calibre-web#827 <https://github.com/janeczku/calibre-web/issues/827> `_ |se|
2019-03-02 17:45:55 +00:00
2021-12-30 20:12:40 +00:00
* |ss| Upload of not supported file formats gives no feedback to the user: `janeczku/calibre-web#828 <https://github.com/janeczku/calibre-web/issues/828> `_ |se| |nbsp| Fixed by `361a124 <https://github.com/janeczku/calibre-web/commit/361a1243d732116e6f520fabbaae017068b86037> `_ on 2019-02-27.
2019-03-02 17:45:55 +00:00
2018-08-29 17:27:09 +00:00
* *Please assist us in reporting serious issues here:*
https://github.com/janeczku/calibre-web/issues