Who wants a nice listing of all of the books in their eBook collection?

I needed a list to share with a few friends, and even though I could have generated a simple directory listing, I wanted something a little nicer.

I found this tip over at the MobileRead forums.

If you use Calibre to manage your eBook collection, getting a list is as easy as running a command from the command prompt.

Here’s how to do generate a text file listing of your library:

  1. If you’re running Windows, open a command prompt (Start->run->cmd) and change to the Calibre directory. (Type cd “\Program Files\Calibre2″)
  2. Type “calibredb list” to generate a list of books in your library.
  3. If you want to save the listing, redirect the output of that command to a file. For instance, you’d type calibredb list > listing.txt

When first ran this command, I didn’t redirect the output and I ran into a memory error, probably because I have a rather large eBook library.

Python function terminated unexpectedly
(12, ‘Not enough space’) (Error Code: 1)
Traceback (most recent call last):
File “site.py”, line 103, in main
File “site.py”, line 85, in run_entry_point
File “site-packages\calibre\library\cli.py”, line 729, in main
File “site-packages\calibre\library\cli.py”, line 249, in command_list
IOError: [Errno 12] Not enough space

Redirecting the output to a file avoids the error. So be sure to use step three, above, if you encounter this error.