boundbook - A Rust port of libbbf with some extras
Follows the Bound Book Format specification (v3)
Features I've added so far:
- A CBZ-to-BBF converter
- An in-terminal book reader
To install the boundbook CLI, run:
cargo install boundbook -F cliWithout the cli feature flag, the boundbook binary will do nothing.
This document contains the help content for the boundbook command-line program.
Command Overview:
boundbook↴boundbook docs↴boundbook create↴boundbook info↴boundbook verify↴boundbook extract↴boundbook from-cbz↴boundbook read↴boundbook complete↴
BBF CLI
Usage: boundbook <COMMAND>
docs— Print helpcreate— Create a BBF file from imagesinfo— Display BBF file informationverify— Verify BBF file integrityextract— Extract pages from a BBF filefrom-cbz— Convert CBZ archive to BBF formatread— Read a BBF file in the terminalcomplete— Generate CLI completions
Print help
Usage: boundbook docs
Create a BBF file from images
Usage: boundbook create [OPTIONS] --output <OUTPUT> <INPUTS>...
<INPUTS>— Input files or directories containing images
-
-o,--output <OUTPUT>— Output BBF file path -
-O,--order <ORDER>— Page order file (format: filename:index) -
-S,--sections <SECTIONS>— Sections file (format: Name:Target[:Parent]) -
-s,--section <ADD_SECTIONS>— Add section markers (format: Name:Target[:Parent]) -
-m,--meta <METADATA>— Add metadata (format: Key:Value[:Parent]) -
-a,--alignment <ALIGNMENT>— Byte alignment exponent (default: 12 = 4096 bytes)Default value:
12 -
-r,--ream-size <REAM_SIZE>— Ream size exponent (default: 16 = 65536 bytes)Default value:
16 -
-v,--variable-ream-size— Enable variable ream size for smaller files -
-d,--auto-detect-sections— Auto-detect subdirectories with images and create sections from directory names
Display BBF file information
Usage: boundbook info <INPUT>
<INPUT>
Verify BBF file integrity
Usage: boundbook verify [OPTIONS] <INPUT>
<INPUT>— BBF file to verify
--index-only— Verify only the index hash (faster)--asset <ASSET>— Verify a specific asset by index
Extract pages from a BBF file
Usage: boundbook extract [OPTIONS] <INPUT>
<INPUT>— BBF file to extract from
-
-o,--output <OUTPUT>— Output directory for extracted pagesDefault value:
./extracted -
--section <SECTION>— Extract only pages from a specific section -
--until <UNTIL>— Stop extraction when reaching a section matching this string -
--range <RANGE>— Extract a specific page range (e.g., 1-10 or 5)
Convert CBZ archive to BBF format
Usage: boundbook from-cbz [OPTIONS] --output <OUTPUT> <INPUT>
<INPUT>— Input CBZ file or directory containing CBZ files
-o,--output <OUTPUT>— Output BBF file-m,--meta <METADATA>— Add metadata (format: Key:Value[:Parent])-k,--keep-temp— Keep temporary files for debugging-d,--directory-mode— Process directory of CBZ files as chapters
Read a BBF file in the terminal
Usage: boundbook read [OPTIONS] <INPUT>
<INPUT>— BBF file to read
-
-P,--prerender— Pre-render all pages before reading (uses more memory but smoother navigation) -
-W,--max-width <PIXELS>— Maximum width in pixels (aspect ratio preserved) -
-H,--max-height <PIXELS>— Maximum height in pixels (aspect ratio preserved) -
--max-cols <COLS>— Maximum width in terminal columns (overrides max-width if set) -
--max-rows <ROWS>— Maximum height in terminal rows (overrides max-height if set) -
-f,--filter <FILTER>— Image scaling filter qualityDefault value:
lanczos3Possible values:
nearest,triangle,catmull-rom,gaussian,lanczos3 -
-g,--enable-gif-animation— Enable GIF animation playbackDefault value:
true -
--gif-speed <MULTIPLIER>— GIF animation frame delay multiplier (1.0 = normal speed)Default value:
1.0 -
-l,--gif-loop— Loop GIFs infinitelyDefault value:
true -
-i,--gif-interpolate <COUNT>— Number of interpolated frames to generate between each GIF frame (0 = disabled)Default value:
0 -
-m,--interpolation-method <INTERPOLATION_METHOD>— Frame interpolation algorithmDefault value:
blendPossible values:
blend: Simple linear blending (fastest)smooth: Weighted blending with ease-in/ease-outcosine: Cosine interpolation for smoother transitionscubic: Cubic hermite spline interpolationperlin: Perlin smoothstep (quintic hermite)exponential: Exponential ease-in-outoptical-flow-sparse: Optical flow based (Lucas-Kanade sparse)motion-compensated: Motion-compensated blending (simplified Horn-Schunck)catmull-rom: Catmull-Rom spline (requires 4 frames, falls back to cubic)
-
--sidebar-width <SIDEBAR_WIDTH>— Sidebar width in columnsDefault value:
30 -
--slideshow-delay <SECONDS>— Slideshow auto-advance delay in secondsDefault value:
5.0
Generate CLI completions
Usage: boundbook complete <SHELL>
-
<SHELL>Possible values:
bash,elvish,fish,power-shell,zsh,nushell,clink,fig
This document was generated automatically by
clap-markdown.