TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: @smoores/epub, a JavaScript library for working with EPUB publications

156 点作者 smoores5 个月前
Howdy! I&#x27;ve just written a blog post about this, and I figured I would share it here: <a href="https:&#x2F;&#x2F;smoores.dev&#x2F;post&#x2F;announcing_smoores_epub&#x2F;" rel="nofollow">https:&#x2F;&#x2F;smoores.dev&#x2F;post&#x2F;announcing_smoores_epub&#x2F;</a>. As I&#x27;ve been working on Storyteller[1], I&#x27;ve been developing a library for working with EPUB files, since that&#x27;s a large amount of the work that Storyteller does. After a friend asked for advice on creating EPUB books in Node.js, I decided to publish Storyteller&#x27;s EPUB library as a standalone NPM package. I really love the EPUB spec, and I think the Node.js developer community deserves an actively maintained library for working with it!<p>[1]: <a href="https:&#x2F;&#x2F;smoores.gitlab.io&#x2F;storyteller" rel="nofollow">https:&#x2F;&#x2F;smoores.gitlab.io&#x2F;storyteller</a>

11 条评论

antonyt5 个月前
I feel stupid. I read “automatically syncing ebooks and audiobooks” and thought StoryTeller was a file synchronization service (like SyncThing) that for some reason only supported certain file types.<p>Maybe “syncing ebooks with audiobooks” would be clearer? Also entirely possible this is just a me problem, not a general one.<p>Really cool project!
评论 #42414159 未加载
评论 #42413844 未加载
Daiz5 个月前
As someone who has built custom EPUB authoring scripts in Node.js for work and also quite likes the EPUB spec: cool! I expect I&#x27;ll still keep using said scripts for work, but I have some side project ideas which would involve actually reading EPUB files too - I&#x27;ll probably give this a spin for those.
评论 #42417443 未加载
cyberax5 个月前
BTW, I&#x27;ve had this idea in my mind for a while, after slowly working through my e-library infrastructure.<p>Do you think it might be a good idea to set up a site to share the aligned overlays from Storyteller? This way, people won&#x27;t have to waste CPU&#x2F;GPU time re-aligning the same files over and over again.<p>It should be OK from a copyright perspective, as it won&#x27;t be distributing any copyrighted material, only the media overlay information.
评论 #42412858 未加载
hombre_fatal5 个月前
Extracting a library from a real world project is one of my favorite parts of software.<p>I&#x27;m sure the march of LLMs will continue eating into this pie, and that&#x27;s a good thing (most of it is a distraction from the real work), but I love polishing a library on my laptop in a cafe. It&#x27;s like working on a painting or something.
评论 #42412510 未加载
评论 #42412342 未加载
gavmor5 个月前
Cool! I totally could have used this earlier this year... can&#x27;t remember what for...<p>Interesting choice to publish from the storyteller &quot;monorepo.&quot; Is that because it evolved in situ, and you&#x27;ve no impetus to incur the overhead of extraction?
评论 #42411985 未加载
jspizziri5 个月前
You mentioned readium in one of your comments. I’m curious why you didn’t use the readium spec and corresponding ecosystem. Coming in cold and just glanced at your blog post, and I see you’re using RN. There is a RN package that leverages readium under the hood for ebook reading (I know because I’m the author), don’t know if it’s a weird actually has the api you need.<p>EDIT: storyteller is super interesting. Dug around a bit in the code and see that you do seem to be using readium for some things, so I must just be missing some nuance.
评论 #42417437 未加载
herrvogel-5 个月前
Storyteller seems pretty cool in general. Can it be used to host books for other people?
评论 #42412482 未加载
curtis33895 个月前
Something I&#x27;ve been wondering: why do ebooks take so long to render? My kindle seems good at it, but opening an ebook in calibre&#x2F;fbreader&#x2F;etc can take minutes or even fail in some readers depending on the ebook.
评论 #42412078 未加载
评论 #42412786 未加载
tills135 个月前
I&#x27;m going to be annoying and simply laugh at the fact it&#x27;s a 2k line, single file in source. It&#x27;s TypeScript! You HAVE to compile it to ship it as an npm package (_technically_ you don&#x27;t but). Split it up into smaller modules with `import` statements!
评论 #42414316 未加载
revskill5 个月前
Genius. Thanks.
seanwessmith5 个月前
sometimes life just delivers. was looking for this 2 days ago
评论 #42412000 未加载