Convert FB2 to MediaWiki
Max file size 100mb.
FB2 vs MediaWiki Format Comparison
| Aspect | FB2 (Source Format) | MediaWiki (Target Format) |
|---|---|---|
| Format Overview |
FB2
FictionBook 2.0
XML-based e-book format developed in Russia, widely used for distributing fiction and non-fiction literature. Stores document structure, metadata, and content in a single XML file. Supports embedded images as Base64 data. Popular in Eastern European and Russian-language digital libraries. E-Book Format XML-Based |
MediaWiki
MediaWiki Markup Language
Lightweight markup language used by MediaWiki-powered wikis, including Wikipedia. Uses simple text-based syntax for formatting, linking, and structuring content. Designed for collaborative editing and web publishing. The most widely used wiki markup format in the world. Wiki Format Web Publishing |
| Technical Specifications |
Structure: XML document with strict schema
Encoding: UTF-8 (Unicode) Format: Single XML file with embedded data Compression: None (often distributed as .fb2.zip) Extensions: .fb2 |
Structure: Plain text with wiki markup syntax
Encoding: UTF-8 (Unicode) Format: Text-based markup language Compression: None Extensions: .mediawiki, .wiki, .txt |
| Syntax Examples |
FB2 uses XML tags for structure: <FictionBook>
<body>
<section>
<title><p>Chapter 1</p></title>
<p>First paragraph.</p>
<p><emphasis>Italic</emphasis></p>
<p><strong>Bold</strong></p>
</section>
</body>
</FictionBook>
|
MediaWiki uses simple text markup: == Chapter 1 == First paragraph. ''Italic text'' '''Bold text''' * Bullet list item # Numbered list item [[Internal Link]] |
| Content Support |
|
|
| Advantages |
|
|
| Disadvantages |
|
|
| Common Uses |
|
|
| Best For |
|
|
| Version History |
Introduced: 2004 (Dmitry Gribov)
Current Version: FictionBook 2.1 Status: Stable, community-maintained Evolution: FB3 proposed but not widely adopted |
Introduced: 2002 (MediaWiki software)
Current Version: Continuously updated Status: Active, widely used Evolution: Regular updates with MediaWiki releases |
| Software Support |
FBReader: Full native support
Calibre: Full read/write support Cool Reader: Full native support Other: KOReader, Moon+ Reader, many e-readers |
MediaWiki: Native rendering engine
Wikipedia: Primary content format Pandoc: Full conversion support Other: DokuWiki, Confluence (import), various wiki engines |
Why Convert FB2 to MediaWiki?
Converting FB2 (FictionBook 2.0) files to MediaWiki markup is valuable when you need to publish e-book content on wiki-based platforms such as Wikipedia, internal corporate wikis, or community knowledge bases. FB2 is an excellent format for structured literary content, but its XML-based structure is not directly compatible with wiki engines. MediaWiki markup provides a straightforward way to present that same content in a collaborative, web-accessible format.
FB2 files contain rich structural information including chapters, sections, footnotes, epigraphs, and detailed metadata about the author and publication. When converting to MediaWiki format, this structure translates naturally into wiki headings, sections, and reference tags. The hierarchical nature of FB2 sections maps well to MediaWiki's heading levels, making the converted content well-organized and easy to navigate.
MediaWiki markup is the backbone of Wikipedia and is used by thousands of organizations for their internal documentation and knowledge management. By converting FB2 content to MediaWiki format, you can import literary works, reference materials, or documentation into any MediaWiki-powered site. The resulting markup can be directly pasted into a wiki page editor or imported using MediaWiki's built-in tools.
This conversion is particularly useful for digital librarians, educators, and content curators who want to make e-book content accessible through wiki platforms. It also benefits researchers who need to incorporate passages from FB2 books into wiki-based research notes or collaborative projects. The conversion preserves text formatting, chapter structure, and footnotes while adapting them to MediaWiki conventions.
Key Benefits of Converting FB2 to MediaWiki:
- Wiki Publishing: Publish e-book content directly on any MediaWiki-powered site
- Collaborative Editing: Enable multiple contributors to edit and improve the content
- Structure Preservation: Chapters, sections, and footnotes map to wiki headings and references
- Web Accessibility: Make offline e-book content available as searchable web pages
- Metadata Utilization: FB2 author and book metadata can be converted to wiki infoboxes
- Cross-Platform: MediaWiki content is accessible from any web browser
- Version Control: Wiki engines provide built-in revision history and change tracking
Practical Examples
Example 1: Novel Chapter Conversion
Input FB2 file (novel.fb2):
<body>
<section>
<title><p>Chapter 1: The Beginning</p></title>
<p>It was a dark and stormy night.</p>
<p>The <emphasis>old house</emphasis> stood at the
edge of the <strong>forest</strong>.</p>
</section>
</body>
Output MediaWiki file (novel.mediawiki):
== Chapter 1: The Beginning == It was a dark and stormy night. The ''old house'' stood at the edge of the '''forest'''.
Example 2: Book with Footnotes and Metadata
Input FB2 file (research.fb2):
<description>
<title-info>
<author><first-name>John</first-name>
<last-name>Smith</last-name></author>
<book-title>History of Science</book-title>
<annotation><p>A comprehensive guide.</p></annotation>
</title-info>
</description>
<body>
<section>
<title><p>Introduction</p></title>
<p>Science began with observation.<a
type="note" href="#n1">[1]</a></p>
</section>
</body>
Output MediaWiki file (research.mediawiki):
= History of Science = '''Author:''' John Smith ''A comprehensive guide.'' == Introduction == Science began with observation.<ref>See footnote 1</ref> == References == <references /> [[Category:Science]] [[Category:History]]
Example 3: Structured Content with Lists and Epigraph
Input FB2 file (guide.fb2):
<section>
<title><p>Travel Guide</p></title>
<epigraph>
<p>Not all who wander are lost.</p>
<text-author>J.R.R. Tolkien</text-author>
</epigraph>
<p>Places to visit:</p>
<p>1. Paris - City of Light</p>
<p>2. Rome - The Eternal City</p>
<p>3. Tokyo - East meets West</p>
</section>
Output MediaWiki file (guide.mediawiki):
== Travel Guide ==
{{Quote|Not all who wander are lost.|J.R.R. Tolkien}}
Places to visit:
# Paris - City of Light
# Rome - The Eternal City
# Tokyo - East meets West
Frequently Asked Questions (FAQ)
Q: What is FB2 format?
A: FB2 (FictionBook 2.0) is an XML-based e-book format originally developed in Russia. It stores the entire book structure, text content, metadata (author, title, genre), and even images within a single XML file. FB2 is especially popular for distributing fiction and literature through online libraries and is supported by most e-reader applications including FBReader, Calibre, and Cool Reader.
Q: What is MediaWiki markup?
A: MediaWiki markup is the text-based formatting language used by MediaWiki software, which powers Wikipedia and thousands of other wikis worldwide. It uses simple conventions like double apostrophes for italic (''text''), triple apostrophes for bold ('''text'''), and equals signs for headings (== Heading ==). MediaWiki markup is designed to be easy to learn and enables collaborative editing of web content.
Q: Will chapter structure be preserved during conversion?
A: Yes! FB2's hierarchical section structure maps naturally to MediaWiki headings. Top-level sections become level-2 headings (== Heading ==), subsections become level-3 headings (=== Subheading ===), and so on. This preserves the book's organizational structure and allows MediaWiki to auto-generate a table of contents from the headings.
Q: What happens to images embedded in FB2 files?
A: FB2 files store images as Base64-encoded binary data within the XML. During conversion, image references are converted to MediaWiki image syntax ([[File:image.png]]). The actual image files may need to be uploaded separately to your wiki's file repository, as MediaWiki references images by filename rather than embedding them directly in the markup.
Q: Can I import the converted file directly into Wikipedia?
A: The converted MediaWiki markup can be pasted into any MediaWiki-based site's editor. However, Wikipedia has strict content policies including notability requirements, neutral point of view, and copyright compliance. You should ensure the content meets Wikipedia's guidelines before publishing. The markup format itself will be fully compatible with Wikipedia's editor.
Q: How are footnotes handled in the conversion?
A: FB2 footnotes and endnotes are converted to MediaWiki's reference system using <ref> tags. The converter places footnote content within <ref>...</ref> tags at the point of reference and adds a <references /> tag at the end of the document to display all collected footnotes, following standard MediaWiki referencing conventions.
Q: What about FB2 metadata like author name and book title?
A: FB2 metadata is converted into structured MediaWiki content. The book title becomes the top-level heading, author information is placed prominently at the beginning of the page, and additional metadata like genre, date, and annotation can be formatted as an infobox or descriptive text at the top of the wiki page.
Q: Can I convert FB2 files with Cyrillic text?
A: Absolutely! Both FB2 and MediaWiki fully support Unicode, including Cyrillic, Chinese, Arabic, and all other scripts. Since FB2 files use UTF-8 encoding and MediaWiki also uses UTF-8, all characters and special symbols are preserved accurately during conversion without any encoding issues.