'Iterator over the books in the old pre 0.4.0 database.'

@staticmethod
def books_in_old_database(path):

    conn = sqlite.connect(path)
    cur = conn.execute('select    *    from    books_meta    order    by    id;')
    book = cur.fetchone()
    while book:
        id = book[0]
        meta = {'title': book[1], 'authors': book[2], 'publisher': book[3], 'tags': book[5], 'comments': book[7], 'rating': book[8], 'timestamp': datetime.datetime.strptime(book[6], '%Y-%m-%d    %H:%M:%S')}
        cover = {}
        query = conn.execute('select    uncompressed_size,    data    from    books_cover    where    id=?', (id,)).fetchone()
        if query:
            cover = {'uncompressed_size': query[0], 'data': query[1]}
        query = conn.execute('select    extension,    uncompressed_size,    data    from    books_data    where    id=?', (id,)).fetchall()
        formats = {}
        for row in query:
            formats[row[0]] = {'uncompressed_size': row[1], 'data': row[2]}
        (yield (meta, cover, formats))
        book = cur.fetchone()
