logoalt Hacker News

lagrange77today at 7:20 AM1 replyview on HN

Cool idea!

Maybe you could somehow integrate it with Calibre [0].

https://calibre-ebook.com/download


Replies

SamuraiLiontoday at 7:26 AM

Thanks. Calibre’s crossed my mind a few times, the obvious hook is the content server, but the browser integration makes it clunky. Calibre-server doesn’t spit out CORS headers that you can use from another origin, so a web app can’t just read your library over HTTP unless you do a bit of reconfiguring it, and making people set CORS flags just for my little tool seems like a bad bargain.

The avenue that actually looks viable is directory import. Calibre keeps everything as normal files in Author/Title folders with a metadata.opf next to each book, so if I point a directory picker at your library directory, I can traverse it, grab the opf file to get the actual title/author rather than having to guess based on the filename, and then suck the epub files directly in. Would be a properly slick bulk import.

Catch is the File System Access API only works in Chromium at present, so anyone using Firefox/Safari would still be forced to pick their files one by one. Would be a worthwhile trade-off though as it gracefully degrades.