Charles Haley ed83d9eeb8 Several related changes:
* Add a "with" statement to the template language that for the duration of the code block changes the "current book" to the one specified by the book id.
* A new formatter function selected_books() that returns the book ids of the currently selected books
* A new formatter function selected_column() that returns the lookup name of the column containing the selected cell.
* A new formatter function sort_book_ids() that sorts the books specified by book_ids.
* A new formatter function show_dialog() that opens a dialog to display plain text or html.
* Add check boxes to the template tester to control "run as you type" and to restrict test runs to the first selected book.

Here is an example using several of the new features:

program:
 ids = sort_book_ids(selected_books(), 'series', 1, 'title', 1);
 res = '<style> th, td {padding: 2px;}</style> <h2>Book Size Report</h2><p><table>';
 total = 0;

 def table_row(title, series, size):
  return strcat('<tr><td>', title, '</td>',
       '<td>', series, '</td>',
       '<td>', if size !=# 0 then human_readable(size) else '0' fi, '</td>',
       '</tr>', character('newline'))
 fed;

 for id in ids:
  with id:
   s = booksize();
   total = total + s;
   res = strcat(res, table_row($title, $series, s))
  htiw
 rof;
 res = strcat(res, table_row('TOTAL', '', total));
 res = strcat(res, '</table>');
 show_dialog(res)
2025-09-14 14:26:35 +01:00
...
2025-03-11 15:19:51 +05:30
2025-09-07 18:47:13 +05:30
2025-09-13 14:31:07 +05:30
2025-09-07 18:47:13 +05:30
...
2025-08-21 10:39:25 +05:30
2025-09-14 14:26:35 +01:00
2024-11-24 22:01:57 +05:30
2025-03-21 08:09:41 +05:30
2025-09-05 04:21:53 +05:30
2025-03-25 09:30:01 +01:00
2025-01-02 11:27:45 +02:00
2021-01-24 19:53:30 +09:00
2021-01-24 19:53:30 +09:00
2025-07-16 08:55:16 +02:00
2025-01-24 11:14:21 +01:00
2025-05-09 19:10:59 +05:30

calibre

calibre is an e-book manager. It can view, convert, edit and catalog e-books in all of the major e-book formats. It can also talk to e-book reader devices. It can go out to the internet and fetch metadata for your books. It can download newspapers and convert them into e-books for convenient reading. It is cross platform, running on Linux, Windows and macOS.

For more information, see the calibre About page.

Build Status

Screenshots

Screenshots page

Usage

See the User Manual.

Development

Setting up a development environment for calibre.

A tarball of the source code for the current calibre release.

Bugs

Bug reports and feature requests should be made in the calibre bug tracker at Launchpad. GitHub is only used for code hosting and pull requests.

Support calibre

calibre is a result of the efforts of many volunteers from all over the world. If you find it useful, please consider contributing to support its development. Donate to support calibre development.

Building calibre binaries

See Build instructions for instructions on how to build the calibre binaries and installers for all the platforms calibre supports.

calibre package versions in various repositories

Packaging Status

Description
The official source code repository for the calibre ebook manager
Readme GPL-3.0 335 MiB
Languages
Python 92.6%
C 3.3%
C++ 3.1%
HTML 0.4%
Shell 0.2%
Other 0.1%