sony_camera_remote_api 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07641246ad67933b0db1b774054e8370cb2e0a3d
4
- data.tar.gz: 53708aaad639d29ab749b946f661627704e13813
3
+ metadata.gz: 6375fb3082ba64b715c9274945dc2b6b1dd59886
4
+ data.tar.gz: 9472f59d3577ccbd5c2e004f4c58b81692559883
5
5
  SHA512:
6
- metadata.gz: 2e5907a4ce53ecfb1a4ccddee974ae687cc586a42c733c1bc208e05dbff17a5595bae603b5da4381a7a53dad9e0df246bf3aac51a97a62b458903deb496fa663
7
- data.tar.gz: 82456f6634df3edef58d04bcae163492f9879777ad5e0e5d56b6a28036716019d8be1514e9dcaf2f6bb06b40d2e6efccee06fbf226ca064b653f8acb44ac8293
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 'cont [options]', 'Capture still images continuously'
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 cont
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.use ssid
73
+ @shelf.select ssid
74
74
  end
75
75
  else
76
- @shelf.use ssid
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 'use <ID or SSID>', 'Select a camera as default'
135
- def use(id_or_ssid)
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.use specified['ssid'] if specified
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 use(ssid)
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)
@@ -1,3 +1,3 @@
1
1
  module SonyCameraRemoteAPI
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sony_camera_remote_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - kota65535