



from Ft.Ods import Database


def Dump(dbName):

    db = Database.Database()
    db.open(dbName)

    tx = db.new()
    tx.begin()

    for bm in db.lookup('bookmarks'):
        print "Bookmark: %s" % bm.url
        print "  Description: %s" % bm.description
        print "  Categories:" % bm.categories
        for c in bm.categories:
            print "    %s" % c
        print

    tx.abort()







if __name__ == '__main__':

    import sys
    dbName = sys.argv[1]
    Dump(dbName)
