tlapse 0.0.3 → 0.0.6

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: 4f38dea1d38bcfa04d9f5edae58bbb6edbb2bd0b
4
- data.tar.gz: ae50f3bb860573a693ccf3e4325ab28244a6bb7f
3
+ metadata.gz: eab9b586439d82883ccc5ac792d4ffb540fe23aa
4
+ data.tar.gz: 89a788b123c3c8f6c0f133b85e119a8be4afe208
5
5
  SHA512:
6
- metadata.gz: f2f889e2bc030a1f2c2c2026386c840c61560d474621cb41e824067e4c9de0b520e8192f1a262f68eae2c6c67d6cd3e7b14568c2178d50b72eb2f85ca429a809
7
- data.tar.gz: d723d67179c9fe1cb49e4310749a123c9222e7ce1412d6575a12a86ac6c73e44dea16c6735aaa4db96f44c99f07fffd68da8f480214e64f6134d6db22a685dc3
6
+ metadata.gz: 75c5ca5477bd8ee703feaefb0c6694b79d028c425ae1d217a76a378ebc729795eca6563f8f3dba96c5608e90a9db71a841dc43cd151b2b60a3b6fae7023f8b31
7
+ data.tar.gz: 1cca071ea1e326b27d4cd37fac079295fdc7190468b688f16e5b4a55e9e9030fa6ef092c630bf97d5dd0270b9c96d6584ed223edd9d115dddd2254ad551c1338
data/bin/tlapse CHANGED
@@ -1,19 +1,29 @@
1
- #!/usr/bin/ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
- require "slop"
3
+ require "gli"
4
4
  require "byebug"
5
+
5
6
  require_relative "../lib/tlapse"
6
7
 
7
- opts = Slop.parse do |o|
8
- o.on "-v", "--version", "print the version" do
9
- puts Tlapse::VERSION
10
- exit
8
+ include GLI::App
9
+ include Tlapse
10
+
11
+ program_desc "Automated time lapse photography via gphoto2"
12
+ version Tlapse::VERSION
13
+
14
+ desc "Determine whether you are ready to start capturing"
15
+ command :doctor do |c|
16
+ c.action do |global_options,options,args|
17
+ doctor
11
18
  end
19
+ end
12
20
 
13
- o.on "-h", "--help", "print this dialog" do
14
- puts o
15
- exit
21
+ desc "Capture a single photo, saving it to the current directory"
22
+ command :single do |c|
23
+ c.action do |global_options,options,args|
24
+ capture_single
16
25
  end
17
26
  end
18
27
 
19
- puts opts
28
+ exit run(ARGV)
29
+
@@ -0,0 +1,8 @@
1
+ module Tlapse
2
+ module Capture
3
+ def capture_single
4
+ puts "Capturing single image"
5
+ # TODO: Actually capture image
6
+ end
7
+ end # Capture
8
+ end # Tlapse
@@ -0,0 +1,17 @@
1
+ module Tlapse
2
+ module Doctor
3
+ def doctor
4
+ print "Checking gphoto2..."
5
+ if `which gphoto2`.empty?
6
+ raise "Could not find gphoto2 :("
7
+ end
8
+ puts "ok!"
9
+
10
+ print "Checking camera..."
11
+ # TODO: Check camera
12
+ puts "ok!"
13
+
14
+ puts "Looks good!"
15
+ end
16
+ end # Doctor
17
+ end # Tlapse
@@ -1,3 +1,3 @@
1
1
  module Tlapse
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/tlapse.rb CHANGED
@@ -1,5 +1,10 @@
1
1
  require_relative "tlapse/version"
2
+ require_relative "tlapse/doctor"
3
+ require_relative "tlapse/capture"
4
+
5
+ include Tlapse::Doctor
6
+ include Tlapse::Capture
2
7
 
3
8
  module Tlapse
4
- # Your code goes here...
9
+
5
10
  end
data/tlapse.gemspec CHANGED
@@ -23,5 +23,5 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rspec", "~> 3.0"
24
24
  spec.add_development_dependency "byebug", "~> 8.2"
25
25
 
26
- spec.add_dependency "slop", "~> 4.2"
26
+ spec.add_dependency "gli", "~> 2.13"
27
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tlapse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Toniazzo
@@ -67,19 +67,19 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '8.2'
69
69
  - !ruby/object:Gem::Dependency
70
- name: slop
70
+ name: gli
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '4.2'
75
+ version: '2.13'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '4.2'
82
+ version: '2.13'
83
83
  description:
84
84
  email:
85
85
  - jutonz42@gmail.com
@@ -100,6 +100,8 @@ files:
100
100
  - bin/setup
101
101
  - bin/tlapse
102
102
  - lib/tlapse.rb
103
+ - lib/tlapse/capture.rb
104
+ - lib/tlapse/doctor.rb
103
105
  - lib/tlapse/version.rb
104
106
  - tlapse.gemspec
105
107
  homepage: https://github.com/jutonz/tlapse