ruby_axe 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +7 -2
- data/lib/ruby_axe/screen_capture.rb +16 -0
- data/lib/ruby_axe/utilities.rb +4 -0
- data/lib/ruby_axe.rb +1 -1
- metadata +3 -3
- data/lib/ruby_axe/screen_recorder.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73f4c5e0aa8b5fa22b2ad4f737fa53da81014bbf95e37b23d473e9ed515ebd23
|
4
|
+
data.tar.gz: f166c61d23f09c1d565932c2bbe0b27081fb663ed6ca235050c7cc609a14359b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cc239ebb160054168dfa1d2312d1a314724b6a5fbf6171b9d04f4f7c3359c84d2e995f82b7d6c31196fed9092e40d26d853305d634110cc2b601867683d0715
|
7
|
+
data.tar.gz: 19ea850a2051d42bdc50d298143038f2548f1db2c9e5037048a23b30e698a9fe74e10837c3c6fbf9a1e53946a17af5e05b334c7190b5b4b936fbc80958a69ef3
|
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
require "rspec/core/rake_task"
|
5
5
|
require_relative 'lib/ruby_axe/application'
|
6
|
-
require_relative 'lib/ruby_axe/
|
6
|
+
require_relative 'lib/ruby_axe/screen_capture'
|
7
7
|
require_relative 'lib/ruby_axe/window'
|
8
8
|
|
9
9
|
RSpec::Core::RakeTask.new(:spec)
|
@@ -36,5 +36,10 @@ end
|
|
36
36
|
|
37
37
|
desc 'Record screen'
|
38
38
|
task :record do
|
39
|
-
|
39
|
+
ScreenCapture.new.record('test.mov', 10)
|
40
|
+
end
|
41
|
+
|
42
|
+
desc 'Take a screenshot'
|
43
|
+
task :screenshot do
|
44
|
+
ScreenCapture.new.screenshot('pic.png')
|
40
45
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative 'application'
|
2
|
+
|
3
|
+
module RubyAxe
|
4
|
+
class ScreenCapture < Application
|
5
|
+
def initialize(name = 'screencapture')
|
6
|
+
super(name)
|
7
|
+
end
|
8
|
+
|
9
|
+
def record(output, seconds = 0, delay = 0)
|
10
|
+
screenshot(output, delay, " -V #{seconds + 5} ")
|
11
|
+
end
|
12
|
+
def screenshot(output, delay = 0, video = '')
|
13
|
+
shell("\"#{name} -T #{delay} #{video} #{output}\"")
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/ruby_axe/utilities.rb
CHANGED
data/lib/ruby_axe.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_axe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aguspe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem gives you an easy option to use applescript to control your
|
14
14
|
MacOS
|
@@ -27,7 +27,7 @@ files:
|
|
27
27
|
- Rakefile
|
28
28
|
- lib/ruby_axe.rb
|
29
29
|
- lib/ruby_axe/application.rb
|
30
|
-
- lib/ruby_axe/
|
30
|
+
- lib/ruby_axe/screen_capture.rb
|
31
31
|
- lib/ruby_axe/utilities.rb
|
32
32
|
- lib/ruby_axe/window.rb
|
33
33
|
- sig/ruby_axe.rbs
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require_relative 'application'
|
2
|
-
|
3
|
-
module RubyAxe
|
4
|
-
class ScreenRecorder < Application
|
5
|
-
def initialize
|
6
|
-
super('QuickTime Player')
|
7
|
-
end
|
8
|
-
|
9
|
-
def record(seconds, path)
|
10
|
-
tell(" \"#{name}\" \n start new screen recording \n delay #{seconds} \n stop new screen recording \n #{output_path(path)}")
|
11
|
-
end
|
12
|
-
|
13
|
-
def output_path(path)
|
14
|
-
"set newDoc to last item of (documents whose name contains \"Untitled\") \n
|
15
|
-
export newDoc in \"#{path}\" using settings preset \"Quicktime Movie\" \n"
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|