Ejemplo n.º 1
0
def capture_image():
	
	timestring = 'gphoto_' + time.strftime('%Y%m%d_%H%M%S') + '.jpg'
	capture = gphoto.execute(['--set-config', '/main/actions/autofocusdrive=1', '--capture-image-and-download'])	
	if "capt0000.jpg" in capture:
		# move the image to the static folder
		shutil.copy('capt0000.jpg', 'static/' + timestring)
		os.remove('capt0000.jpg')
		return timestring
		
	return "false"
Ejemplo n.º 2
0
def capture_image():

    timestring = 'gphoto_' + time.strftime('%Y%m%d_%H%M%S') + '.jpg'
    capture = gphoto.execute([
        '--set-config', '/main/actions/autofocusdrive=1',
        '--capture-image-and-download'
    ])
    if "capt0000.jpg" in capture:
        # move the image to the static folder
        shutil.copy('capt0000.jpg', 'static/' + timestring)
        os.remove('capt0000.jpg')
        return timestring

    return "false"
Ejemplo n.º 3
0
def storage_info():
	return gphoto.execute(['--storage-info'])
Ejemplo n.º 4
0
def capture_preview():
	capture = gphoto.execute(['--set-config', '/main/actions/autofocusdrive=1', '--capture-preview'])
Ejemplo n.º 5
0
def get_config():	
	querystring = request.query.configkey.strip()
	return gphoto.execute(['--get-config', querystring])		
Ejemplo n.º 6
0
def storage_info():
    return gphoto.execute(['--storage-info'])
Ejemplo n.º 7
0
def capture_preview():
    capture = gphoto.execute([
        '--set-config', '/main/actions/autofocusdrive=1', '--capture-preview'
    ])
Ejemplo n.º 8
0
def get_config():
    querystring = request.query.configkey.strip()
    return gphoto.execute(['--get-config', querystring])