Giter VIP home page Giter VIP logo

oppen_bok's Introduction

ÖppenBók

ePub viewer for Android based OS

  • Goals: a casual ePub reader with a solid UX, opens a book, remembers where you're up to - nothing else.
  • Non Goals: everything else, no highlighting, in-app dictionary, annotation etc.

I want a good reading experience for one book at a time, to pick up where I left off, that's it.

Status

Development has just begun, this is not fit for use yet.

ToDo:

  • Storage Access Framework .ePub import - DONE
  • Unzip the imported file and cache locally - DONE
  • Find index file and extract xhtml file array - DONE
  • Process each file: break down into screen sized pages - DONE
  • Store pages locally (in Room DB?) - DONE
  • purge cache directory - DONE
  • build UI (the fun bit) - DONE
  • Bonus: Inline images - TODO

Parsing

ePub files are just a series of xHtml files with CSS, this makes parsing books into mobile screen friendly chunks very tricky. This project takes each page, splits it into paragraph strings then adds them in turn until the height is greater than the available window height. The paragraph that overflows is then broken up into words which are added one by one to fill up the gap at the bottom. Any remaining words are then joined to a new line which is inserted at the start of the array and passed to process the next screen.

View ChapterSplicerImpl.kt

Parsing Diagram

Reference

Attribution

Book loading animation is by Филипп Чуланов (Philip Chulanov) from LottieFiles

Licence

European Union Public Licence v. 1.2

The page turning animation code is in the page_turn package and is derived from PlayLikeCurl, a Java library from 2016 by Karan Kalsi which was released under the MIT License: github.com/karankalsi/PlayLikeCurl

oppen_bok's People

Contributors

orllewin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.