epubrs 0.1.0 copy "epubrs: ^0.1.0" to clipboard
epubrs: ^0.1.0 copied to clipboard

EPUB Reading Systems

epubrs(epub reading systems) #

epubrs is an implement of epub reading systems.

Support epub2: 2.0 2.0.1 epub3: 3.0 3.0.1 3.2.

Reader and Writer with content are fully tested.

Example with dart:io #

import 'package:epubrs/epubrs_io.dart' as epub;

final book = epub.readFile('test/res/alice.epub')!;
print(book.version); // Version.epub3
print(book.title); // ce's Adventures Under Ground Being a facsimile of the original Ms. book afterwards developed into "Alice's Adventures in Wonderland"
print(book.author); // Lewis Carroll
print(book.chapters); // first level chapters

Example without dart:io #

import 'package:epubrs/epubrs.dart' as epub;
import 'package:archive/archive_io.dart';

final book = epub.Reader.
  open(ZipDecoder().decodeBytes(bytes_or_file_content)).
  read();

Write epub3.0 example #

This example pass epubcheck

import 'package:epubrs/epubrs_io.dart' as epub;

final book = epub.Book.create(
  title: 'dream world',
  author: 'joe doe',
);

book.add(
  epub.Chapter(title: 'Part 1', children: [
    epub.Chapter.content('Chapter 1', 'Content of Chapter 1'),
    epub.Chapter.content('Chapter 2', 'Content of Chapter 2'),
  ]),
);

epub.writeFile(book, 'new.epub');
1
likes
100
points
42
downloads

Publisher

unverified uploader

Weekly Downloads

EPUB Reading Systems

Topics

#epub #book

Documentation

API reference

License

MIT (license)

Dependencies

archive, collection, fpdart, image, path, quiver, uuid, xml

More

Packages that depend on epubrs