olympus-camera 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 158ebf508b6efa9abf4952ce8c3721287a7011eaffd05d5e6195593ae9957afa
4
+ data.tar.gz: f0671a8f2f7a68802bb69ba62c62add0de0f0798b66c8290b213703d09cff2f2
5
+ SHA512:
6
+ metadata.gz: d965be2be3a597431813978b3fc015565dc1830c8cad8c7456fce93309330a5799c0d94d84a8f3c0388baa8c20afc49c79d62eb9c1af9c8d9989536a2621619a
7
+ data.tar.gz: 5a4910e6f053c3baafc91d7bcd50c3b6d358dcf9b91e2558152a02c513dcd388b1d6d6549d66c01efc89368d10fe3f3358144127a0b9e696c6ee3ef39ee32f8b
@@ -0,0 +1,71 @@
1
+ ### https://raw.github.com/github/gitignore/218a941be92679ce67d0484547e3e142b2f5f6f0/Ruby.gitignore
2
+
3
+ *.gem
4
+ *.rbc
5
+ /.config
6
+ /coverage/
7
+ /InstalledFiles
8
+ /pkg/
9
+ /spec/reports/
10
+ /spec/examples.txt
11
+ /test/tmp/
12
+ /test/version_tmp/
13
+ /tmp/
14
+
15
+ # Used by dotenv library to load environment variables.
16
+ # .env
17
+
18
+ # Ignore Byebug command history file.
19
+ .byebug_history
20
+
21
+ ## Specific to RubyMotion:
22
+ .dat*
23
+ .repl_history
24
+ build/
25
+ *.bridgesupport
26
+ build-iPhoneOS/
27
+ build-iPhoneSimulator/
28
+
29
+ ## Specific to RubyMotion (use of CocoaPods):
30
+ #
31
+ # We recommend against adding the Pods directory to your .gitignore. However
32
+ # you should judge for yourself, the pros and cons are mentioned at:
33
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
34
+ #
35
+ # vendor/Pods/
36
+
37
+ ## Documentation cache and generated files:
38
+ /.yardoc/
39
+ /_yardoc/
40
+ /doc/
41
+ /rdoc/
42
+
43
+ ## Environment normalization:
44
+ /.bundle/
45
+ /vendor/bundle
46
+ /lib/bundler/man/
47
+
48
+ # for a library or gem, you might want to ignore these files since the code is
49
+ # intended to run in multiple environments; otherwise, check them in:
50
+ Gemfile.lock
51
+ # .ruby-version
52
+ # .ruby-gemset
53
+
54
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
55
+ .rvmrc
56
+
57
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
58
+ # .rubocop-https?--*
59
+
60
+
61
+ /.bundle/
62
+ /.yardoc
63
+ /_yardoc/
64
+ /coverage/
65
+ /doc/
66
+ /pkg/
67
+ /spec/reports/
68
+ /tmp/
69
+
70
+ # rspec failure tracking
71
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.7.0
6
+ before_install: gem install bundler -v 2.1.4
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in olympus-camera.gemspec
4
+ gemspec
5
+
6
+ gem "xml-simple", require: "xmlsimple"
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Yuichi Tateno
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,69 @@
1
+ # OlympusCamera API for ruby
2
+
3
+ OlympusCamera API library for ruby.
4
+
5
+ APIs auto generated by `http://192.168.0.10/get_commandlist.cgi`
6
+
7
+ ## examples
8
+
9
+ - [examples](./examples/)
10
+ - [olympus-camera-dl](https://github.com/hotchpotch/olympus-camera-dl)
11
+ - [source code](https://github.com/hotchpotch/olympus-camera-dl/blob/master/exe/olympus-camera-dl)
12
+
13
+ ## auto generated API docs
14
+
15
+ - [auto_generated_docs](./auto_generated_docs/)
16
+
17
+ ## Installation
18
+
19
+ Add this line to your application's Gemfile:
20
+
21
+ ```ruby
22
+ gem 'olympus-camera'
23
+ ```
24
+
25
+ And then execute:
26
+
27
+ bundle install
28
+
29
+ Or install it yourself as:
30
+
31
+ gem install olympus-camera
32
+
33
+ ### Tips: debugging
34
+
35
+ with [http-dump](https://github.com/hotchpotch/http-dump) gem
36
+
37
+ ```
38
+ [1] pry(main)> require 'http-dump'
39
+ [2] pry(main)> require 'olympus-camera'
40
+ [3] pry(main)> camera = OlympusCamera.new
41
+ [4] pry(main)> HTTPDump.enable!
42
+ [5] pry(main)> camera.get_[tab]
43
+ camera.get_activate camera.get_gpsdivunit camera.get_rsvimglist
44
+ camera.get_caminfo camera.get_image camera.get_screennail
45
+ camera.get_camprop camera.get_imglist camera.get_thumbnail
46
+ camera.get_connectmode camera.get_movplaytime camera.get_unusedcapacity
47
+ camera.get_dcffilenum camera.get_resizeimg
48
+ [5] pry(main)> camera.get_caminfo()
49
+ > GET http://192.168.0.10/get_caminfo.cgi with headers {'Connection'=>'close', 'User-Agent'=>'OlympusCameraKit'}
50
+ < 200 OK
51
+ < Content-Type: text/xml
52
+ < Content-Length: 108
53
+ < Connection: close
54
+ <
55
+ <?xml version="1.0"?>
56
+ <caminfo>
57
+ <model>PEN-F</model>
58
+ <MISOAExpComp>available</MISOAExpComp>
59
+ </caminfo>
60
+ => {"model"=>["PEN-F"], "MISOAExpComp"=>["available"]}
61
+ ```
62
+
63
+ ## Contributing
64
+
65
+ Pull requests are welcome on GitHub at https://github.com/hotchpotch/olympus-camera.
66
+
67
+ ## License
68
+
69
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,222 @@
1
+ # Olympus E-M1MarkII API
2
+
3
+ - `api_list()`
4
+ - `all_images()`
5
+ - `get_image(path)`
6
+
7
+ ## Auto generated API (instance methods)
8
+
9
+ - `cancel_trimresize()`
10
+ - `clear_resvflg({"DIR"=>:__any__})`
11
+ - `exec_erase({"DIR"=>:__any__})`
12
+ - `exec_movietrimresize({"DIR"=>:__any__})`
13
+ - `exec_pwoff({"mode"=>:__any__})`
14
+ - `exec_shutter({"com"=>"1stpush"})`
15
+ - `exec_shutter({"com"=>"2ndpush"})`
16
+ - `exec_shutter({"com"=>"1st2ndpush"})`
17
+ - `exec_shutter({"com"=>"2nd1strelease"})`
18
+ - `exec_shutter({"com"=>"2ndrelease"})`
19
+ - `exec_shutter({"com"=>"1strelease"})`
20
+ - `exec_takemisc({"com"=>"startliveview", "port"=>:__any__})`
21
+ - `exec_takemisc({"com"=>"stopliveview"})`
22
+ - `exec_takemisc({"com"=>"getrecview"})`
23
+ - `exec_takemisc({"com"=>"getlastjpg"})`
24
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"widemove"})`
25
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"telemove"})`
26
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"off"})`
27
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"wideterm"})`
28
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"teleterm"})`
29
+ - `exec_takemisc({"com"=>"supermacromfinaflock", "move"=>"stop", "movement"=>:__any__})`
30
+ - `exec_takemisc({"com"=>"GetShortMoviesAlbumInfo"})`
31
+ - `exec_takemotion({"com"=>"assignafframe", "point"=>:__any__})`
32
+ - `exec_takemotion({"com"=>"releaseafframe"})`
33
+ - `exec_takemotion({"com"=>"takeready", "point"=>:__any__})`
34
+ - `exec_takemotion({"com"=>"starttake", "point"=>:__any__, "exposuremin"=>:__any__, "upperlimit"=>:__any__})`
35
+ - `exec_takemotion({"com"=>"stoptake"})`
36
+ - `exec_takemotion({"com"=>"startmovietake", "limitter"=>:__any__, "liveview"=>"on"})`
37
+ - `exec_takemotion({"com"=>"stopmovietake"})`
38
+ - `exit_moviestream()`
39
+ - `get_activate()`
40
+ - `get_caminfo()`
41
+ - `get_camprop({"com"=>"desc", "propname"=>"touchactiveframe"})`
42
+ - `get_camprop({"com"=>"desc", "propname"=>"takemode"})`
43
+ - `get_camprop({"com"=>"desc", "propname"=>"drivemode"})`
44
+ - `get_camprop({"com"=>"desc", "propname"=>"focalvalue"})`
45
+ - `get_camprop({"com"=>"desc", "propname"=>"expcomp"})`
46
+ - `get_camprop({"com"=>"desc", "propname"=>"shutspeedvalue"})`
47
+ - `get_camprop({"com"=>"desc", "propname"=>"isospeedvalue"})`
48
+ - `get_camprop({"com"=>"desc", "propname"=>"wbvalue"})`
49
+ - `get_camprop({"com"=>"desc", "propname"=>"noisereduction"})`
50
+ - `get_camprop({"com"=>"desc", "propname"=>"lowvibtime"})`
51
+ - `get_camprop({"com"=>"desc", "propname"=>"bulbtimelimit"})`
52
+ - `get_camprop({"com"=>"desc", "propname"=>"artfilter "})`
53
+ - `get_camprop({"com"=>"desc", "propname"=>"digitaltelecon"})`
54
+ - `get_camprop({"com"=>"desc", "propname"=>"exposemovie"})`
55
+ - `get_camprop({"com"=>"desc", "propname"=>"cameradrivemode"})`
56
+ - `get_camprop({"com"=>"desc", "propname"=>"colorphase"})`
57
+ - `get_camprop({"com"=>"desc", "propname"=>"QualityMovie2"})`
58
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelShort"})`
59
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelSet1"})`
60
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelSet2"})`
61
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelSet3"})`
62
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelSet4"})`
63
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelCustom"})`
64
+ - `get_camprop({"com"=>"desc", "propname"=>"CompShort"})`
65
+ - `get_camprop({"com"=>"desc", "propname"=>"CompSet1"})`
66
+ - `get_camprop({"com"=>"desc", "propname"=>"CompSet2"})`
67
+ - `get_camprop({"com"=>"desc", "propname"=>"CompSet3"})`
68
+ - `get_camprop({"com"=>"desc", "propname"=>"CompSet4"})`
69
+ - `get_camprop({"com"=>"desc", "propname"=>"CompCustom"})`
70
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateShort"})`
71
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateSet1"})`
72
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateSet2"})`
73
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateSet3"})`
74
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateSet4"})`
75
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateCustom"})`
76
+ - `get_camprop({"com"=>"desc", "propname"=>"RecordTimeShort"})`
77
+ - `get_camprop({"com"=>"desc", "propname"=>"RecordTimeCustom"})`
78
+ - `get_camprop({"com"=>"desc", "propname"=>"NoiseReductionExposureTime"})`
79
+ - `get_camprop({"com"=>"desc", "propname"=>"SilentNoiseReduction"})`
80
+ - `get_camprop({"com"=>"desc", "propname"=>"SilentTime"})`
81
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypePopart"})`
82
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypeRoughMonochrome"})`
83
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypeToyPhoto"})`
84
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypeDaydream"})`
85
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypeCrossProcess"})`
86
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypeDramaticTone"})`
87
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypeLigneClair"})`
88
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypePastel"})`
89
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypeMiniature"})`
90
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypeVintage"})`
91
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypePartcolor"})`
92
+ - `get_camprop({"com"=>"desc", "propname"=>"ValidMediaSlot"})`
93
+ - `get_camprop({"com"=>"desc", "propname"=>"ArtEffectTypeBleachBypass"})`
94
+ - `get_camprop({"com"=>"desc", "propname"=>"desclist"})`
95
+ - `get_camprop({"com"=>"get", "propname"=>"touchactiveframe"})`
96
+ - `get_camprop({"com"=>"get", "propname"=>"takemode"})`
97
+ - `get_camprop({"com"=>"get", "propname"=>"drivemode"})`
98
+ - `get_camprop({"com"=>"get", "propname"=>"focalvalue"})`
99
+ - `get_camprop({"com"=>"get", "propname"=>"expcomp"})`
100
+ - `get_camprop({"com"=>"get", "propname"=>"shutspeedvalue"})`
101
+ - `get_camprop({"com"=>"get", "propname"=>"isospeedvalue"})`
102
+ - `get_camprop({"com"=>"get", "propname"=>"wbvalue"})`
103
+ - `get_camprop({"com"=>"get", "propname"=>"noisereduction"})`
104
+ - `get_camprop({"com"=>"get", "propname"=>"lowvibtime"})`
105
+ - `get_camprop({"com"=>"get", "propname"=>"bulbtimelimit"})`
106
+ - `get_camprop({"com"=>"get", "propname"=>"artfilter "})`
107
+ - `get_camprop({"com"=>"get", "propname"=>"digitaltelecon"})`
108
+ - `get_camprop({"com"=>"get", "propname"=>"exposemovie"})`
109
+ - `get_camprop({"com"=>"get", "propname"=>"cameradrivemode"})`
110
+ - `get_camprop({"com"=>"get", "propname"=>"colorphase"})`
111
+ - `get_camprop({"com"=>"get", "propname"=>"PixelShort"})`
112
+ - `get_camprop({"com"=>"get", "propname"=>"PixelSet1"})`
113
+ - `get_camprop({"com"=>"get", "propname"=>"PixelSet2"})`
114
+ - `get_camprop({"com"=>"get", "propname"=>"PixelSet3"})`
115
+ - `get_camprop({"com"=>"get", "propname"=>"PixelSet4"})`
116
+ - `get_camprop({"com"=>"get", "propname"=>"PixelCustom"})`
117
+ - `get_camprop({"com"=>"get", "propname"=>"CompShort"})`
118
+ - `get_camprop({"com"=>"get", "propname"=>"CompSet1"})`
119
+ - `get_camprop({"com"=>"get", "propname"=>"CompSet2"})`
120
+ - `get_camprop({"com"=>"get", "propname"=>"CompSet3"})`
121
+ - `get_camprop({"com"=>"get", "propname"=>"CompSet4"})`
122
+ - `get_camprop({"com"=>"get", "propname"=>"CompCustom"})`
123
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateShort"})`
124
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateSet1"})`
125
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateSet2"})`
126
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateSet3"})`
127
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateSet4"})`
128
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateCustom"})`
129
+ - `get_camprop({"com"=>"get", "propname"=>"RecordTimeShort"})`
130
+ - `get_camprop({"com"=>"get", "propname"=>"RecordTimeCustom"})`
131
+ - `get_camprop({"com"=>"get", "propname"=>"SilentNoiseReduction"})`
132
+ - `get_camprop({"com"=>"get", "propname"=>"SilentTime"})`
133
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypePopart"})`
134
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypeRoughMonochrome"})`
135
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypeToyPhoto"})`
136
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypeDaydream"})`
137
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypeCrossProcess"})`
138
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypeDramaticTone"})`
139
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypeLigneClair"})`
140
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypePastel"})`
141
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypeMiniature"})`
142
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypeVintage"})`
143
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypePartcolor"})`
144
+ - `get_camprop({"com"=>"get", "propname"=>"ValidMediaSlot"})`
145
+ - `get_camprop({"com"=>"get", "propname"=>"ArtEffectTypeBleachBypass"})`
146
+ - `get_camprop({"com"=>"check", "propname"=>"PixelShort"})`
147
+ - `get_camprop({"com"=>"check", "propname"=>"PixelSet1"})`
148
+ - `get_camprop({"com"=>"check", "propname"=>"PixelSet2"})`
149
+ - `get_camprop({"com"=>"check", "propname"=>"PixelSet3"})`
150
+ - `get_camprop({"com"=>"check", "propname"=>"PixelSet4"})`
151
+ - `get_camprop({"com"=>"check", "propname"=>"PixelCustom"})`
152
+ - `get_camprop({"com"=>"check", "propname"=>"CompShort"})`
153
+ - `get_camprop({"com"=>"check", "propname"=>"CompSet1"})`
154
+ - `get_camprop({"com"=>"check", "propname"=>"CompSet2"})`
155
+ - `get_camprop({"com"=>"check", "propname"=>"CompSet3"})`
156
+ - `get_camprop({"com"=>"check", "propname"=>"CompSet4"})`
157
+ - `get_camprop({"com"=>"check", "propname"=>"CompCustom"})`
158
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateShort"})`
159
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateSet1"})`
160
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateSet2"})`
161
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateSet3"})`
162
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateSet4"})`
163
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateCustom"})`
164
+ - `get_camprop({"com"=>"check", "propname"=>"ValidMediaSlot"})`
165
+ - `get_connectmode()`
166
+ - `get_dcffilenum()`
167
+ - `get_exif({"DIR"=>:__any__})`
168
+ - `get_gpsdivunit()`
169
+ - `get_imglist({"DIR"=>:__any__})`
170
+ - `get_movfileinfo({"DIR"=>:__any__})`
171
+ - `get_moviestream1frame({"DIR"=>:__any__})`
172
+ - `get_moviestreaminfo()`
173
+ - `get_movplaytime({"DIR"=>:__any__})`
174
+ - `get_playtargetslot()`
175
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"1024"})`
176
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"1600"})`
177
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"1920"})`
178
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"2048"})`
179
+ - `get_rsvimglist()`
180
+ - `get_screennail({"DIR"=>:__any__})`
181
+ - `get_thumbnail({"DIR"=>:__any__})`
182
+ - `get_trimresizeprocstatus()`
183
+ - `get_unusedcapacity()`
184
+ - `ready_moviestream()`
185
+ - `req_attachexifgps()`
186
+ - `req_storegpsinfo({"mode"=>:__any__, "date"=>:__any__})`
187
+ - `set_camprop({"com"=>"set", "propname"=>"takemode"})`
188
+ - `set_camprop({"com"=>"set", "propname"=>"drivemode"})`
189
+ - `set_camprop({"com"=>"set", "propname"=>"focalvalue"})`
190
+ - `set_camprop({"com"=>"set", "propname"=>"expcomp"})`
191
+ - `set_camprop({"com"=>"set", "propname"=>"shutspeedvalue"})`
192
+ - `set_camprop({"com"=>"set", "propname"=>"isospeedvalue"})`
193
+ - `set_camprop({"com"=>"set", "propname"=>"wbvalue"})`
194
+ - `set_camprop({"com"=>"set", "propname"=>"artfilter "})`
195
+ - `set_camprop({"com"=>"set", "propname"=>"exposemovie"})`
196
+ - `set_camprop({"com"=>"set", "propname"=>"colorphase"})`
197
+ - `set_camprop({"com"=>"set", "propname"=>"SceneSub"})`
198
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypePopart"})`
199
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypeRoughMonochrome"})`
200
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypeToyPhoto"})`
201
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypeDaydream"})`
202
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypeCrossProcess"})`
203
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypeDramaticTone"})`
204
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypeLigneClair"})`
205
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypePastel"})`
206
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypeMiniature"})`
207
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypeVintage"})`
208
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypePartcolor"})`
209
+ - `set_camprop({"com"=>"set", "propname"=>"ArtEffectTypeBleachBypass"})`
210
+ - `set_playtargetslot({"targetslot"=>"1"})`
211
+ - `set_playtargetslot({"targetslot"=>"2"})`
212
+ - `set_utctimediff({"utctime"=>:__any__, "diff"=>:__any__})`
213
+ - `start_moviestream()`
214
+ - `start_moviestreamts()`
215
+ - `stop_moviestream()`
216
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"0320x0240"})`
217
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"0640x0480"})`
218
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"0800x0600"})`
219
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"1024x0768"})`
220
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"1280x0960"})`
221
+ - `switch_cammode({"mode"=>"play"})`
222
+ - `switch_cammode({"mode"=>"shutter"})`
@@ -0,0 +1,154 @@
1
+ # Olympus E-M1MarkIII API
2
+
3
+ - `api_list()`
4
+ - `all_images()`
5
+ - `get_image(path)`
6
+
7
+ ## Auto generated API (instance methods)
8
+
9
+ - `OLYClearConnectPCInfo()`
10
+ - `OLYGetConnectPCInfo()`
11
+ - `OLYSetConnectPCInfo()`
12
+ - `cancel_trimresize()`
13
+ - `clear_cameralogdata()`
14
+ - `clear_resvflg({"DIR"=>:__any__})`
15
+ - `exec_erase({"DIR"=>:__any__})`
16
+ - `exec_movietrimresize({"DIR"=>:__any__})`
17
+ - `exec_pwoff({"mode"=>"withble"})`
18
+ - `exec_reboot()`
19
+ - `exec_shutter({"com"=>"1stpush"})`
20
+ - `exec_shutter({"com"=>"2ndpush"})`
21
+ - `exec_shutter({"com"=>"1st2ndpush"})`
22
+ - `exec_shutter({"com"=>"2nd1strelease"})`
23
+ - `exec_shutter({"com"=>"2ndrelease"})`
24
+ - `exec_shutter({"com"=>"1strelease"})`
25
+ - `exec_takemisc({"com"=>"startliveview", "port"=>:__any__})`
26
+ - `exec_takemisc({"com"=>"stopliveview"})`
27
+ - `exec_takemisc({"com"=>"getrecview"})`
28
+ - `exec_takemisc({"com"=>"getlastjpg"})`
29
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"widemove"})`
30
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"telemove"})`
31
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"off"})`
32
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"wideterm"})`
33
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"teleterm"})`
34
+ - `exec_takemisc({"com"=>"supermacromfinaflock", "move"=>"stop", "movement"=>:__any__})`
35
+ - `exec_takemisc({"com"=>"MovieThroughStart"})`
36
+ - `exec_takemisc({"com"=>"MovieThroughStop"})`
37
+ - `exec_takemisc({"com"=>"GetShortMoviesAlbumInfo"})`
38
+ - `exec_takemisc({"com"=>"GetMovieSetting"})`
39
+ - `exec_takemotion({"com"=>"assignafframe", "point"=>:__any__})`
40
+ - `exec_takemotion({"com"=>"releaseafframe"})`
41
+ - `exec_takemotion({"com"=>"takeready", "point"=>:__any__})`
42
+ - `exec_takemotion({"com"=>"starttake", "point"=>:__any__, "exposuremin"=>:__any__, "upperlimit"=>:__any__})`
43
+ - `exec_takemotion({"com"=>"stoptake"})`
44
+ - `exec_takemotion({"com"=>"startmovietake", "limitter"=>:__any__, "liveview"=>"on"})`
45
+ - `exec_takemotion({"com"=>"stopmovietake"})`
46
+ - `exit_moviestream()`
47
+ - `fwup_check()`
48
+ - `fwup_getfirmstatus()`
49
+ - `fwup_getversions()`
50
+ - `fwup_sendinfo()`
51
+ - `fwup_sendsplit()`
52
+ - `fwup_update()`
53
+ - `fwup_updatemode()`
54
+ - `get_activate()`
55
+ - `get_cameraloginfo()`
56
+ - `get_caminfo()`
57
+ - `get_camprop({"com"=>"desc", "propname"=>"touchactiveframe"})`
58
+ - `get_camprop({"com"=>"desc", "propname"=>"takemode"})`
59
+ - `get_camprop({"com"=>"desc", "propname"=>"drivemode"})`
60
+ - `get_camprop({"com"=>"desc", "propname"=>"focalvalue"})`
61
+ - `get_camprop({"com"=>"desc", "propname"=>"expcomp"})`
62
+ - `get_camprop({"com"=>"desc", "propname"=>"shutspeedvalue"})`
63
+ - `get_camprop({"com"=>"desc", "propname"=>"isospeedvalue"})`
64
+ - `get_camprop({"com"=>"desc", "propname"=>"wbvalue"})`
65
+ - `get_camprop({"com"=>"desc", "propname"=>"noisereduction"})`
66
+ - `get_camprop({"com"=>"desc", "propname"=>"lowvibtime"})`
67
+ - `get_camprop({"com"=>"desc", "propname"=>"bulbtimelimit"})`
68
+ - `get_camprop({"com"=>"desc", "propname"=>"digitaltelecon"})`
69
+ - `get_camprop({"com"=>"desc", "propname"=>"exposemovie"})`
70
+ - `get_camprop({"com"=>"desc", "propname"=>"cameradrivemode"})`
71
+ - `get_camprop({"com"=>"desc", "propname"=>"colorphase"})`
72
+ - `get_camprop({"com"=>"desc", "propname"=>"QualityMovie2"})`
73
+ - `get_camprop({"com"=>"desc", "propname"=>"NoiseReductionExposureTime"})`
74
+ - `get_camprop({"com"=>"desc", "propname"=>"SilentNoiseReduction"})`
75
+ - `get_camprop({"com"=>"desc", "propname"=>"SilentTime"})`
76
+ - `get_camprop({"com"=>"desc", "propname"=>"ValidMediaSlot"})`
77
+ - `get_camprop({"com"=>"desc", "propname"=>"desclist"})`
78
+ - `get_camprop({"com"=>"get", "propname"=>"touchactiveframe"})`
79
+ - `get_camprop({"com"=>"get", "propname"=>"takemode"})`
80
+ - `get_camprop({"com"=>"get", "propname"=>"drivemode"})`
81
+ - `get_camprop({"com"=>"get", "propname"=>"focalvalue"})`
82
+ - `get_camprop({"com"=>"get", "propname"=>"expcomp"})`
83
+ - `get_camprop({"com"=>"get", "propname"=>"shutspeedvalue"})`
84
+ - `get_camprop({"com"=>"get", "propname"=>"isospeedvalue"})`
85
+ - `get_camprop({"com"=>"get", "propname"=>"wbvalue"})`
86
+ - `get_camprop({"com"=>"get", "propname"=>"noisereduction"})`
87
+ - `get_camprop({"com"=>"get", "propname"=>"lowvibtime"})`
88
+ - `get_camprop({"com"=>"get", "propname"=>"bulbtimelimit"})`
89
+ - `get_camprop({"com"=>"get", "propname"=>"digitaltelecon"})`
90
+ - `get_camprop({"com"=>"get", "propname"=>"exposemovie"})`
91
+ - `get_camprop({"com"=>"get", "propname"=>"cameradrivemode"})`
92
+ - `get_camprop({"com"=>"get", "propname"=>"SilentNoiseReduction"})`
93
+ - `get_camprop({"com"=>"get", "propname"=>"SilentTime"})`
94
+ - `get_camprop({"com"=>"get", "propname"=>"ValidMediaSlot"})`
95
+ - `get_camprop({"com"=>"check", "propname"=>"ValidMediaSlot"})`
96
+ - `get_connectmode()`
97
+ - `get_dcffilenum()`
98
+ - `get_exif({"DIR"=>:__any__})`
99
+ - `get_extmysetmode()`
100
+ - `get_gpsdivunit()`
101
+ - `get_imglist({"DIR"=>:__any__})`
102
+ - `get_movfileinfo({"DIR"=>:__any__})`
103
+ - `get_moviestream1frame({"DIR"=>:__any__})`
104
+ - `get_moviestreaminfo()`
105
+ - `get_movplaytime({"DIR"=>:__any__})`
106
+ - `get_mysetbackupstate()`
107
+ - `get_mysetdatamodekind()`
108
+ - `get_mysetdatasize()`
109
+ - `get_mysetrestorestate()`
110
+ - `get_partialcameralogdata()`
111
+ - `get_partialmysetdata()`
112
+ - `get_playtargetslot()`
113
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"1024"})`
114
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"1600"})`
115
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"1920"})`
116
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"2048"})`
117
+ - `get_rsvimglist()`
118
+ - `get_screennail({"DIR"=>:__any__})`
119
+ - `get_thumbnail({"DIR"=>:__any__})`
120
+ - `get_trimresizeprocstatus()`
121
+ - `get_unusedcapacity()`
122
+ - `ready_moviestream()`
123
+ - `req_attachexifgps()`
124
+ - `req_storegpsinfo({"mode"=>:__any__, "date"=>:__any__})`
125
+ - `request_getmysetdata()`
126
+ - `request_restoremysetdata()`
127
+ - `send_partialmysetdata()`
128
+ - `set_camprop({"com"=>"set", "propname"=>"takemode"})`
129
+ - `set_camprop({"com"=>"set", "propname"=>"drivemode"})`
130
+ - `set_camprop({"com"=>"set", "propname"=>"focalvalue"})`
131
+ - `set_camprop({"com"=>"set", "propname"=>"expcomp"})`
132
+ - `set_camprop({"com"=>"set", "propname"=>"shutspeedvalue"})`
133
+ - `set_camprop({"com"=>"set", "propname"=>"isospeedvalue"})`
134
+ - `set_camprop({"com"=>"set", "propname"=>"wbvalue"})`
135
+ - `set_camprop({"com"=>"set", "propname"=>"exposemovie"})`
136
+ - `set_camprop({"com"=>"set", "propname"=>"colorphase"})`
137
+ - `set_camprop({"com"=>"set", "propname"=>"SceneSub"})`
138
+ - `set_mysetdatasize()`
139
+ - `set_playtargetslot({"targetslot"=>"1"})`
140
+ - `set_playtargetslot({"targetslot"=>"2"})`
141
+ - `set_timeout({"timeoutsec"=>:__any__})`
142
+ - `set_utctimediff({"utctime"=>:__any__, "diff"=>:__any__})`
143
+ - `start_moviestream()`
144
+ - `start_moviestreamts()`
145
+ - `stop_moviestream()`
146
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"0320x0240"})`
147
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"0640x0480"})`
148
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"0800x0600"})`
149
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"1024x0768"})`
150
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"1280x0960"})`
151
+ - `switch_cammode({"mode"=>"play"})`
152
+ - `switch_cammode({"mode"=>"shutter"})`
153
+ - `switch_cammode({"mode"=>"maintenance"})`
154
+ - `switch_cammode({"mode"=>"cameralog"})`
@@ -0,0 +1,158 @@
1
+ # Olympus PEN-F API
2
+
3
+ - `api_list()`
4
+ - `all_images()`
5
+ - `get_image(path)`
6
+
7
+ ## Auto generated API (instance methods)
8
+
9
+ - `clear_resvflg()`
10
+ - `exec_pwoff()`
11
+ - `exec_shutter({"com"=>"1stpush"})`
12
+ - `exec_shutter({"com"=>"2ndpush"})`
13
+ - `exec_shutter({"com"=>"1st2ndpush"})`
14
+ - `exec_shutter({"com"=>"2nd1strelease"})`
15
+ - `exec_shutter({"com"=>"2ndrelease"})`
16
+ - `exec_shutter({"com"=>"1strelease"})`
17
+ - `exec_takemisc({"com"=>"startliveview", "port"=>:__any__})`
18
+ - `exec_takemisc({"com"=>"stopliveview"})`
19
+ - `exec_takemisc({"com"=>"getrecview"})`
20
+ - `exec_takemisc({"com"=>"getlastjpg"})`
21
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"widemove"})`
22
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"telemove"})`
23
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"off"})`
24
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"wideterm"})`
25
+ - `exec_takemisc({"com"=>"ctrlzoom", "move"=>"teleterm"})`
26
+ - `exec_takemisc({"com"=>"GetShortMoviesAlbumInfo"})`
27
+ - `exec_takemotion({"com"=>"assignafframe", "point"=>:__any__})`
28
+ - `exec_takemotion({"com"=>"releaseafframe"})`
29
+ - `exec_takemotion({"com"=>"takeready", "point"=>:__any__})`
30
+ - `exec_takemotion({"com"=>"starttake", "point"=>:__any__, "exposuremin"=>:__any__, "upperlimit"=>:__any__})`
31
+ - `exec_takemotion({"com"=>"stoptake"})`
32
+ - `exec_takemotion({"com"=>"startmovietake", "limitter"=>:__any__, "liveview"=>"on"})`
33
+ - `exec_takemotion({"com"=>"stopmovietake"})`
34
+ - `get_activate()`
35
+ - `get_caminfo()`
36
+ - `get_camprop({"com"=>"desc", "propname"=>"touchactiveframe"})`
37
+ - `get_camprop({"com"=>"desc", "propname"=>"takemode"})`
38
+ - `get_camprop({"com"=>"desc", "propname"=>"drivemode"})`
39
+ - `get_camprop({"com"=>"desc", "propname"=>"focalvalue"})`
40
+ - `get_camprop({"com"=>"desc", "propname"=>"expcomp"})`
41
+ - `get_camprop({"com"=>"desc", "propname"=>"shutspeedvalue"})`
42
+ - `get_camprop({"com"=>"desc", "propname"=>"isospeedvalue"})`
43
+ - `get_camprop({"com"=>"desc", "propname"=>"wbvalue"})`
44
+ - `get_camprop({"com"=>"desc", "propname"=>"noisereduction"})`
45
+ - `get_camprop({"com"=>"desc", "propname"=>"lowvibtime"})`
46
+ - `get_camprop({"com"=>"desc", "propname"=>"bulbtimelimit"})`
47
+ - `get_camprop({"com"=>"desc", "propname"=>"digitaltelecon"})`
48
+ - `get_camprop({"com"=>"desc", "propname"=>"cameradrivemode"})`
49
+ - `get_camprop({"com"=>"desc", "propname"=>"exposemovie"})`
50
+ - `get_camprop({"com"=>"desc", "propname"=>"colorphase"})`
51
+ - `get_camprop({"com"=>"desc", "propname"=>"QualityMovie2"})`
52
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelShort"})`
53
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelSet1"})`
54
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelSet2"})`
55
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelSet3"})`
56
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelSet4"})`
57
+ - `get_camprop({"com"=>"desc", "propname"=>"PixelCustom"})`
58
+ - `get_camprop({"com"=>"desc", "propname"=>"CompShort"})`
59
+ - `get_camprop({"com"=>"desc", "propname"=>"CompSet1"})`
60
+ - `get_camprop({"com"=>"desc", "propname"=>"CompSet2"})`
61
+ - `get_camprop({"com"=>"desc", "propname"=>"CompSet3"})`
62
+ - `get_camprop({"com"=>"desc", "propname"=>"CompSet4"})`
63
+ - `get_camprop({"com"=>"desc", "propname"=>"CompCustom"})`
64
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateShort"})`
65
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateSet1"})`
66
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateSet2"})`
67
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateSet3"})`
68
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateSet4"})`
69
+ - `get_camprop({"com"=>"desc", "propname"=>"FrameRateCustom"})`
70
+ - `get_camprop({"com"=>"desc", "propname"=>"RecordTimeShort"})`
71
+ - `get_camprop({"com"=>"desc", "propname"=>"RecordTimeCustom"})`
72
+ - `get_camprop({"com"=>"desc", "propname"=>"NoiseReductionExposureTime"})`
73
+ - `get_camprop({"com"=>"desc", "propname"=>"SilentNoiseReduction"})`
74
+ - `get_camprop({"com"=>"desc", "propname"=>"SilentTime"})`
75
+ - `get_camprop({"com"=>"desc", "propname"=>"desclist"})`
76
+ - `get_camprop({"com"=>"get", "propname"=>"touchactiveframe"})`
77
+ - `get_camprop({"com"=>"get", "propname"=>"takemode"})`
78
+ - `get_camprop({"com"=>"get", "propname"=>"drivemode"})`
79
+ - `get_camprop({"com"=>"get", "propname"=>"focalvalue"})`
80
+ - `get_camprop({"com"=>"get", "propname"=>"expcomp"})`
81
+ - `get_camprop({"com"=>"get", "propname"=>"shutspeedvalue"})`
82
+ - `get_camprop({"com"=>"get", "propname"=>"isospeedvalue"})`
83
+ - `get_camprop({"com"=>"get", "propname"=>"wbvalue"})`
84
+ - `get_camprop({"com"=>"get", "propname"=>"noisereduction"})`
85
+ - `get_camprop({"com"=>"get", "propname"=>"lowvibtime"})`
86
+ - `get_camprop({"com"=>"get", "propname"=>"bulbtimelimit"})`
87
+ - `get_camprop({"com"=>"get", "propname"=>"digitaltelecon"})`
88
+ - `get_camprop({"com"=>"get", "propname"=>"cameradrivemode"})`
89
+ - `get_camprop({"com"=>"get", "propname"=>"exposemovie"})`
90
+ - `get_camprop({"com"=>"get", "propname"=>"colorphase"})`
91
+ - `get_camprop({"com"=>"get", "propname"=>"QualityMovie2"})`
92
+ - `get_camprop({"com"=>"get", "propname"=>"PixelShort"})`
93
+ - `get_camprop({"com"=>"get", "propname"=>"PixelSet1"})`
94
+ - `get_camprop({"com"=>"get", "propname"=>"PixelSet2"})`
95
+ - `get_camprop({"com"=>"get", "propname"=>"PixelSet3"})`
96
+ - `get_camprop({"com"=>"get", "propname"=>"PixelSet4"})`
97
+ - `get_camprop({"com"=>"get", "propname"=>"PixelCustom"})`
98
+ - `get_camprop({"com"=>"get", "propname"=>"CompShort"})`
99
+ - `get_camprop({"com"=>"get", "propname"=>"CompSet1"})`
100
+ - `get_camprop({"com"=>"get", "propname"=>"CompSet2"})`
101
+ - `get_camprop({"com"=>"get", "propname"=>"CompSet3"})`
102
+ - `get_camprop({"com"=>"get", "propname"=>"CompSet4"})`
103
+ - `get_camprop({"com"=>"get", "propname"=>"CompCustom"})`
104
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateShort"})`
105
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateSet1"})`
106
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateSet2"})`
107
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateSet3"})`
108
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateSet4"})`
109
+ - `get_camprop({"com"=>"get", "propname"=>"FrameRateCustom"})`
110
+ - `get_camprop({"com"=>"get", "propname"=>"RecordTimeShort"})`
111
+ - `get_camprop({"com"=>"get", "propname"=>"RecordTimeCustom"})`
112
+ - `get_camprop({"com"=>"get", "propname"=>"NoiseReductionExposureTime"})`
113
+ - `get_camprop({"com"=>"get", "propname"=>"SilentNoiseReduction"})`
114
+ - `get_camprop({"com"=>"get", "propname"=>"SilentTime"})`
115
+ - `get_camprop({"com"=>"check", "propname"=>"CompShort"})`
116
+ - `get_camprop({"com"=>"check", "propname"=>"CompSet1"})`
117
+ - `get_camprop({"com"=>"check", "propname"=>"CompSet2"})`
118
+ - `get_camprop({"com"=>"check", "propname"=>"CompSet3"})`
119
+ - `get_camprop({"com"=>"check", "propname"=>"CompSet4"})`
120
+ - `get_camprop({"com"=>"check", "propname"=>"CompCustom"})`
121
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateShort"})`
122
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateSet1"})`
123
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateSet2"})`
124
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateSet3"})`
125
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateSet4"})`
126
+ - `get_camprop({"com"=>"check", "propname"=>"FrameRateCustom"})`
127
+ - `get_connectmode()`
128
+ - `get_dcffilenum()`
129
+ - `get_gpsdivunit()`
130
+ - `get_imglist({"DIR"=>:__any__})`
131
+ - `get_movplaytime({"DIR"=>:__any__})`
132
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"1024"})`
133
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"1600"})`
134
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"1920"})`
135
+ - `get_resizeimg({"DIR"=>:__any__, "size"=>"2048"})`
136
+ - `get_rsvimglist()`
137
+ - `get_screennail({"DIR"=>:__any__})`
138
+ - `get_thumbnail({"DIR"=>:__any__})`
139
+ - `get_unusedcapacity()`
140
+ - `req_attachexifgps()`
141
+ - `req_storegpsinfo({"mode"=>:__any__, "date"=>:__any__})`
142
+ - `set_camprop({"com"=>"set", "propname"=>"takemode"})`
143
+ - `set_camprop({"com"=>"set", "propname"=>"drivemode"})`
144
+ - `set_camprop({"com"=>"set", "propname"=>"focalvalue"})`
145
+ - `set_camprop({"com"=>"set", "propname"=>"expcomp"})`
146
+ - `set_camprop({"com"=>"set", "propname"=>"shutspeedvalue"})`
147
+ - `set_camprop({"com"=>"set", "propname"=>"isospeedvalue"})`
148
+ - `set_camprop({"com"=>"set", "propname"=>"wbvalue"})`
149
+ - `set_camprop({"com"=>"set", "propname"=>"exposemovie"})`
150
+ - `set_camprop({"com"=>"set", "propname"=>"colorphase"})`
151
+ - `set_utctimediff({"utctime"=>:__any__, "diff"=>:__any__})`
152
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"0320x0240"})`
153
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"0640x0480"})`
154
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"0800x0600"})`
155
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"1024x0768"})`
156
+ - `switch_cammode({"mode"=>"rec", "lvqty"=>"1280x0960"})`
157
+ - `switch_cammode({"mode"=>"play"})`
158
+ - `switch_cammode({"mode"=>"shutter"})`
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "olympus/camera"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,28 @@
1
+ require "olympus-camera"
2
+
3
+ camera = OlympusCamera.new
4
+ model = camera.get_caminfo["model"]
5
+
6
+ puts <<-DOC
7
+ # Olympus #{model ? model[0] : ""} API
8
+
9
+ - `api_list()`
10
+ - `all_images()`
11
+ - `get_image(path)`
12
+
13
+ ## Auto generated API (instance methods)
14
+
15
+ DOC
16
+
17
+ generated_api_methods = camera.api_list.map do |list|
18
+ name, args = list
19
+ if args && args.length > 0
20
+ args.map { |args|
21
+ "#{name}(#{args.pretty_print_inspect})"
22
+ }
23
+ else
24
+ "#{name}()"
25
+ end
26
+ end.flatten
27
+
28
+ puts generated_api_methods.map { |m| "- `#{m}`" }.join("\n")
@@ -0,0 +1,35 @@
1
+ require "olympus-camera"
2
+
3
+ camera = OlympusCamera.new
4
+ model = camera.get_caminfo["model"]
5
+
6
+ puts "Hi, #{model[0]}!"
7
+
8
+ camera.switch_cammode({ "mode" => "play" })
9
+ images = camera.all_images
10
+
11
+ camera.switch_cammode({ "mode" => "shutter" })
12
+ puts "Take a photo!"
13
+ camera.exec_shutter({ "com" => "1st2ndpush" })
14
+ sleep 2
15
+
16
+ camera.exec_shutter({ "com" => "2nd1strelease" })
17
+ puts "Finished"
18
+ sleep 1
19
+ camera.switch_cammode({ "mode" => "play" })
20
+ after_images = camera.all_images
21
+
22
+ new_images = after_images - images
23
+
24
+ if new_images
25
+ puts "found new image(s):"
26
+ puts new_images.join("\n")
27
+ puts "download image(s):"
28
+ new_images.each do |image|
29
+ filename = image.split("/")[-1]
30
+ puts "GET: #{image}"
31
+ data = camera.get_image(image)
32
+ puts "WRITE: #{filename} (#{data.size} byte)"
33
+ open(filename, "w") { |f| f.puts data }
34
+ end
35
+ end
@@ -0,0 +1,130 @@
1
+ require "uri"
2
+ require "net/http"
3
+ require "olympus-camera/version"
4
+ require "olympus-camera/any"
5
+ require "olympus-camera/commands_parser"
6
+ require "xmlsimple"
7
+ require "open-uri"
8
+
9
+ class OlympusCamera
10
+ class APIError < StandardError; end
11
+
12
+ DEFAULT_HEADERS = {
13
+ "Connection" => "close",
14
+ "User-Agent" => "OlympusCameraKit",
15
+ }
16
+
17
+ DEFAULT_TIMEOUT = {
18
+ open: 1,
19
+ read: 10,
20
+ }
21
+
22
+ attr_accessor :api_host, :open_timeout, :read_timeout
23
+ attr_reader :commands, :api_version, :support_funcs
24
+
25
+ def initialize(commandlist_xml: nil, api_host: "http://192.168.0.10")
26
+ self.open_timeout = DEFAULT_TIMEOUT[:open]
27
+ self.read_timeout = DEFAULT_TIMEOUT[:read]
28
+
29
+ self.api_host = api_host
30
+ parsed_commands = CommandsParser.parse(commandlist_xml || self.raw_get_commandlist.body)
31
+ self.generate_api! parsed_commands
32
+ end
33
+
34
+ def generate_api!(parsed_commands)
35
+ @api_version = parsed_commands[:api_version]
36
+ @support_funcs = parsed_commands[:support_funcs]
37
+ @commands = parsed_commands[:commands]
38
+
39
+ @commands.each do |name, command_args|
40
+ define_singleton_method(name) do |query = nil, headers: {}, raw_result: false|
41
+ cgi_request(command: name, method: command_args[:method], query: query, headers: headers, raw_result: raw_result)
42
+ end
43
+ end
44
+ end
45
+
46
+ def api_list
47
+ @commands.map do |name, command_args|
48
+ queries = command_args[:queries]
49
+ if (queries.length > 0)
50
+ params = queries.map { |query| query.to_h }
51
+ [name.to_s, params]
52
+ else
53
+ [name.to_s]
54
+ end
55
+ end.sort
56
+ end
57
+
58
+ def all_images
59
+ pathes = parse_filelist self.get_imglist({ "DIR" => "/DCIM" })
60
+ pathes.map do |path|
61
+ parse_filelist(
62
+ self.get_imglist({ "DIR" => path.join("/") })
63
+ ).map { |d| d.join("/") }
64
+ end.flatten
65
+ end
66
+
67
+ def get_image(path_or_params)
68
+ path = path_or_params.kind_of?(Hash) ? path_or_params["DIR"] : path_or_params
69
+ uri = URI.parse(api_host)
70
+ uri.path = path
71
+ uri.read
72
+ end
73
+
74
+ def parse_filelist(source)
75
+ if source.match /^VER_100/
76
+ source.split(/\r?\n/)[1..-1].map do |line|
77
+ line.split(",")[0, 2]
78
+ end
79
+ else
80
+ []
81
+ end
82
+ end
83
+
84
+ def raw_get_commandlist
85
+ cgi_request(command: :get_commandlist, method: :get, raw_result: true)
86
+ end
87
+
88
+ def cgi_request(command:, method:, query: nil, headers: {}, raw_result: false)
89
+ uri = URI.parse(api_host)
90
+ uri.path = "/#{command}.cgi"
91
+ http = Net::HTTP.new(uri.host, uri.port)
92
+ http.open_timeout = self.open_timeout
93
+ http.read_timeout = self.read_timeout
94
+ http.use_ssl = uri.scheme === "https"
95
+
96
+ headers = DEFAULT_HEADERS.merge(headers)
97
+ path = uri.path
98
+
99
+ if method.to_sym == :post
100
+ req = Net::HTTP::Post.new(path)
101
+ if query
102
+ req.set_form_data query
103
+ end
104
+ elsif method.to_sym == :get
105
+ if query
106
+ path = path + "?" + URI.encode_www_form(query)
107
+ end
108
+ req = Net::HTTP::Get.new(path)
109
+ else
110
+ raise ArgumentError.new("method: #{method} is unknown.")
111
+ end
112
+
113
+ req.initialize_http_header(headers)
114
+ res = http.request(req)
115
+
116
+ if raw_result
117
+ return res
118
+ end
119
+
120
+ if res.code.to_i >= 400
121
+ raise APIError.new("API Error: " + res.inspect)
122
+ else
123
+ if res.content_type&.include?("/xml") && res.body.length > 10
124
+ XmlSimple.xml_in res.body
125
+ else
126
+ res.body
127
+ end
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,3 @@
1
+ class OlympusCamera
2
+ ANY = :__any__
3
+ end
@@ -0,0 +1,110 @@
1
+ require "xmlsimple"
2
+ require "olympus-camera/any"
3
+
4
+ class OlympusCamera
5
+ module CommandsParser
6
+ module_function
7
+
8
+ def parse(xml)
9
+ raw_commands = XmlSimple.xml_in xml
10
+ api_version = raw_commands["version"][0]
11
+ support_funcs = raw_commands["support"].map { |v| v["func"] }
12
+ commands = normalize_cgi_commands raw_commands["cgi"]
13
+ {
14
+ api_version: api_version,
15
+ support_funcs: support_funcs,
16
+ commands: commands,
17
+ }
18
+ end
19
+
20
+ def normalize_cgi_commands(cgi_commands)
21
+ commands = {}
22
+ cgi_commands.each do |data|
23
+ name = data["name"].to_sym
24
+ http_method = data["http_method"] && data["http_method"][0]
25
+ if http_method
26
+ method = http_method["type"].to_sym
27
+ queries = get_pair_queries(http_method)
28
+
29
+ commands[name] = {
30
+ method: method,
31
+ queries: queries,
32
+ }
33
+ else
34
+ # e-m1-mark2.xml: cancel_trimresize
35
+ commands[name] = {
36
+ method: :get,
37
+ queries: [],
38
+ }
39
+ end
40
+ end
41
+ commands
42
+ end
43
+
44
+ def tail_array(array, r = [])
45
+ array.each { |a|
46
+ if a[0] && a[0].kind_of?(Array)
47
+ tail_array a, r
48
+ else
49
+ r << a
50
+ end
51
+ }
52
+ r
53
+ end
54
+
55
+ def get_pair_queries(root)
56
+ qs = append_queries_walk_node([], [root])
57
+ qs.map { |q|
58
+ Array.new((q.length / 2).floor).map { [q.shift, q.shift] }
59
+ }
60
+ end
61
+
62
+ def append_queries_walk_node(queries, nodes, n = 1)
63
+ q = nodes.map do |node|
64
+ commands = node["cmd#{n}"]
65
+ commands_1 = node["cmd#{n + 1}"]
66
+ name = node["name"]
67
+ if commands
68
+ if queries.length % 2 == 1 && !name
69
+ queries = queries + [ANY]
70
+ end
71
+ appended = append_queries_walk_node(name ? queries + [name] : queries, commands, n)
72
+ if commands_1
73
+ # for
74
+ # <param1 name="startmovietake">
75
+ # <cmd2 name="limitter"/>
76
+ # <cmd3 name="liveview">
77
+ # <param3 name="on"/>
78
+ # </cmd3>
79
+ # </param1
80
+ target = node.clone
81
+ target.delete("cmd#{n}")
82
+ target.delete("name")
83
+ appended = (appended + append_queries_walk_node([], [target], n + 1)).flatten
84
+ end
85
+ appended
86
+ elsif commands_1
87
+ appended = append_queries_walk_node([], commands_1, n)
88
+ queries + [name, ANY] + appended.flatten
89
+ else
90
+ params = node["param#{n}"]
91
+ if params && name
92
+ append_queries_walk_node(
93
+ queries + [name], params, n + 1
94
+ )
95
+ elsif name
96
+ if queries.length % 2 == 0
97
+ queries + [name, ANY]
98
+ else
99
+ queries + [name]
100
+ end
101
+ elsif params
102
+ else
103
+ nil
104
+ end
105
+ end
106
+ end.select { |a| a }
107
+ tail_array(q)
108
+ end
109
+ end
110
+ end
@@ -0,0 +1,4 @@
1
+
2
+ class OlympusCamera
3
+ VERSION = "0.1.0"
4
+ end
@@ -0,0 +1,33 @@
1
+ require_relative "lib/olympus-camera/version"
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "olympus-camera"
5
+ spec.version = OlympusCamera::VERSION
6
+ spec.authors = ["Yuichi Tateno"]
7
+ spec.email = ["hotchpotch@gmail.com"]
8
+
9
+ spec.summary = %q{Olympus Camera's API library}
10
+ spec.description = %q{Olympus Camera's API library}
11
+ spec.homepage = "https://github.com/hotchpotch/olympus-camera/"
12
+ spec.license = "MIT"
13
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
14
+
15
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ # spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
19
+ # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
20
+
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
24
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ end
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_dependency "xml-simple", "~> 1"
31
+ spec.add_development_dependency "rake", "~> 12.0"
32
+ spec.add_development_dependency "rspec", "~> 3.0"
33
+ end
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: olympus-camera
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Yuichi Tateno
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-11-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: xml-simple
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '12.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '12.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description: Olympus Camera's API library
56
+ email:
57
+ - hotchpotch@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".travis.yml"
65
+ - Gemfile
66
+ - LICENSE.txt
67
+ - README.md
68
+ - Rakefile
69
+ - auto_generated_docs/e-m1-mark2.md
70
+ - auto_generated_docs/e-m1-mark3.md
71
+ - auto_generated_docs/pen-f.md
72
+ - bin/console
73
+ - bin/setup
74
+ - examples/generate_api_doc.rb
75
+ - examples/take_photo.rb
76
+ - lib/olympus-camera.rb
77
+ - lib/olympus-camera/any.rb
78
+ - lib/olympus-camera/commands_parser.rb
79
+ - lib/olympus-camera/version.rb
80
+ - olympus-camera.gemspec
81
+ homepage: https://github.com/hotchpotch/olympus-camera/
82
+ licenses:
83
+ - MIT
84
+ metadata:
85
+ homepage_uri: https://github.com/hotchpotch/olympus-camera/
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: 2.5.0
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubygems_version: 3.1.2
102
+ signing_key:
103
+ specification_version: 4
104
+ summary: Olympus Camera's API library
105
+ test_files: []