Latest Release Build Status

fb2rb is a Fiction Book 2 parser/generator library written in Ruby.

Installation

Add this line to your application’s Gemfile:

gem 'fb2rb'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install fb2rb

Usage

require 'fb2rb'

book = FB2rb::Book.new
book.description.title_info.book_title = 'Book title'

body = FB2rb::Body.new(nil, '<p>Book text</p>')
book.bodies << body

book.write('/path/to/book.fb2.zip')

Development

After checking out the repo, run bundle install to install dependencies. Then, run bundle exec rake spec to run the tests.