Coder Social home page Coder Social logo

flafydev / epub_reader Goto Github PK

View Code? Open in Web Editor NEW
92.0 2.0 11.0 1.49 MB

An open source book reader developed in Flutter

License: GNU General Public License v3.0

Kotlin 0.04% Nix 0.25% Swift 0.12% Objective-C 0.01% Dart 86.48% CMake 4.85% C++ 6.60% C 0.44% HTML 1.21%
epub epub-reader flutter flutter-app reader

epub_reader's People

Contributors

flafydev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

epub_reader's Issues

Add a way to see how many pages you need to read to get to the next chapter.

Title. Including sub chapters.

The problem is with anchors

1. What if the next chapter is in the same file but points to an anchor you haven't reached yet?

Right now the renderer is sending how many anchors you've currently passed in the current file. This is used by the reader app to correctly determine on which chapter you are in case there are multiple chapters pointing to the same file but different anchors).

My idea is instead of sending the passed anchors of the current file, send all of the anchors of the current file together with the inner page they are on. This way the reader app can compute on its own how many anchors have passed. And can also determine how many inner pages until the next chapter.

2. What if the next chapter is in a different file but points to an anchor?

You wouldn't be able to determine the percentage of how far an anchor is without having the file loaded.
This is solved by #6

Task list

  • 1 solved. Change from passed anchors to a map of anchors and their inner page.
  • 2 solved. Implement #6

Book widgets for Android

An Android widget where you can see your recently read books and swipe between them.

Google Play Books' widget for example.
widget

Bad search results in books

The search results when searching queries in books are bad.

Here is how the search fails.

<p>This is a <span>short</span> paragraph</p>
Query Found
This is a true
short true
paragraph true
is a true
short paragraph false
This is a short false
a short false
This is a short paragraph false

This weird results are because the search only searches inside text nodes. In this case there are 3 text nodes.

The same book doesn't share state if it appears twice

If you have a book in a shelf, it will appear both in the All view and the Shelves view. Going into the book in one view, then going through a few pages, exiting the book and opening the same book in the other view. You'll see it doesn't save the the location.

Add an option for hosting a server.

Right now all the data of the reader is saved on the device.
This includes the epub files of the books and the reading progress of each book.
The disadvantages of this approach:

  1. Can't use the app on multiple devices without having to manually sync all the data and reading progress yourself.
  2. Can easily reach a few hundreds of MBs of data after adding a few books (because each book's epub file takes like 10mb)
  3. With big amounts of data it takes a while to create backups (zipping all the data).

For these reasons, it should be possible to connect to a server to take care of all these problem.

assets/index.html file is missing

After downloading a file from the browser, loading it in the app using the file picker and then trying to open that file results in this error.

Unhandled Exception: Unable to load asset: "assets/index.html".

Below given is the screenshot of the error.

https://prnt.sc/R9RTNwvDFL97

Can somebody help me out with the error.

Thanks.

Inject javascript from local webserver instead fetch from webview

I don't know what is better: fetching HTML from webview or injecting JavaScript and processing HTML from a local webserver. From the code of epub_renderer, JavaScript from webview has to do a lot of work. If it fails at some point, the renderer will stop rendering. For example, if we highlight the first word of an inner page, the renderer will stop rendering.

Add a way to add, remove, and go to bookmarks

Bookmarks are useful for quickly saving your location in a book and going somewhere else without any risks.

The implementations:

  • A new screen similar to the notes' screen.
  • A way to press on the top right of the screen to add/remove a bookmark.
  • New property in the BookSavedData for the bookmarks.
  • The bookmarks will use the consistent location of the page they are were assigned to to save their location.

Problems

1. if the bookmark saves its inner location by node index, how'd we know which nodes are currently in the page to know whether or not to show the bookmark?

Pick on of two solutions:

  • This can be solved by sending all of the visible nodes from the renderer to the reader app. But this requires to check each node whether is visible or not, which may take a lot of time!
  • To get the node indexes between pages get the current page node index and the next page node index and the indexes between them are in the current page. This only works if the node indexes increase by the inner page they are located at, which I think is true.

Edge cases:

1. Two bookmarks on the same page after resize of font (or anything else that changes the number of inner pages)

In that case only show the bookmark once but keep in mind that

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.