338 points · by phildenhoff · 2y ago · 159 comments
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!
Right 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?
"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."
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
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.
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.
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 :)
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.
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.
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 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.
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.
He is however an asshole on the level of Linus when it comes to bug reports and community support.
“ 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)”
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?
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.
Calibre hasn't used Python 2 in years.
My main question was, how could Calibre's main functionality be presented in a UI that feels native to macOS?
Since this doesn't try to be cross-platform, I might try to build this as a SwiftUI app with your Rust backend if I find the time.
Kudos on actually publishing this! It might be hard to maintain something that keeps up with Calibre's development, but it sure seems like a fun hobby project :)
In particular, Kemie Guaida[1]'s redesign posted to Reddit has been a major design inspiration (and she deserves credit on the repo, which I will address shortly): https://old.reddit.com/r/Calibre/comments/udzumn/testing_a_n...
You're able to see the entire overview of the project here: https://www.figma.com/file/g4ntqXWa6C0PRGrG3WjyXM/Calibre-pr...
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.
But yes, they support USB mass storage.
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.
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?
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)
Example: `ebook-convert file.epub file.azw3`
Curious what brought you to pick Svelte and Tauri for this project? Were you already familiar with them?
bun dev -- -- -- -- --server ...
made my day :-)> 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!
https://github.com/project-kiosk/kiosk
I just can’t keep motivation up long enough to finish it…
Have you looked at Zotero? This would fit well within that ecosystem, and it's hard to think that shoring up its support for ebooks (and Calibre compatibility) would be poorly received. I could imagine Citadel being an opinionated Zotero "distribution"—in the vein of OS distros or the various Jetbrains IDEs—with its own landing page and downloads, to better cater towards and more tailored for people primarily interested in reading for pleasure (rather than an emphasis on academic research, which tends to throw people off when recommending it, even though most of the pieces are there for ebook management...)
Now if there was support for multiple Calibre libraries...
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.
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.
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.
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"
> thread 'main' panicked at libcalibre/src/infrastructure/domain/book/repository.rs:20:62: called `Result::unwrap()` on an `Err` value: ()
`main` is up-to-date now and SHOULD be building. Feel free to email me (phil at denhoff dot ca) if you run into issues, or add a GitHub issue.
It sounds like some folks have issues building on Linux, but FWIW I had no problems building in a Codespace.
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.
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.
I will download and install today! Good luck!
I have been using calibre-web for many years, which (unlike Calibre) has a decent look and all the functionality I need.
That said, the end goal is to have a native Citadel way to manage libraries and that WOULD support custom folder hierarchies.
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!
1- i can't store my files in my own organizational structure
2- it doesn't tell you if an import for a particular file succeeded or not. sucks when trying to import hundreds of files.