Example #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)
Example #2
0
def get_last_preview():
    g = gphoto2.GPhoto2()

    preview = g.getLastPreview()

    if (preview):
        return static_file(preview, root=(var_root + 'preview'))
    return False
Example #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)
Example #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)
Example #5
0
def list_camera_settings():
    g = gphoto2.GPhoto2()

    result = g.listCameraSettings()

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

    result = g.listFiles()

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

    result = g.takePhoto()

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

    result = g.startPreviews()

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

    result = g.getCameraSetting(path)

    return json.dumps(result, indent=4)