0.0
No release in over a year
Converts AsciiDoc documents to FB2 e-book formats
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 13.0
~> 3.12.0
~> 1.28.2
~> 0.6.0
~> 2.10.0

Runtime

>= 0.6, < 0.8
 Project Readme

Asciidoctor FB2

project chat Latest Release Build Status

Asciidoctor FB2 is an Asciidoctor extension for converting AsciiDoc documents directly to the FB2 e-book format.

Installation

Asciidoctor FB2 is published on RubyGems.org. You can install the published gem using the following command:

$ gem install asciidoctor-fb2

Assuming all the required gems install properly, verify you can run the asciidoctor-fb2 script:

$ asciidoctor-fb2 -v

If you see the version of Asciidoctor FB2 printed, you’re ready to use Asciidoctor FB2.

Usage

Converting an AsciiDoc document to FB2 is as simple as passing your document to the asciidoctor-fb2 command. This command should be available on your PATH if you installed the asciidoctor-fb2 gem. Otherwise, you can find the command in the bin folder of the project. We also recommend specifying an output directory using the -D option flag.

$ asciidoctor-fb2 -D output path/to/book.adoc

When the script completes, you’ll see the file book.fb2.zip appear in the output directory. Open that file with an FB2 reader to view the result.

The metadata in the generated FB2 file is populated from attributes in the AsciiDoc document. The names of the attributes and the metadata elements to which they map are documented in this section.

Table 1. AsciiDoc attributes that control the FB2 metadata
Name Description

uuid

Populates unique book identifier in FB2 metadata.

lang

Populates the content language in FB2 metadata.

keywords

Populates keywords list in FB2 metadata. The keywords should be represented as comma-separated values (CSV).

genres

Populates genres list in FB2 metadata. The genres should be represented as comma-separated values (CSV).

front-cover-image

Specifies path to front cover image.

Development

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