Exemplo n.º 1
0
def get_pictures(sheet_name_or_ix,
                 book_name_or_ix=None,
                 fullname_or_name=None,
                 pid=None):
    book = get_book_object(fullname_or_name, book_name_or_ix, pid)
    sheet = get_sheet_object(book, sheet_name_or_ix)
    return jsonify(pictures=[serialize_picture(pic) for pic in sheet.pictures])
Exemplo n.º 2
0
def get_picture(sheet_name_or_ix,
                picture_name_or_ix,
                book_name_or_ix=None,
                fullname_or_name=None,
                pid=None):
    book = get_book_object(fullname_or_name, book_name_or_ix, pid)
    sheet = get_sheet_object(book, sheet_name_or_ix)
    pic = int(picture_name_or_ix) if picture_name_or_ix.isdigit(
    ) else picture_name_or_ix
    return jsonify(serialize_picture(sheet.pictures[pic]))
Exemplo n.º 3
0
def get_picture(sheet_name_or_ix, picture_name_or_ix, book_name_or_ix=None, fullname_or_name=None, pid=None):
    book = get_book_object(fullname_or_name, book_name_or_ix, pid)
    sheet = get_sheet_object(book, sheet_name_or_ix)
    pic = int(picture_name_or_ix) if picture_name_or_ix.isdigit() else picture_name_or_ix
    return jsonify(serialize_picture(sheet.pictures[pic]))
Exemplo n.º 4
0
def get_pictures(sheet_name_or_ix, book_name_or_ix=None, fullname_or_name=None, pid=None):
    book = get_book_object(fullname_or_name, book_name_or_ix, pid)
    sheet = get_sheet_object(book, sheet_name_or_ix)
    return jsonify(pictures=[serialize_picture(pic) for pic in sheet.pictures])