[Booki-dev] list-books.json

Douglas Bagnall douglas at paradise.net.nz
Wed Aug 11 22:48:19 PDT 2010


On 12/08/10 16:47, Lachlan Musicman wrote:

> Ooooh, isn't that exactly what Andycat's flossmanuals iphone app takes to
> grab the books?


Ah yes, though he uses slightly different information and wants it to
be sensibly formatted, whereas I aimed for a small lazy patch as a
prototype.

To be precise, Andy's example looks like this:

[
  {
    "title": "Firefox",
    "author": "Firefox manual authors",
    "url": "http://objavi.flossmanuals.net/books/Firefox-en-2010.07.31-14.58.41.epub"
  },
]

while mine currently looks like this:

[
  {
    "pk": 14, 
    "model": "editor.book", 
    "fields": {
        "url_title": "firefox", 
        "title":     "FIREFOX"
    }
  }
]

That weird stuff like "pk" is Django's idea.  "url_title" is the Booki
term for the book's ID in url space.

It should be simple enough to unify the two, though it could be
expensive on the Booki side (because it would mean pulling in the
metadata table to get author names), and I'm not entirely sure how
Andy's epub urls would be calculated.

Well spotted.

Douglas



More information about the Booki-dev mailing list