コード例 #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])