View Single Post
Old 07-04-2011, 05:30 PM   #75
Mr. X
Mr. X is on a distinguished road
Posts: 68
Karma: 64
Join Date: Mar 2010
Location: Philadelphia
Device: iRex DR800SG
Originally Posted by Mackx View Post
@Mr. X.: can you point me to some documents about the format of the .metadata and .cover files from Calibre?
Actually, it looks like pretty much the entire .opf file is already copied by Calibre, just as JSON instead of XML and put in a single file (metadata.calibre at the root of the memory card). Each book has an entry like so:

    "rating": 0, 
    "author_sort": "Lessig, Lawrence", 
    "application_id": 238, 
    "pubdate": "2006-02-15T05:00:00+00:00", 
    "series": null, 
    "author_sort_map": {
      "Lawrence Lessig": "Lessig, Lawrence"
    "publication_type": null, 
    "size": 4334892, 
    "author_link_map": {
      "Lawrence Lessig": ""
    "uuid": "1edb160e-2306-45a7-8fdb-e204b5213a33", 
    "title": "Code 2.0", 
    "user_categories": {}, 
    "comments": "<p class=\"description\">SUMMARY:<br>There\u2019s a common belief that cyberspace cannot be regulated-that it is, in its very essence, immune from the government\u2019s (or anyone else\u2019s) control. Code, first published in 2000, argues that this belief is wrong. It is not in the nature of cyberspace to be unregulable; cyberspace has no \u201cnature.\u201d It only has code-the software and hardware that make cyberspace what it is. That code can create a place of freedom-as the original architecture of the Net did-or a place of oppressive control. Under the influence of commerce, cyberspace is becoming a highly regulable space, where behavior is much more tightly controlled than in real space. But that\u2019s not inevitable either. We can-we must-choose what kind of cyberspace we want and what freedoms we will guarantee. These choices are all about architecture: about what kind of code will govern cyberspace, and who will control it. In this realm, code is the most significant form of law, and it is up to lawyers, policymakers, and especially citizens to decide what values that code embodies. Since its original publication, this seminal book has earned the status of a minor classic. This second edition, or Version 2.0, has been prepared through the author\u2019s wiki, a web site that allows readers to edit the text, making this the first reader-edited revision of a popular book.</p>", 
    "languages": [], 
    "user_metadata": {}, 
    "thumbnail": [
    "db_id": null, 
    "tags": [
    "timestamp": "2010-02-23T05:00:00+00:00", 
    "mime": null, 
    "authors": [
      "Lawrence Lessig"
    "publisher": "New York : Basic Books, c2006.", 
    "series_index": null, 
    "lpath": "Books/Lessig, Lawrence/Code 2.0 - Lawrence Lessig.pdf", 
    "language": "und", 
    "rights": null, 
    "title_sort": "Code 2.0", 
    "cover": null, 
    "book_producer": null, 
    "identifiers": {
      "isbn": "9780465039142"
The thumbnail is a base64 encoded jpg, resized to a height of 68 pixels. Not sure how bad those would look resizing them up to 120px for the cover view (that's what uses the medium version, right?), or if there is base64 decoding support on the device already (presumably jpg to png support is there already, although maybe it relies on uds for that part...).

But the nook driver provides an example of how to put a higher resolution cover (or pair of covers) in the filesystem, and you could move those to .covers when indexing as you suggested if pulling the thumbnail from metadata.calibre turns out not to work or look good.
Mr. X is offline   Reply With Quote