Skip to content

A Kotlin epub reader and parser framework for Android.

License

Notifications You must be signed in to change notification settings

ProgrammerLauch/Librum

 
 

Repository files navigation

Librum

Build Status

Librum (Latin for Book) is an ePub reader and parser framework written in Kotlin.

This is a fork from FolioReader with the aim of making the library easier to use and maintain. Most of the components have been re-written in accordance with an MVP structure in mind.

Features

Most of the features will remain the same from the FolioReader library, with a couple more additions such as ability to read a book from a remote URL. This is the biggest inspiration of the library re-write.

  • Custom Fonts
  • Custom Text Size
  • Themes / Day mode / Night mode
  • Text Highlighting
  • List / Edit / Delete Highlights
  • Handle Internal and External Links
  • Portrait / Landscape
  • Reading Time Left / Pages left
  • In-App Dictionary
  • Media Overlays (Sync text rendering with audio playback)
  • TTS - Text to Speech Support
  • Parse epub cover image
  • PDF support
  • Book Search
  • Add Notes to a Highlight

Demo

Custom Fonts

Custom fonts

Day and Night Mode

Day night mode

Text Highlighting

Highlight

Media Overlays

Media Overlay

Gradle

Add following dependency to your app build.gradle

compile 'com.librum:librum:0.4.1'

Usage

To use Librum, you need to call LibrumActivity with following parameters:

  1. INTENT_EPUB_SOURCE_TYPE - your epub can come from raw or assets folder or from SD card. Use enum LibrumActivity.EpubSourceType.
  2. INTENT_EPUB_SOURCE_PATH - assets/SD card path of the epub file or raw ID of epub file if epub file is in raw folder

Reading from assets folder

Intent intent = new Intent(HomeActivity.this, LibrumActivity.class);
intent.putExtra(INTENT_EPUB_SOURCE_TYPE, EpubSourceType.ASSESTS);
intent.putExtra(INTENT_EPUB_SOURCE_PATH, "epub/The Silver Chair.epub");
startActivity(intent);

Reading from raw folder of resources

Intent intent = new Intent(HomeActivity.this, LibrumActivity.class);
intent.putExtra(INTENT_EPUB_SOURCE_TYPE, EpubSourceType.RAW);
intent.putExtra(INTENT_EPUB_SOURCE_PATH, R.raw.adventures);
startActivity(intent);

For reading from SD card, just retrieve absolute path of epub file and pass that in INTENT_EPUB_SOURCE_PATH.

Credits

  1. SwipeLayout
  2. ORMLite
  3. SMIL parsing

Author

Brian Lusina

About

A Kotlin epub reader and parser framework for Android.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 52.9%
  • JavaScript 24.9%
  • Kotlin 19.9%
  • HTML 1.2%
  • CSS 1.1%