예제 #1
0
파일: camerapi.py 프로젝트: ONE75/CameraPi
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"
예제 #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"
예제 #3
0
파일: camerapi.py 프로젝트: ONE75/CameraPi
def storage_info():
	return gphoto.execute(['--storage-info'])
예제 #4
0
파일: camerapi.py 프로젝트: ONE75/CameraPi
def capture_preview():
	capture = gphoto.execute(['--set-config', '/main/actions/autofocusdrive=1', '--capture-preview'])
예제 #5
0
파일: camerapi.py 프로젝트: ONE75/CameraPi
def get_config():	
	querystring = request.query.configkey.strip()
	return gphoto.execute(['--get-config', querystring])		
예제 #6
0
def storage_info():
    return gphoto.execute(['--storage-info'])
예제 #7
0
def capture_preview():
    capture = gphoto.execute([
        '--set-config', '/main/actions/autofocusdrive=1', '--capture-preview'
    ])
예제 #8
0
def get_config():
    querystring = request.query.configkey.strip()
    return gphoto.execute(['--get-config', querystring])