API reference for [Cabriolet::LIT::Decompressor](lib/cabriolet/lit/decompressor.rb) and [Cabriolet::LIT::Compressor](lib/cabriolet/lit/compressor.rb) classes for Microsoft Reader LIT files.
Cabriolet::LIT::Decompressor
Cabriolet::LIT::Compressor
LIT Format Guide
LIT Commands
new(source, options = {})
Parameters: * source (String, IO, Handle) - LIT file path or handle
source
Example:
decompressor = Cabriolet::LIT::Decompressor.new('ebook.lit')
header
Returns LIT header.
Returns: [Cabriolet::Models::LITHeader](lib/cabriolet/models/lit_header.rb)
Cabriolet::Models::LITHeader
metadata
Returns ebook metadata.
Returns: Hash - Title, author, etc.
Hash
extract_content(output_dir)
Extracts ebook content.
extract_to_epub(output_path)
Converts to EPUB format.
Parameters: * output_path (String) - Output EPUB path
output_path
new(options = {})
Options: * :title (String) - Book title * :author (String) - Author name * :drm (Boolean) - Enable DRM (default: false)
:title
:author
:drm
false
add_chapter(title, content)
Adds a chapter.
set_metadata(metadata_hash)
Sets ebook metadata.
compress(output_path)
Creates LIT file.
Microsoft Reader Documentation