All Projects → orthros → Dart Epub

orthros / Dart Epub

Licence: mit
Epub Reader and Writer for Dart

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Dart Epub

Work crawler
Download comics novels 小说漫画下载工具 小説漫画のダウンローダ 小說漫畫下載:腾讯漫画 大角虫漫画 有妖气 知音漫客 咪咕 SF漫画 哦漫画 看漫画 漫画柜 汗汗酷漫 動漫伊甸園 快看漫画 微博动漫 733动漫网 大古漫画网 漫画DB 無限動漫 動漫狂 卡推漫画 动漫之家 动漫屋 古风漫画网 36漫画网 亲亲漫画网 乙女漫画 comico webtoons 咚漫 ニコニコ静画 ComicWalker ヤングエースUP モアイ pixivコミック サイコミ;アルファポリス カクヨム ハーメルン 小説家になろう 起点中文网 八一中文网 顶点小说 落霞小说网 努努书坊 笔趣阁→epub.
Stars: ✭ 1,224 (+738.36%)
Mutual labels:  epub
R2 Testapp Swift
📖 An EPUB & CBZ reading app for iOS
Stars: ✭ 110 (-24.66%)
Mutual labels:  epub
The Economist Ebooks
经济学人(含音频)、纽约客、自然、新科学人、卫报、科学美国人、连线、大西洋月刊、新闻周刊、国家地理等英语杂志免费下载、订阅(kindle推送),支持epub、mobi、pdf格式, 每周更新. The Economist 、The New Yorker 、Nature、The Atlantic 、New Scientist、The Guardian、Scientific American、Wired、Newsweek magazines, free download and subscription for kindle, mobi、epub、pdf format.
Stars: ✭ 3,471 (+2277.4%)
Mutual labels:  epub
Kotlin Reference Chinese
Kotlin 官方文档(参考部分)中文版
Stars: ✭ 85 (-41.78%)
Mutual labels:  epub
Amusewiki
Text::Amuse-based publishing platform
Stars: ✭ 95 (-34.93%)
Mutual labels:  epub
Kreader
Android阅读器
Stars: ✭ 117 (-19.86%)
Mutual labels:  epub
You Dont Know Js Epub
"You Don't Know JS Yet" (2nd Edition) ePub generator.
Stars: ✭ 76 (-47.95%)
Mutual labels:  epub
Shirah Reader
RSVP speed reader, written in python.
Stars: ✭ 133 (-8.9%)
Mutual labels:  epub
Calibre
The official source code repository for the calibre ebook manager
Stars: ✭ 11,221 (+7585.62%)
Mutual labels:  epub
Markdownslides
MarkdownSlides is a Reveal.js and PDF slides generator from MARKDOWN files, that also generate HTML, EPUB and DOCX documents. The idea is that from a same MARKDOWN file we can get slides and books without worrying about style, just worrying about content.
Stars: ✭ 121 (-17.12%)
Mutual labels:  epub
Fb2mobi
[DEPRECATED] fb2mobi - derived from fb2conv 1.5.4
Stars: ✭ 89 (-39.04%)
Mutual labels:  epub
Go Epub
Go library for creating EPUB files
Stars: ✭ 95 (-34.93%)
Mutual labels:  epub
Architecture
📚 Documents the architecture of the Readium project
Stars: ✭ 118 (-19.18%)
Mutual labels:  epub
Koreader Base
Base framework offering a Lua scriptable environment for creating document readers
Stars: ✭ 81 (-44.52%)
Mutual labels:  epub
Novel Grabber
Novel-Grabber can download novels from pretty much any webnovel and lightnovel site.
Stars: ✭ 125 (-14.38%)
Mutual labels:  epub
Lector
Qt based ebook reader
Stars: ✭ 1,218 (+734.25%)
Mutual labels:  epub
Kobo Book Downloader
A tool to download your purchased Kobo books and remove the DRM from them.
Stars: ✭ 117 (-19.86%)
Mutual labels:  epub
Epub Boilerplate
A simple template to help you create ePub-formatted books.
Stars: ✭ 138 (-5.48%)
Mutual labels:  epub
Books
IT技术书籍文字版mobi epub格式
Stars: ✭ 131 (-10.27%)
Mutual labels:  epub
Worm Scraper
Scrapes the web serial Worm and its sequel Ward into an eBook format
Stars: ✭ 118 (-19.18%)
Mutual labels:  epub

dart-epub

Build Status

Epub Reader and Writer for Dart inspired by this fantastic C# Epub Reader

This does not rely on the dart:io package in any way, so it is avilable for both desktop and web-based implementations

Installing

Add the package to the dependencies section of your pubspec.yaml

dependencies:
  epub: ^2.0.0

Example

//Get the epub into memory somehow
String fileName = "hittelOnGoldMines.epub";
String fullPath = path.join(io.Directory.current.path, fileName);
var targetFile = new io.File(fullPath);
List<int> bytes = await targetFile.readAsBytes();


// Opens a book and reads all of its content into memory
EpubBook epubBook = await EpubReader.readBook(bytes);
            
// COMMON PROPERTIES

// Book's title
String title = epubBook.Title;

// Book's authors (comma separated list)
String author = epubBook.Author;

// Book's authors (list of authors names)
List<String> authors = epubBook.AuthorList;

// Book's cover image (null if there is no cover)
Image coverImage = epubBook.CoverImage;

            
// CHAPTERS

// Enumerating chapters
epubBook.Chapters.forEach((EpubChapter chapter) {
  // Title of chapter
  String chapterTitle = chapter.Title;
              
  // HTML content of current chapter
  String chapterHtmlContent = chapter.HtmlContent;

  // Nested chapters
  List<EpubChapter> subChapters = chapter.SubChapters;
});

            
// CONTENT

// Book's content (HTML files, stlylesheets, images, fonts, etc.)
EpubContent bookContent = epubBook.Content;

            
// IMAGES

// All images in the book (file name is the key)
Map<String, EpubByteContentFile> images = bookContent.Images;

EpubByteContentFile firstImage = images.values.first;

// Content type (e.g. EpubContentType.IMAGE_JPEG, EpubContentType.IMAGE_PNG)
EpubContentType contentType = firstImage.ContentType;

// MIME type (e.g. "image/jpeg", "image/png")
String mimeContentType = firstImage.ContentMimeType;

// HTML & CSS

// All XHTML files in the book (file name is the key)
Map<String, EpubTextContentFile> htmlFiles = bookContent.Html;

// All CSS files in the book (file name is the key)
Map<String, EpubTextContentFile> cssFiles = bookContent.Css;

// Entire HTML content of the book
htmlFiles.values.forEach((EpubTextContentFile htmlFile) {
  String htmlContent = htmlFile.Content;
});

// All CSS content in the book
cssFiles.values.forEach((EpubTextContentFile cssFile){
  String cssContent = cssFile.Content;
});


// OTHER CONTENT

// All fonts in the book (file name is the key)
Map<String, EpubByteContentFile> fonts = bookContent.Fonts;

// All files in the book (including HTML, CSS, images, fonts, and other types of files)
Map<String, EpubContentFile> allFiles = bookContent.AllFiles;


// ACCESSING RAW SCHEMA INFORMATION

// EPUB OPF data
EpubPackage package = epubBook.Schema.Package;

// Enumerating book's contributors
package.Metadata.Contributors.forEach((EpubMetadataContributor contributor){
  String contributorName = contributor.Contributor;
  String contributorRole = contributor.Role;
});

// EPUB NCX data
EpubNavigation navigation = epubBook.Schema.Navigation;

// Enumerating NCX metadata
navigation.Head.Metadata.forEach((EpubNavigationHeadMeta meta){
  String metadataItemName = meta.Name;
  String metadataItemContent = meta.Content;
});

// Writing Data
var written = await EpubWriter.writeBook(epubBook);

// You can even re-read the book into a new object! 
var bookRoundTrip = await EpubReader.readBook(written);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].