Hi there,
We are currently contemplating the migration of the existing
MobileRead library to a calibre library. Ultimately we would like to detach the MobileRead library from the forums and present it as its own OPDS-powered website, with the content powered and managed by calibre.
One aspect that I am currently struggling with is how we could preserve a link to the original attachment id. In other words, once books have been (batch) imported to calibre, we need to have a marker (a customer column for example) that contains the id of the original attachment that we can refer back to if needed. I see two possibilities right now:
- Use filenames to contain metadata. Like {attachmentid}_originalfilename.epub and tell calibre to extract the metadata from the filename rather than from the file data. Would that even work with custom columns? Anyhow, this doesn't seem to be as useful as long as it results in calibre not importing the metadata from the book content at the same time.
- Use hash checksums of the files to correlate book ids from the imported books in the calibre database with the original attachment ids. Once we know which calibre book id relates to which attachment id, we could directly modify the calibre database and fill a custom column table with the respective attachment id data.
What I am curious about is, are there any better ways of handling this situation? There may be even more information from the original attachment that we would like to extract and embed in the calibre database. For example, the timestamp of the original upload date. Again, this could probably be encoded in the filename if we could somehow tell calibre that this part signifies a custom field named "upload date", or it could later be inserted manually in the calibre database using the book id<->attachment id correlation.
Thanks for your help.
Alex