Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: 1paragraph – a browser-based, offline-first ePub reader (1paragraph.app)
108 points by amadeuspagel on Sept 10, 2022 | hide | past | favorite | 41 comments



Looks nice, I like the concept. It would be nice if you pre-loaded some public domain books, to allow the user to get a feel for the application.


An easy solution to this would be to add a simple interface into either The Gutenberg Project's library, or Archive.org's library (or both, even). Both have rather huge collections of public domain epub (and other ebook formats) readily available, legal and free.


Easy enough to submit a PR?


Probably? What language is this thing written in? Lemme go see if it's something I know anything about. I'm normally a Python guy (and sometimes a little bit of Javascript here and there).

Okay, question; Is there a link anywhere to a repository or is this thing not open source?


I gave it a shot with a stress test (The History of the Decline and Fall of the Roman Empire[1]) and it works OK! But unfortunately it throws away endnote styling, and clicking any internal links inside the epub (e.g. the aforementioned endnotes) sends the user back to the library page.

[1] https://standardebooks.org/ebooks/edward-gibbon/the-history-...


Styling isn't supported at all, internal links are supposed to work, probably do not work right now, because I implemented the back button in the most naive possible way, where every popstate event closes the book and goes back to library view.


A similar tool I made: https://h5reader.azurewebsites.net/

Btw, yours did not work for me in Firefox on Android. Nothing happened after choosing an .epub


I confirm that it doesn't work on Firefox Android.

H5 should have a dark mode. I'm reading at night in my bed and the screen is white. The ebook reader I use (Cool Reader) lets me switch to a black backgroud.


There is a toggle in settings. Last I touched it, dark mode in CSS wasn't a thing.


Seems interesting, but I think the page really needs more detailed information. What is "add epub(s)" going to do with my file? Does "offline-first" mean offline only? If not, what is uploaded?

A bug(?): The brief about screen doesn't seem to display in private tabs in Firefox Android. Possibly I hit the rubbish bin button by accident, but restarting the browser didn't bring it back, while in Chrome closing and reopening an incognito tab brings it back.


> What is "add epub(s)" going to do with my file?

The file is going to be converted to HTML, and a document containing that HTML (and some metadata) is going to be stored locally, in your browser, using indexedDB[1].

> Does "offline-first" mean offline only?

For now, yes, but in the future I want to implement sync.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_A...


Thank you! The lack of a good e-book reader on macOS drives me to distraction. (Every app seems to insist on my using it to curate my books, rather than simply allowing me to look at books that are stored where I want to put them. I recognise that this app is, in a sense, doing the same, but that seems to be an artifact of the design rather than an intentional choice.)

When I go to the landing page and see the paragraph:

> 1paragraph is a browser-based, offline-first epub reader. For every book, it stores the last paragraph you read, shows that paragraph in the library view and scrolls to that paragraph when you open the book.

I think that this paragraph is itself a notional 'e-book', but I found it very confusing to click there (because of my idle clicking habit), and to be taken to a page with the same text but larger, and no indication of what had happened. It may be nice to add some more text. ("Clicking a book in your library, like this one, will open it. You can simply refresh to get back to the main library.")

It might also be nice to have progress bars; for tasks that take a little while, it's hard to tell the difference between an unresponsive interface and an interface that's simply working.


> I think that this paragraph is itself a notional 'e-book', but I found it very confusing to click there (because of my idle clicking habit), and to be taken to a page with the same text but larger, and no indication of what had happened. It may be nice to add some more text. ("Clicking an e-book will open it. You can simply refresh to get back to the main library.")

Thanks. I added the text "Click the back button to go back to the library view." (Right now, this 'e-book' doesn't update if the old version is already stored in your DB. If you want to see the new version you have to use an incognito tab.)


Love it. My only complaint so far after playing around is that the "last paragraph" it picks seems a little bit arbitrary. Often enough it seems to pick the one I just finished rather than the one I should be reading next. Maybe there could be some subtle indication of which paragraph it will leave off at based on your scroll position or something like that?


If it's been a while since you last opened a book, I think showing the last paragraph you read is better, gives you context.

I've experimented a bit with indicating the current paragraph (for example making that paragraph black and the other paragraphs dark grey), but didn't find anything I was happy with. I think the mild annoyance of even the most subtle indication over hours of reading would be worse then the mild annoyance of picking the "wrong" paragraph, which you will only notice when you browse the library and open a book.


I have not read many ebooks but it is a much worse experience than real books when you get lost. Much harder to find where to get back. Not sure why, something with how you can see it on the physical pages of a real book which no ebook reader can replicate.


Broadly, it feels like the seemingly paradoxical "browser-based, offline-first" idea could be the future of everything. I think it's worth considering.


I used to love the jolicloud os which was exactly this - a very light weight Linux that basically just loaded chromium and a few apps that all worked offline (and most also had an online element too) . https://en.m.wikipedia.org/wiki/Joli_OS

Brought to life many old laptops with that. And did what I needed.


Browser privacy is a tire fire though.

I've taken to using Firefox focus and pressing the little trashcan icon every day or so.

Anyway, I'd like to see a reasonable solution in this space, but I suspect the early adopters are largely the group of people that have essentially stateless web browsers.


I love it. Thank you for this! Its simple, and efficient. If there was a way to change the page width easily, that'll be the icing on top of the cake.


If you have a web browser with "jar:" URI scheme, it can also display EPUB files, although not the table of contents list. You will have to write "jar:" before the URL and "!/" after the URL, to make a directory listing of the file. (It also displays Gempub files OK, with the additional code that I have added to support Gemini file format)

Some other features such as "last paragraph", accessibility, annotations, etc, could be made to be supported even for any HTML file (in some cases, only for local files), even if it is not EPUB. (Since, EPUB is already HTML, anyways)


Never heard about that scheme. Which web browsers support it?


Mozilla-based browsers do; I don't know if any others do. (It can be used to access the contents of any ZIP file, not only EPUB.)


Huh! It shows ebooks as one looong page.


Yes, that's a feature. The browser is very good at rendering HTML, and that also gives you scrollbar support for free.


Oh wow. Then I think I can use Edge's text to speech on it too.. it has a really good voice emulation.


On macOS Safari/Chrome and Win11 Edge, after adding my ebook and entering into it, I see a large broken image (cover.jpeg failed to load) and I don't seem to be able to scroll or see any text.

I get this error in all browsers: "TypeError: undefined is not an object (evaluating 'o.getBoundingClientRect')". Since it's working for others, I can imagine my ebook has an unexpected format.


Yeah, try it with other ePubs. The code for converting ePubs to HTML is something I hacked together without much understanding and improve gradually whenever some book I want to read doesn't work. I read, or at least started reading, hundreds of books with it at this point, so it should mostly work.

Maybe you can email me the ePub that doesn't work. My email is amadeuspagel@gmail.com.


Okay, I just sent it. It was the only epub I happened to have on hand.


Thanks, it should work now. You might have to use Ctrl+Shift+R to force update.


can’t beat this service!


Very cool. I wish regular e-readers did this instead of foisting their store on me (I‘m looking at you, Kindle).


Tried it out on Edge & Chrome and it's just unresponsive after you choose an epub.


It's superfast on both Edge and Firefox for me.

0.5 MB e-book (one of the Culture novels).


There's no loading animation, but it shouldn't take that long.


nice one. what were the biggest/trickiest challenges and how long did it take you?


the trickiest stuff is just dealing with epubs, converting epubs to html. i can't say how long it took me because it's something i did gradually, always working on it whenever there was a problem with a book i wanted to add.


Is the code open source? I've been wanting to build something similar but with the option translate the text, to help with language learning.


Dunno about this one, but ttu[1] is a very popular offline web-based HTMLZ and EPUB reader in the Japanese learning community.

[1]: https://github.com/ttu-ttu/ebook-reader


In addition to reading PDFs, SumatraPDF also functions well as an ePub reader. It's free, lightweight, and (obviously?) works offline.

https://www.sumatrapdfreader.org/free-pdf-reader


But does it have a library view that shows the last paragraph you read for every book?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: