satorumurmur / bibi

Bibi | EPUB Reader on your website.
https://bibi.epub.link
MIT License
843 stars 123 forks source link

Is there any way to start ebook from specific page #71

Closed ahmettkartal closed 4 years ago

ahmettkartal commented 4 years ago

I want users to start reading from the page where they left off before. Is there any way for this issue?

brkdmn35 commented 4 years ago

Hi Ahmet, I tried to contact owner of project but he did not answer me. Then after hours of work, i started to understand code. It is really complicated.

If you can see activate part on bibi.js, you can define your first page as, R.Current.Page.PageIndex = {your first page]; E.dispatch("bibi:commands:move-by",1); \this part take to destination page

I hope owner will update documentation for users in future :(

ahmettkartal commented 4 years ago

Hi Ahmet, I tried to contact owner of project but he did not answer me. Then after hours of work, i started to understand code. It is really complicated.

If you can see activate part on bibi.js, you can define your first page as, R.Current.Page.PageIndex = {your first page]; E.dispatch("bibi:commands:move-by",1); \this part take to destination page

I hope owner will update documentation for users in future :(

Thank you so much Burak it works. 🎊 🎊

satorumurmur commented 4 years ago

@ahmettkartal @brkdmn35 Thanks for using Bibi. I'm sorry for the lazy response.

In the latest release (v1.2.0), you can use the p identifier in URL to specify the point in the book, like these:

In the next some releases, I will make it possible to get the 2.1.6.8.9.3 of double-clicked element.

In the current version, you can get the p identifier value of the element near the head of the current view by I.PageObserver.getP() or I.PageObserver.getP({ TagNames: ['figure', 'p'] }) or so on, but this is quite rough.

On another way, you can also use the iipp identifier (Item Index + Page Progress in the Item) which existing as the system function from before, like these:

But point specified by iipp is quite "about" and different on each user's display size.