Ask HN: How do you organise PDFs/eBooks?
I practically live in the terminal, and I use very few GUI programs these days, so I'm reluctant to use something like Calibre which I think is too bloated for my purposes. Essentially my requirements are a system that allows for hierarchical categorisation of books, and is easily navigable from the terminal.
The solution I've come up with is to use the filesystem as a "category tree" (so I might have "./Computer Science/Abstract Interpretation/...", or "./Mathematics/Mathematical Logic/...") with softlinks to directories in a hidden "store" which actually contain the books as the leaf nodes; this way I can have the same book in multiple categories, and I find it very easy to find whatever I'm looking for. I've found this works particularly well when combined with a terminal file manager such as ranger, and a fuzzy searcher such as fzf.
I've written a small tool which parses YAML metadata files inside the store and automatically generates the library structure based on the categories I assign.
I'd be interested to hear if anyone else has come up with a solution to this problem, or is aware of a pre-existing solution?
5 comments
[ 5.5 ms ] story [ 26.1 ms ] threadDoes Calibre come with a fully fledged command line interface? I wasn't able to find much in the documentation, and I'm reluctant to touch the codebase having heard various horror stories.
You need to pass --for-machine to get json output.
It keeps all its data in a sqlite database. Its built in cli refuses to interact with the database even for read only operations when calibre is running. You CAN pass a flag to interact with the running instance but THAT will fail if it isn't running so you basically have to see if its running to see how you ought to talk to it.
Talking to the running instance over localhost is subject to the same limitations as talking to a remote instance. In particular it returns $format in place of /path/to/book.$format a limitation the author says is for security.
Since the naming structure is consistent you can replace format with /path/to/library///.format when talking to the running instance.
Realistically worrying about 400MB for an app when 1TB ssds are cheap seems a contextually odd choice. Calibre does a LOT and actually does it pretty well. Replicating even just the most important functions would appear to be a fair bit of work.
But I recognise that calibre does such a good job that I wouldn't be without it.
These are my calibre libraries: