sony_camera_remote_api 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6375fb3082ba64b715c9274945dc2b6b1dd59886
|
4
|
+
data.tar.gz: 9472f59d3577ccbd5c2e004f4c58b81692559883
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9ba24e31f964de2c2071cd5130bb357fdd64634c5c3856c9aa5b1c7011257baaeb7adcae210ee18f28efe3fd99a9d10893f7718277d684b8d761d1cc7ca3fbf
|
7
|
+
data.tar.gz: c4dac8ad1de4ef5df1db9b0aedf1197e19507746a0fdbbbdd5abc1a49a28ff28a5cc2852cc8fffb8979b1e6d4e6c35971cae2684bf2070b9810ebc61c0ef20cb
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'sony_camera_remote_api'
|
2
2
|
require 'sony_camera_remote_api/logging'
|
3
3
|
require 'sony_camera_remote_api/scripts'
|
4
|
+
require 'sony_camera_remote_api/version'
|
4
5
|
require 'sony_camera_remote_api/client/shelf'
|
5
6
|
require 'fileutils'
|
6
7
|
require 'thor'
|
@@ -364,14 +365,14 @@ module SonyCameraRemoteAPI
|
|
364
365
|
end
|
365
366
|
|
366
367
|
|
367
|
-
desc '
|
368
|
+
desc 'rapid [options]', 'Capture still images continuously'
|
368
369
|
option :mode, type: :string, desc: 'Continuous shooting mode', banner: 'MODE', default: 'Single'
|
369
370
|
option :speed, type: :string, desc: 'Continuous shooting speed', banner: 'MODE'
|
370
371
|
option :time, type: :numeric, desc: 'Recording time (sec)', banner: 'NSEC'
|
371
372
|
still_common_options
|
372
373
|
common_options
|
373
374
|
option :transfer, type: :boolean, desc: 'Transfer postview image', default: false
|
374
|
-
def
|
375
|
+
def rapid
|
375
376
|
init_camera
|
376
377
|
unless @cam.support_group? :ContShootingMode
|
377
378
|
puts 'This camera does not support continuous shooting mode. Exiting...'
|
@@ -633,6 +634,13 @@ module SonyCameraRemoteAPI
|
|
633
634
|
finalize
|
634
635
|
end
|
635
636
|
|
637
|
+
# For 'sonycam --version'
|
638
|
+
map %w[--version -v] => :__print_version
|
639
|
+
|
640
|
+
desc '--version, -v', 'print the version'
|
641
|
+
def __print_version
|
642
|
+
puts SonyCameraRemoteAPI::VERSION
|
643
|
+
end
|
636
644
|
end
|
637
645
|
end
|
638
646
|
end
|
@@ -70,10 +70,10 @@ module SonyCameraRemoteAPI
|
|
70
70
|
if @shelf.get
|
71
71
|
answer = $terminal.ask('Do you want set this camera as default? ') { |q| q.validate = /[yn]/i; q.default = 'y' }
|
72
72
|
if answer == 'y'
|
73
|
-
@shelf.
|
73
|
+
@shelf.select ssid
|
74
74
|
end
|
75
75
|
else
|
76
|
-
@shelf.
|
76
|
+
@shelf.select ssid
|
77
77
|
end
|
78
78
|
|
79
79
|
invoke :list, [], options
|
@@ -131,12 +131,12 @@ module SonyCameraRemoteAPI
|
|
131
131
|
end
|
132
132
|
|
133
133
|
|
134
|
-
desc '
|
135
|
-
def
|
134
|
+
desc 'select <ID or SSID>', 'Select a camera as default'
|
135
|
+
def select(id_or_ssid)
|
136
136
|
read_or_create_shelf
|
137
137
|
|
138
138
|
specified = get_id_or_ssid id_or_ssid
|
139
|
-
@shelf.
|
139
|
+
@shelf.select specified['ssid'] if specified
|
140
140
|
|
141
141
|
invoke :list, [], options
|
142
142
|
end
|
@@ -103,7 +103,7 @@ module SonyCameraRemoteAPI
|
|
103
103
|
|
104
104
|
# Select a camera config as default.
|
105
105
|
# @return [Boolean] +true+ if successfully set default camera, +false+ otherwise.
|
106
|
-
def
|
106
|
+
def select(ssid)
|
107
107
|
entry = get(ssid)
|
108
108
|
if entry
|
109
109
|
@config['default'] = entry['ssid']
|
@@ -114,6 +114,15 @@ module SonyCameraRemoteAPI
|
|
114
114
|
end
|
115
115
|
|
116
116
|
|
117
|
+
# Add a camera config, and select it
|
118
|
+
# @param [Boolean] overwrite Overwrite if the same SSID's config is already added.
|
119
|
+
# @return [Boolean] +true+ if successfully added, +false+ otherwise.
|
120
|
+
def add_and_select(ssid, pass, interface, overwrite: false)
|
121
|
+
add ssid, pass, interface, overwrite: overwrite
|
122
|
+
select ssid
|
123
|
+
end
|
124
|
+
|
125
|
+
|
117
126
|
# Set endpoint information to a camera config.
|
118
127
|
# @return [Boolean] +true+ if successfully set endpoints, +false+ otherwise.
|
119
128
|
def set_endpoints(endpoints, ssid = nil)
|