Esempio n. 1
0
def set_setting_option(path):
    g = gphoto2.GPhoto2()
    value = request.POST['value']

    result = g.setCameraSetting(path, value)

    return json.dumps(result, indent=4)
Esempio n. 2
0
def get_last_preview():
    g = gphoto2.GPhoto2()

    preview = g.getLastPreview()

    if (preview):
        return static_file(preview, root=(var_root + 'preview'))
    return False
Esempio n. 3
0
def get_thumbnail(path):
    g = gphoto2.GPhoto2()

    result = g.getThumbnail(path)

    if result:
        return static_file(result, root=(var_root + 'cache/thumbs'))
    else:
        return json.dumps(result, indent=4)
Esempio n. 4
0
def get_jpeg(path):
    g = gphoto2.GPhoto2()

    result = g.getJpeg(path)

    if result:
        return static_file(result, root=(var_root + 'cache/jpegs'))
    else:
        return json.dumps(result, indent=4)
Esempio n. 5
0
def list_camera_settings():
    g = gphoto2.GPhoto2()

    result = g.listCameraSettings()

    return json.dumps(result, indent=4)
Esempio n. 6
0
def list_files():
    g = gphoto2.GPhoto2()

    result = g.listFiles()

    return json.dumps(result, indent=4)
Esempio n. 7
0
def take_photo():
    g = gphoto2.GPhoto2()

    result = g.takePhoto()

    return json.dumps(result, indent=4)
Esempio n. 8
0
def start_previews():
    g = gphoto2.GPhoto2()

    result = g.startPreviews()

    return json.dumps(result, indent=4)
Esempio n. 9
0
def get_camera_setting(path):
    g = gphoto2.GPhoto2()

    result = g.getCameraSetting(path)

    return json.dumps(result, indent=4)