captured 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/captured +1 -1
- data/lib/captured.rb +7 -4
- data/lib/captured/file_tracker.rb +0 -1
- metadata +1 -1
data/bin/captured
CHANGED
@@ -5,7 +5,7 @@ require "#{File.dirname(__FILE__)}/../lib/captured"
|
|
5
5
|
|
6
6
|
options = {:config_file => "#{ENV['HOME']}/.captured.yml",
|
7
7
|
:watch_path => "#{ENV['HOME']}/Desktop/",
|
8
|
-
:watch_pattern => Captured.
|
8
|
+
:watch_pattern => Captured.guess_watch_path,
|
9
9
|
:growl_path => "/usr/local/bin/growlnotify" }
|
10
10
|
|
11
11
|
OptionParser.new do |opts|
|
data/lib/captured.rb
CHANGED
@@ -6,12 +6,15 @@ class Captured
|
|
6
6
|
"#{ENV['HOME']}/.captured.yml"
|
7
7
|
end
|
8
8
|
|
9
|
-
def self.
|
9
|
+
def self.guess_watch_path
|
10
10
|
if `sw_vers | awk '/ProductVersion:/ {print $2}'`.strip.start_with? "10.5"
|
11
|
-
"Picture**.png"
|
12
|
-
else
|
13
|
-
"Screenshot**.png"
|
11
|
+
"Picture**.png"
|
12
|
+
else
|
13
|
+
"Screenshot**.png"
|
14
14
|
end
|
15
|
+
rescue => e
|
16
|
+
puts e
|
17
|
+
"Screenshot**.png"
|
15
18
|
end
|
16
19
|
|
17
20
|
def self.run_once!(options)
|