
Ask HN: How do you organise PDFs/eBooks? - p0llard
I try to obtain a digital copy of every physical book I buy, and I have quite a lot of books in digital format only; recently I decided to try and organise the mess.<p>I practically live in the terminal, and I use very few GUI programs these days, so I&#x27;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.<p>The solution I&#x27;ve come up with is to use the filesystem as a &quot;category tree&quot; (so I might have &quot;.&#x2F;Computer Science&#x2F;Abstract Interpretation&#x2F;...&quot;, or &quot;.&#x2F;Mathematics&#x2F;Mathematical Logic&#x2F;...&quot;) with softlinks to directories in a hidden &quot;store&quot; 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&#x27;m looking for. I&#x27;ve found this works particularly well when combined with a terminal file manager such as ranger, and a fuzzy searcher such as fzf.<p>I&#x27;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.<p>I&#x27;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?
======
simonblack
I practically live in the terminal too. Most of my virtual desktops have at
least two xterms, and usually more.

But I recognise that calibre does such a good job that I wouldn't be without
it.

These are my calibre libraries:

    
    
       1.5G    amazon_bought
       1.9G    calibre_library
       9.6M    calibre_porn
       4.0K    comics
       2.8G    computing
       4.3G    fiction_collection
       7.4G    julie_books
       1.2G    pdf_books

------
michaelmrose
Why not a terminal interface to calibre?

~~~
p0llard
I'm really quite reluctant to touch it at all; on my Arch machine the
installation will take up 366.38 MiB (including dependencies), which feels
horribly bloated; my understanding is that it "does everything", but I prefer
to subscribe to the UNIX philosophy.

Does 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.

~~~
michaelmrose
It does have a cli calibredb BUT it really isn't designed for interactive use
and comes with a few caveats.

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.

