- Add optional extra_word_break_chars field (sorted UChar32[]) to icu_BreakIterator struct, stored as a sorted array for efficient lookup - icu_BreakIterator_new accepts optional 3rd argument (Python str) that is parsed into a sorted UChar32[] via insertion sort; only applies to UBRK_WORD - icu_BreakIterator_dealloc frees the extra chars array - New find_extra_word_break() inline helper scans a UTF-16 segment for the first matching extra-break codepoint using U16_NEXT + linear search - BreakIterState gains extra_break_active/seg_start/seg_end sub-segmentation state fields (zero-initialized by memset in break_iter_state_init) - break_iter_state_next refactored from while loop to for(;;) to drain sub-segments before fetching more ICU data; extra break within an ICU word segment causes the piece before it to flow through normal hyphen-joining logic while the tail is deferred; trailing-hyphen detection on sub-segments enables hyphen-joining with subsequent ICU segments - Fast path: num_extra_word_break_chars == 0 → single comparison, zero overhead - Tests added covering: letter extra break char, count_words/split2, adjacent breaks, multiple chars, None arg, surrogate-pair extra break char Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com> Agent-Logs-Url: https://github.com/kovidgoyal/calibre/sessions/c003ae42-1e56-4dbb-9ef2-9f1645b76c70
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.
Screenshots
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.