olympus-camera-dl 0.1.0 → 0.2.0

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
  SHA256:
3
- metadata.gz: 1a6b1809246a4b0d1f3266fec95914929fdab81c04069383708fd7fbc909b850
4
- data.tar.gz: d2ed7d8a29dab5453f9ada421d2972cb085ed54157cad337fbcf64b7e50c8a14
3
+ metadata.gz: 415a2daba8695ced7df0a04d84ad29c1e362317549bbfbb9ec4eed1904052a6d
4
+ data.tar.gz: d2b984e228f427b917cf84d26ec050b6e3c887090a5b9485ccdff3c53bdc1a22
5
5
  SHA512:
6
- metadata.gz: 29cd1ec4fa66653c4ffbce9d695488f94b977d349234b11f5c7591a69458c588987ef48224b5ef7a226a7995a7987817c9540f89d450ef84b756ae9ed09e4fdf
7
- data.tar.gz: 1ee2024435702cf18bb62da1b6f534cb3fb01c037b03555f9069d25713ecb7dd9ea48d0ef9bfb2b1ea1b4131a90e9fa550f4223fa0374b6f59fe30b064420a7e
6
+ metadata.gz: a140cbe26408473591880e741ff1914bc0a34dfb65d49e22b7d967b02f63d25db8fe8820c27a2f0ee8963cd308e2b51274c47806938aada97be455c6907597df
7
+ data.tar.gz: bc5810e61cf5237aedffe5ea84f2dc7df475f0a68a8f34bbf05a6992ffc0db27c32aba4140b1e918a068ff5c27cef40e0d6569047e18156a335aca4072f4069f
data/README.md CHANGED
@@ -20,6 +20,8 @@ Usage: olympus-camela-dl [options] ./photo-download-dir/
20
20
  -e, --ext [EXTNAME] set download ext name, example: -e "jpg" or -e "oft"
21
21
  -s, --skip skip download image when image exists
22
22
  -p, --power-off camera power off when finished
23
+ -V, --verbose verbose debug messages
24
+
23
25
  ```
24
26
 
25
27
  ```
@@ -30,7 +32,8 @@ ERROR: Can't connect to camera
30
32
 
31
33
  $ olympus-camera-dl -c 2 --delete --power-off /home/pi/photos/E-M1MarkII/
32
34
  Connected: E-M1MarkII
33
- Target camera 11 images found
35
+ Use SD card slot: 2
36
+ 11 images found
34
37
  [1/11] DOWNLOAD: /DCIM/101OLYMP/PB202134.JPG
35
38
  [1/11] WRITE: /home/pi/photos/E-M1MarkII/PB202134.JPG (4,517,267 byte)
36
39
  [1/11] DELETED: /DCIM/101OLYMP/PB202134.JPG on camera
@@ -1,13 +1,17 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "olympus-camera"
4
+ require "olympus-camera-dl"
4
5
  require "optparse"
5
6
  require "pathname"
7
+ require "http-dump"
6
8
 
7
9
  Signal.trap(:INT) { exit 1 }
8
10
 
9
11
  options = {}
10
12
 
13
+ Version = OlympusCameraDl::VERSION
14
+
11
15
  opt = OptionParser.new
12
16
 
13
17
  opt.on("--delete", "delete images on camera after download") {
@@ -30,6 +34,10 @@ opt.on("-p", "--power-off", "camera power off when finished") {
30
34
  options[:power_off] = true
31
35
  }
32
36
 
37
+ opt.on("-V", "--verbose", "verbose debug messages") {
38
+ HTTPDump.enable!
39
+ }
40
+
33
41
  opt.banner = "Usage: olympus-camela-dl [options] ./photo-download-dir/"
34
42
 
35
43
  opt.parse!(ARGV)
@@ -54,6 +62,7 @@ puts "Connected: #{model[0]}"
54
62
  if options[:slot]
55
63
  if camera.respond_to? :set_playtargetslot
56
64
  camera.set_playtargetslot({ "targetslot" => options[:slot] })
65
+ puts "Use SD card slot: #{options[:slot]}"
57
66
  else
58
67
  puts "Can't call camera.set_playtargetslot API, skip"
59
68
  end
@@ -71,7 +80,7 @@ def num_format(n)
71
80
  n.to_s.reverse.scan(/(..?.?)/).join(",").reverse
72
81
  end
73
82
 
74
- puts "Target camera #{images.length} images found"
83
+ puts "#{images.length} images found"
75
84
 
76
85
  if options[:delete]
77
86
  if !camera.respond_to? :exec_erase
@@ -0,0 +1,3 @@
1
+ module OlympusCameraDl
2
+ VERSION = "0.2.0"
3
+ end
@@ -1,6 +1,8 @@
1
+ require_relative "lib/olympus-camera-dl"
2
+
1
3
  Gem::Specification.new do |spec|
2
4
  spec.name = "olympus-camera-dl"
3
- spec.version = "0.1.0"
5
+ spec.version = OlympusCameraDl::VERSION
4
6
  spec.authors = ["Yuichi Tateno"]
5
7
  spec.email = ["hotchpotch@gmail.com"]
6
8
 
@@ -26,5 +28,6 @@ Gem::Specification.new do |spec|
26
28
  spec.require_paths = ["lib"]
27
29
 
28
30
  spec.add_dependency "olympus-camera", "~> 0"
31
+ spec.add_dependency "http-dump", "~> 0"
29
32
  spec.add_development_dependency "rake", "~> 12.0"
30
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: olympus-camera-dl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuichi Tateno
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-20 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: olympus-camera
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: http-dump
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -54,6 +68,7 @@ files:
54
68
  - bin/console
55
69
  - bin/setup
56
70
  - exe/olympus-camera-dl
71
+ - lib/olympus-camera-dl.rb
57
72
  - olympus-camera-dl.gemspec
58
73
  homepage: https://github.com/hotchpotch/olympus-camera-dl
59
74
  licenses: