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