Show HN: Citadel – a Calibre-compatible eBook management app (github.com)
Hey folks! This winter I've been building Citadel to scratch my itch of managing ebooks without using Calibre. Calibre is incredibly powerful, but it's slow and awkward to use.
I dreamed of writing a native app (and originally tried this in Swift), but ran into issues building the UI. Plus, whatever I built would only work on macOS. I started writing Citadel using Tauri (Svelte on the frontend + Rust on the backend) to have a cross-platform desktop app. Plus, Citadel supports running in a headless / webbrowser mode. You can self-host a Citadel server that manages your library, and connect to it from anywhere with the web.
This is SUPER early software. Honestly, I'm a bit embarrassed to post it here — but I wanted folks to know that I'm building a tool to replace Calibre. If you'd like to help build it, I'd love the help! If you just want to follow the journey, please do!
162 comments
[ 0.25 ms ] story [ 220 ms ] threadRight now, this is a hobby project — I'm more interested in having fun building (rough!!) software than worried about extending existing projects. Plus, with how Citadel is designed to be backwards compatible with Calibre, you can continue to use Calibre Web.
As well, I've organized the backend so that all the Calibre-facing code is its own library, which (in the future!) others can use for their own projects. A Calibre library CLI, anyone?
A nice idea
I wrote a remarkably hacky cli for that rdr. Basically to
- open the last book opened with the CLI
- select from the last n books so opened
- return the results of a query and narrow with rofi
I figure this covers a huge portion of my normal usage.
Pushing books to device would be useful too.
I'd imagine spearheading a ground up rewrite of their UI would be a lot more work too.
thanks for taking this on! calibre is a pita for me to use, and I know what I'm doing. makes it impossible to recommend to anyone, whether they're my grandparents or asavvy tech person.
Edit: I've read a few more comments and some a free with you, while others think it works fine. I'm wondering if there's something about the UI that clicks with some but not others.
Also, there's definitely something "off" when it comes to using it intuitively. I have to devote a lot of brain power to searching for functionality AND trying to comprehend exactly how those pieces of functionality are going to affect my library data.
Maybe it's too powerful of a tool up front or something. It could benefit from a "basic view" maybe?
None of these are complaints from me, I'm a happy user. I'll just echo some other commenters in wishing for a more robust network interface (whether that's just an API, or a more hashed out front end). I'd like to easily share my library with people or just other devices while on-the-go, and Calibre has all the device formatting functionality built-in.
Gives me a bit of early Linus Thorvalds vibes: "just a hobby, won't be big and professional like gnu" [0] - that said, I wish you all the best for the project :)
[0] https://www.cs.cmu.edu/~awb/linux.history.html
"In many areas, it's almost received wisdom that you shouldn't reinvent the wheel. But I would urge you to occasionally try anyways. You'll be better for the effort, and this is how eventually we get better wheels. By people just going ahead and trying."
https://www.youtube.com/watch?v=YOZnqjHkULc
Note that I said "most" above. There are reasons to write a start a new project despite others in the same space existing. However this should not be done until you define what is wrong with existing projects.
I couldn't disagree with this more. Reinventing something in public view can be extraordinarily valuable, even if without a clearly defined problem to address. Off the top of my head:
- Learning in public can have benefits: I personally tend to write much better software if I know there is any chance someone else might see it and reinventing the wheel (Todo app anyone?) is a great way to focus on learning some new techniques or technology without the added overhead of also inventing a novel solution to some hard problem.
- Contributing to the dominate project in any space requires working within the constraints of the existing code and project/user expectations, and if you just show up out of the blue trying to "apply lessons learned", you also need to make a convincing argument for why your way is the better way. On the other hand, reinventing the project allows the freedom to experiment and demonstrate some radical alternative and doing it in public allows anyone (including dominant project maintainers and users) to learn from it.
- People that don't have any interest in the original project, but do have interest in aspects of the reinvention can benefit. For example, I haven't used Calibre in years and don't plan to now, but I'm grateful the author shared this because I hadn't heard of Tauri prior or seen a Bun project, and now I'm exploring the repo and learning something new.
> There are many good open source projects that could be great if more developers would work on them.
Eh. Sounds like a Zero-Sum Fallacy.
Sounds like a personal problem. I'm not sure how to fix it, but it seems like you should take more pride in your work even if nobody will see it.
> Contributing to the dominate project in any space requires working within the constraints of the existing code
This is a GOOD thing. The world doesn't need more half baked open source solutions. The world needs more open source code that many people have carefully worked to perfect. If you have not already worked on a project then you don't understand it and the constraints and compromises that went into the original. I've seen many times where someone has attempted to do better (often in closed source software) and when they were done ended up with a similar mess to the first as there are often not-obvious things involved in the original decision that you end up reinventing.
> Sounds like a Zero-Sum Fallacy.
Not a Fallacy - there are only limited number of people working on open source. There is only a limited amount any one person can contribute. As such there often is a zero sum.
Again, don't get me wrong - there are sometimes good reasons to start from scratch. However if you don't understand the real problems of the original you cannot hope to fix them. Many of the problems are political - there are a number of people working on open source that I cannot stand and thus I refuse to work on projects they work on so if I'm really interested a new project is sometime the only option. Sometimes rewriting in Haskell or Rust or whatever the language of the day is really is worth doing. However the default should be work on a project that is already there.
Don't be sad! Based on the most recent threads discussing Calibre [0] it would seem that the disclaimer isn't strictly necessary, and actually OP appears to be addressing a problem that resonates with a fair number of people on HN!
That said, there is always going to be someone that will "have a few qualms with this app" [1] regardless so it doesn't hurt to get in front of the question.
[0] See:
- Calibre New in Calibre 7.0 -- https://news.ycombinator.com/item?id=38316846
- Calibre replacement considerations -- https://news.ycombinator.com/item?id=37364885
[1] lol, https://news.ycombinator.com/item?id=9224
If there was a solid competitor that was more open, more modern, and designed with the hosted library solution in mind, I would no doubt start using it.
If the "reader" and "editor" aspects are explicit non-goals (fair enough), then what actually does Citadel do for users? Is it mainly to be a portal to view/sort books and click on them? Is there a roadmap where you envision more features?
Citadel will (and does) support editing metadata for books — titles, authors, (in future) tags, custom columns. That’s certain. Syncing to devices will come too, in time, as will downloading metadata from online sources.
But what I don’t plan on adding is a way to edit book content or an embedded ereader. There are lots of great ereader apps & devices already, and I don’t think epub editing is commonly used (compared to keeping a collection).
While I don’t have a road map, I’m always open to feedback and ideas!
(Edit: other features like format conversion and stripping DRM are likely to happen too. Ideally with crates or plugins, to make it a bit easier to extend)
[1] https://github.com/bookwyrm-social/bookwyrm
Example: `ebook-convert file.epub file.azw3`
[1]: https://github.com/gryf/ebook-converter
I know it was not a criticism but I would like to point out that Calibre seems to be developed also entirely by one person [0]. I understand why they would be hesitant to make big changes that would generate more work for them that would not be seen by most (GUI) users.
[0] https://github.com/kovidgoyal/calibre/graphs/contributors
Now if there was support for multiple Calibre libraries...
The only reason I had it like that was so I could sync just the cookbook files to another device via Syncthing, or only the technical books. It didn't last, it was a pita to manager (three different auto-add folders) and I reunified them after 9 months or so.
Could you explain that in more detail? It seems to me that Calibre is totally self hosted.
I give an example. I use Calibre to import ebooks as epub (if they are not already epub, which they usually are,) maybe change their metadata and add a cover if they don't have one. The books go to Calibre's directory and then I sync to my phone using syncthing, like everything else I exchange between my laptop and my phone. I know that Calibre has a way to send books to devices but I think that it requires either a hardware reader or some interoperable app. I prefer working only with the file system. It always works no matter what I have on my phone.
All of that seems self hosted to me, or do you mean having a server somewhere at home or on the internet with the ebook collection?
I also use the editor to fix typos or to create ebooks from text files.
I''m not the person you replied to, but having it run on a server somewhere is exactly what "self hosted" means to me.
Calibre hasn't used Python 2 in years.
I understand that most folks probably have 10-300 books, but in my case I have some large libraries I tried to use with Calibre, and it just absolutely DIES.
The steadfast decision to exclusively use SQLite doesn't help. I opened a PR back in 2016 or so, but the maintainer was quite enthusiastically opposed to changing the DB layer or making it pluggable.
He is however an asshole on the level of Linus when it comes to bug reports and community support.
Calibre afaik was created from scratch.
Those are two entirely different circumstances from which to start from and it’s inevitable they would have vastly divergent results even in the same hands.
“ It's a big shame that whenever anything related to Calibre is posted, top comments will often be how arrogant is author is. I used to think the same. But when I read his comments history in GitHub, he doesn't seem a dick to me at all. So I googled his name, and end up in a forum. It completely changed my mind. Contrary to what people believe, Dovid Goyal is the most friendly programmer to his users. He spent lots of time answering questions in the forum https://www.mobileread.com/forums/forumdisplay.php?f=166. His answers include where is a menu located, how to convert a book from one format to another, helping the user to debug the exact the problem with Calibre. He has been doing this daily and is very responsive. You can expect an answer to your question in the same day. (The forum used to allow you to read user's comments history anonymously, but now you need a account to do so)”
Sounds very reasonable. I am pretty sure that SQLite isn‘t the problem. It is actually faster than traditional client server DBs in many cases.
It took me the better part of the year to figure out how and why QGIS wouldn't just let me draw geometry like I can in a vector drawing tool. I still have to read the docs every time to figure out most selection manipulation actions in GIMP or decode the icons.
With Calibre and GIMP in particular, most people don't need most of its functionality, and easier but weaker tools exist that can do the same things. Almost all of my image editing is in Krita now because it's about as powerful and much more intuitive. If Citadel becomes the Krita of ebook readers, I'd readily use it just on the UI even if it's just as unstable.
And why would anyone force themselves with its "aesthetic" when you can spin up calibre-web container and get a nice UI and an OPDS in a few seconds?
And I’m not even talking about non intuitive UI. For something that has supposed to be a library it’s nowhere near real library (alphabetical list of authors).
What do you mean?
I just click the 'Author' column header and it sorts.
100gb is very big though. I guess I'm not surprised you would have problems with a library that size.
This post on reddit is relevant.
https://www.reddit.com/r/Calibre/comments/jl3wd2/how_large_i...
At a few mb per, 100gb is centuries of reading.
Unless it’s comic books?
I am going to try and use it again today and see if I can get used to it. It really is fantastic for a free product especially for a power user.
Filtering is only on author & title for now. I’m looking to rewrite filtering once I have support in libcalibre for more data, so that you can easily filter by custom columns.
How do you search / organize your data in Calibre now? What would be ideal?
Yeah, I have a bunch of them, one is "Read Status" (read, reading, to-read), another is "Recommended By" to track books recommended by various people, and the last one is "Folders" which I use to arrange books in a folder-like hierarachy.
For example, you could have a "Finance" folder, and then "Finance.Investing", "Finance.Personal Finance", "Finance.Trading" subfolders.
The calibre content server does support searching and viewing these columns, and in the desktop app you see the tree on the left pane which you can quickly browse.
To search a specific "folder" you'd use something like: #folder:"=Finance.Personal Finance" title:"happy money"
He’s done amazing work, but he’s one of those very opinionated people that can quickly and arbitrarily become weirdly hostile to things, even when others offer to do the work.
Honest question: Are there any examples of native smartphone apps which are offering such a functional wealth as Calibre does in a much better/easier way?
> Yes, that is 4 pairs of --s. This is because Bun will pass the first pair to another bun run command, the second will go to tauri dev, the third will go to vite dev, and finally the last set will go to Cargo when running the backend. It's a mess!
That said, the end goal is to have a native Citadel way to manage libraries and that WOULD support custom folder hierarchies.
Typescript is used for the Svelte UI. Svelte talks to the Rust backend through Tauri (by default). Both support a headless/web mode where the Svelte frontend connects to the backend over HTTP.
I have been using calibre-web for many years, which (unlike Calibre) has a decent look and all the functionality I need.
It’s particularly dumb as it will have taken even more work on his part to map the characters to pīnyīn than it would’ve to just preserve the actual titles.
While I haven't tested non-ASCII titles, there is no reason it shouldn't support it. I'm planning on doing some perf testing today and I'll make sure I test global names.
https://github.com/project-kiosk/kiosk
I just can’t keep motivation up long enough to finish it…
Curious what brought you to pick Svelte and Tauri for this project? Were you already familiar with them?
For some reason I thought that uploading books to the Kobo reader was somehow complicated, and I only used Caliber to get books from laptop to Kobo.
I know Calibre has lots of other functions, but I didn't like the interface and I'm happy I don't have to use it, or any other application like that, anymore.
It kinda made me wonder how Kindles remain so popular. First mover’s advantage? I dunno, but an eReader that can’t read ePubs and PDFs feels a bit like an audio player that can’t play MP3s and AAC.
Ideally everybody would only buy DRM-free ePubs and audiobooks but realistically people don’t care. And I don’t see a repeat of Apple forcing DRM-free music happening here.
It’s really only big name e-ink readers other than Kobo that have this issue.
As for Kindle... for most users Send to Kindle is going to be more convenient than sideloading anyways, and that does take ePubs now, so it's not a huge usability hit.
But yes, they support USB mass storage.
[1]: https://pgaskin.net/kepubify/
I think I loaded my books over USB, then synced daily news and additional books via rsync. Some of the content was auto generated and dumped into the dir like some auto fetch and email subscriptions, some was manual like copying in a new book after purchase.
But its not a very complicated problem, calibre just does a ton of other stuff too outside of copying books into a specific folder structure.
Pretty low bar to clear, honestly.
Either way this is cool to see. Maybe we'll see more energy behind Calibre as a result.
Citadel has a lower bar of “no slower than Calibre” but I expect it to be MUCH faster. For example — Calibre takes 8s to start up on my laptop. Citadel is nearly instant. I’d like to keep it that way!
I will download and install today! Good luck!