Hi, I'm using Calibre 0.9.6 Portable under Windows. After moving the library from ...\Calibre\Calibre Library to something else, and restarting Calibre, it insists on the old location. I have to manually switch it each time now.

My other question is how books can be imported better. I understand that Calibre needs to maintain a database, but to force users to copy everything into a static folder is far too strict to be generally useful. For example, I have LibreOffice documents I am working on, and like these to be available under Calibre as well. But I cannot rereimport these documents again and again after doing changes, so I would like to have Calibre them know by reference. So I can copy draft versions to my Sony Reader.

In fact, IMHO Calibre is rather unusable as a library manager without being able to handle arbitary pathnames. Throwing both, database + content into the same fixed and opaque folder hierarchy is far too strict. Take, for example, image database applications like Photoshop Elements, Lightroom or IMatch. For good reasons none of them forces user-images to be mixed with their private (thus finally irrelevant) database files.

Calibre is a great and powerful tool. The price for that, however, is that you have to grant it exclusive access to your files, loosing even the ability to edit them.

My other question is how books can be imported better. I understand that Calibre needs to maintain a database, but to force users to copy everything into a static folder is far too strict to be generally useful. For example, I have LibreOffice documents I am working on, and like these to be available under Calibre as well. But I cannot rereimport these documents again and again after doing changes, so I would like to have Calibre them know by reference. So I can copy draft versions to my Sony Reader.

If you have your documents as rtf in calibre, you should be able to edit them from within calibre by double clicking on them.

Hi, I'm using Calibre 0.9.6 Portable under Windows. After moving the library from ...\Calibre\Calibre Library to something else, and restarting Calibre, it insists on the old location. I have to manually switch it each time now.

My other question is how books can be imported better. I understand that Calibre needs to maintain a database, but to force users to copy everything into a static folder is far too strict to be generally useful. For example, I have LibreOffice documents I am working on, and like these to be available under Calibre as well. But I cannot rereimport these documents again and again after doing changes, so I would like to have Calibre them know by reference. So I can copy draft versions to my Sony Reader.

In fact, IMHO Calibre is rather unusable as a library manager without being able to handle arbitary pathnames. Throwing both, database + content into the same fixed and opaque folder hierarchy is far too strict. Take, for example, image database applications like Photoshop Elements, Lightroom or IMatch. For good reasons none of them forces user-images to be mixed with their private (thus finally irrelevant) database files.

Calibre is a great and powerful tool. The price for that, however, is that you have to grant it exclusive access to your files, loosing even the ability to edit them.

Hi, I'm using Calibre 0.9.6 Portable under Windows. After moving the library from ...\Calibre\Calibre Library to something else, and restarting Calibre, it insists on the old location. I have to manually switch it each time now.

Calibre portable is designed to be run from a USB drive, as such it has this limitation. If you want to place your library anywhere use calibre instead.

Quote:

Originally Posted by Matsendrasana

My other question is how books can be imported better. I understand that Calibre needs to maintain a database, but to force users to copy everything into a static folder is far too strict to be generally useful. For example, I have LibreOffice documents I am working on, and like these to be available under Calibre as well. But I cannot rereimport these documents again and again after doing changes, so I would like to have Calibre them know by reference. So I can copy draft versions to my Sony Reader.

Import the doc into calibre once, then use the "Open with" plugin to open the doc in LibreOffice. Save when finished and transfer the doc to your reader. Wash, rinse, repeat.

Quote:

Originally Posted by Matsendrasana

In fact, IMHO Calibre is rather unusable as a library manager without being able to handle arbitary pathnames. Throwing both, database + content into the same fixed and opaque folder hierarchy is far too strict. Take, for example, image database applications like Photoshop Elements, Lightroom or IMatch. For good reasons none of them forces user-images to be mixed with their private (thus finally irrelevant) database files.

You're entitled to your opinion and certainly there are always different ways to do things, but each library is unique unto itself. Having the one file (metadata.db) included with each library you have ensures backing calibre up is a simple one directory process. For most users having the metadata.db file in the root of their library isn't something they are aware of.

Quote:

Originally Posted by Matsendrasana

The price for that, however, is that you have to grant it exclusive access to your files, loosing even the ability to edit them.

This statement just isn't accurate. As I stated above you never loose the ability to edit your files. I frequently edit my epub books and my cover images using the Open With plugin.

This statement just isn't accurate. As I stated above you never loose the ability to edit your files. I frequently edit my epub books and my cover images using the Open With plugin.

Thanks. If I understood correctly this plugin allows me to open LibreOffice from Calibre? However, I don't want to store my work in Calibre's opaque and arbitary directory structure. I feel it is made for static files, but is not flexible enough for autors.

For example, I use Asciidoc a lot. With Calibre I am supposed to put my projects (with dozens of input text files and images) under the library directory, just to help Calibre see the PDF/EPUB/HTML output Asciidoc generates. This makes no sense. Some documents are part of software projects I work on (under .../prj/path/to/project), others are just articles and other text (under .../doc/texte/, .../doc/thema/ etc.).

Not to mention the fact that the portable version requires everything to be on the stick...

Finally, it should be no problem for Calibre to store references (pathnames) in its database, and, if they exist, re-read these files at startup.

Using your requirements: You need to look for some other program. Calibre's author is not going to change the overall method of keeping files (again. IIRC someone said the original Calibre used BLOB's to store books. Performance was ).

We can also use LibreOffice's EPUB conversion, which I presume employs epub2writer since I have this tool installed. However, I found that ebook-convert.exe creates nicer output that looks much like the original.

So the conversion part was suprisingly simple. Of course my batch-file is a bit more complex since I use an abstract subroutine for this task that dequotes pathnames, extracts the file basenames etc.

The next thing I had to do was to update Calibre's database. The essential command is:

Alas, this works only the first time. Then it complains that the book already exists in the database. The --duplicate option is no help because it will just add a 2nd, 3rd etc. instance of the same book! calibredb misses a replace command. The remove command is not flexible enough since it expects some unknown numerical ids. The list command will shows these ids in a human-readable form only, i.e. I see no way to extract the id in question from its output. Since calibredb notices that the book is a duplicate, however, it should be very easy to replace it.

If I read the posts above correctly, I think I found the answer to my question. The reason I couldn't find how to set the default database to point to something other than X:\Program Files\Calibre Portable\Calibre Library is because the program was designed to find the database in a specific path, which cannot be changed. It will always look for the database in the folder Calibre Library below the Calibre Portable folder.

Names are separated by blanks. It is hard to tell when the book title ends and the author begins, because the fields id, title and author are not tab-separated. They're separated by blanks like words in the title and the author fields. Furthermore some titles are broken into separate lines (3, 15). Also title and author seem to have no fixed columns. In the output the title/author currently starts at the odd positions column 3/61. What if id > 99?

Finally, how to get the title of my own files? exiftool -title will extract the title as one-liner for PDFs but not for EPUBs. ebook-meta --title can only set the title, but not read it. Correct?

calibredb refuses to import an EPUB when its title is already used. When this is true, isn't it then easier, and less error-prone, to leave title comparison in the hands of calibredb? Parsing titles should be used by a script to decide if the --duplicate option must be applied, and along with that, another option would be handy that replaces the book instead of creating a new instance. Both are legal cases when working with the cli-tools (which are really great!).

Kovid, of course I tried them all. I can see no way to do this. Please help.

Quote:

Originally Posted by kovidgoyal

calibredb list -h

No further options here. To get the title of a book (and thus its id) the list format is very hard to parse. The easiest way is probably some separate Perl/Python script that would deduce the columns from the id/title/author columns.

Maybe I have not made clear what I try to accomplish: I do not want to add another format, and did not asked for detailed command-lines. I just want to replace a present book in the same format because its source (LibreOffice, Asciidoc etc.) has changed. To do this an id is required. Here is explained: "You can get id by using the list command."

But as I posted by example the output of this command is hard to parse, and also the title from the newly added files must be known to extract the id from the list output.

Nevertheless I tried adding the book and parse the messages: no luck. As you showed, it only tells the id when adding a new book. When the book already exists it just prints an error. And with --duplicates it prints the new id.