Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 08:27 AM   #1
microtic
Junior Member
microtic began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jan 2016
Device: Kindle DXG 3.4.2
[File Type Plugin] FB2 Poetry Reflow

FB2 Poetry Reflow makes ordinary FB2 poetry easier to read on small screens.

When calibre converts an FB2 book, poems normally get a wide left margin. This plugin removes that extra margin and gives wrapped verses a hanging indent, making it easier to distinguish the continuation of a verse from the beginning of the next one.

It runs automatically when converting from FB2 to formats such as EPUB or AZW3. The original FB2 file is not modified.

Example

Before:
Code:
        The evening wind carries
        the sound of the sea
        A small light waits at
        the end of the quay
After:
Code:
The evening wind carries the sound
   of the sea
A small light waits at the end of
   the quay
These are invented example lines. Actual wrapping depends on your screen, font size, and reader settings.

What it preserves
  • Separate verses and gaps between stanzas.
  • Poem titles, inline emphasis, and internal links.
  • Normal prose formatting.

Limitations

The source FB2 must identify the text as poetry. The plugin does not guess which ordinary paragraphs are poems, and it does not process existing EPUB or AZW3 files as input.

Poems with detectable explicit styling, alignment, or deliberate spacing are skipped and left to calibre’s normal conversion. This is a conservative heuristic, so please preview books containing visual or unusually arranged poetry.

For zipped FB2 files, extract the .fb2 before converting.

Compatibility

Tested with calibre 9.13 on Linux, producing EPUB and AZW3. The result has also been checked on a physical e-reader.

The plugin allows installation on calibre 5.0 and newer, but versions 5–8 are unverified. Windows and macOS are supported platforms; full conversion testing so far has been on Linux.

Installation
  1. Download the plugin ZIP attached to this post. Do not unzip it.
  2. Open calibre → Preferences → Plugins → Load plugin from file.
  3. Select the ZIP and accept calibre’s third-party plugin warning.
  4. Restart calibre if prompted.

Usage

Convert a book normally, making sure the input format is FB2. There is no additional button or configuration step.

To disable it, go to Preferences → Plugins → File type plugins → FB2 Poetry Reflow. Reconvert from the original FB2 to obtain calibre’s default output.

Source and license

Source code and README
GitHub releases

License: MIT.

Version History
Spoiler:

2.0.1
• Reflows ordinary FB2 poetry with hanging indentation.
• Preserves poem titles and links when anchors overlap.
• Skips detectable visual layouts.
• Includes regression tests and automated release builds.


Feedback is welcome. When reporting a problem, please include your calibre version, output format, and reader model or application. A small example that you have permission to share is especially helpful.
Attached Files
File Type: zip FB2_Poetry_Reflow-2.0.1.zip (12.3 KB, 0 views)
microtic is offline   Reply With Quote
Old Today, 01:47 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 84,783
Karma: 153788055
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Is there any advantage to using FB2?
JSWolf is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New file type plugin - Issue with metadata mfsav2 Development 5 10-22-2025 08:22 AM
[File Type Plugin] Auto Multi-Convert Squiffers Plugins 1 06-26-2025 10:46 PM
[File Type Plugin] Extract RIS Citations DaltonST Plugins 26 03-10-2023 04:20 PM
[File Type Plugin] Zip to cbz Saumee Plugins 2 07-29-2018 03:38 PM
PDB to PMLZ File type plugin pdurrant Plugins 18 02-20-2010 02:19 PM


All times are GMT -4. The time now is 03:04 PM.


MobileRead.com is a privately owned, operated and funded community.