airplay-cli 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/air +5 -1
- data/lib/airplay/cli.rb +66 -0
- metadata +5 -5
data/bin/air
CHANGED
@@ -10,9 +10,11 @@ begin
|
|
10
10
|
"--wait" => lambda { |sec| @wait = sec.to_i },
|
11
11
|
"--interactive" => lambda { @interactive = true },
|
12
12
|
|
13
|
+
"help" => Airplay::CLI.method(:help),
|
14
|
+
|
13
15
|
"list" => Airplay::CLI.method(:list),
|
14
16
|
|
15
|
-
"version" =>
|
17
|
+
"version" => Airplay::CLI.method(:version),
|
16
18
|
|
17
19
|
"play" => lambda { |video|
|
18
20
|
options = { device: @device || Airplay.devices.first }
|
@@ -28,6 +30,8 @@ begin
|
|
28
30
|
Airplay::CLI.view(file, options)
|
29
31
|
}
|
30
32
|
|
33
|
+
Airplay::CLI.help if ARGV.empty?
|
34
|
+
|
31
35
|
rescue Airplay::Browser::NoDevicesFound
|
32
36
|
puts "No devices found."
|
33
37
|
rescue Interrupt
|
data/lib/airplay/cli.rb
CHANGED
@@ -9,6 +9,35 @@ module Airplay
|
|
9
9
|
#
|
10
10
|
module CLI
|
11
11
|
class << self
|
12
|
+
# Public: Shows CLI help
|
13
|
+
#
|
14
|
+
# Returns nothing.
|
15
|
+
#
|
16
|
+
def help
|
17
|
+
Airplay.configuration.load
|
18
|
+
puts <<-EOS.gsub!(" "*10, "")
|
19
|
+
Usage: air [OPTIONS] ACTION [URL OR PATH]
|
20
|
+
|
21
|
+
Command line for the apple tv.
|
22
|
+
Example: air play my_video.mov
|
23
|
+
|
24
|
+
Actions:
|
25
|
+
|
26
|
+
list - Lists the available devices in the network.
|
27
|
+
help - This help.
|
28
|
+
version - The current airplay-cli version.
|
29
|
+
play - Plays a local or remote video.
|
30
|
+
view - Shows an image or a folder of images, can be an url.
|
31
|
+
|
32
|
+
Options:
|
33
|
+
|
34
|
+
--device - Name of the device where it should be played (Default: The first one)
|
35
|
+
--wait - The wait time for playing an slideshow (Default: 3)
|
36
|
+
--interactive - Control the slideshow using left and right arrows.
|
37
|
+
|
38
|
+
EOS
|
39
|
+
end
|
40
|
+
|
12
41
|
# Public: Lists all the devices to STDOUT
|
13
42
|
#
|
14
43
|
# Returns nothing.
|
@@ -18,6 +47,7 @@ module Airplay
|
|
18
47
|
puts <<-EOS.gsub(/^\s{12}/,'')
|
19
48
|
* #{device.name} (#{device.info.model} running #{device.info.os_version})
|
20
49
|
ip: #{device.ip}
|
50
|
+
type: #{device.type}
|
21
51
|
resolution: #{device.info.resolution}
|
22
52
|
|
23
53
|
EOS
|
@@ -76,6 +106,42 @@ module Airplay
|
|
76
106
|
end
|
77
107
|
end
|
78
108
|
|
109
|
+
# Public: Shows the current CLI version
|
110
|
+
#
|
111
|
+
# Returns nothing
|
112
|
+
#
|
113
|
+
def version
|
114
|
+
Airplay.configuration.load
|
115
|
+
v = Airplay::CLI::VERSION
|
116
|
+
puts <<-EOS
|
117
|
+
|
118
|
+
i@@@@@@@@@@@@@@@@@@@@@@@@@
|
119
|
+
i80000000000000000000000000000
|
120
|
+
i80000000000000000000000000000000G
|
121
|
+
i8000000000000000000000000000000000000
|
122
|
+
i80000000000000000000000000000000000000000
|
123
|
+
@00000 @0000000000000000000000000000000000000@ 000000@
|
124
|
+
@0000008 @000000000000000000000000000000000@ 80000000@
|
125
|
+
@001 @00000000000000000000000000000@ 100@
|
126
|
+
@001 @0000000000000000000000000@ 100@
|
127
|
+
@001 80000000000000000000008 t00@
|
128
|
+
@001 8000000000000000008 t00@
|
129
|
+
@001 800000000000008 t00@
|
130
|
+
@001 G000000000G t00@
|
131
|
+
@001 G00000G t00@
|
132
|
+
@001 L0L t00@
|
133
|
+
@001 t00@
|
134
|
+
@001 air t00@
|
135
|
+
@001 #{v} t00@
|
136
|
+
@001 t00@
|
137
|
+
@001 t00@
|
138
|
+
@001 100@
|
139
|
+
@00000000000000000000000000000000000000000000000000000G000@
|
140
|
+
@000000000000000000000000000000000000000000000000000000000@
|
141
|
+
|
142
|
+
EOS
|
143
|
+
end
|
144
|
+
|
79
145
|
end
|
80
146
|
end
|
81
147
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airplay-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: airplay
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.0.
|
21
|
+
version: 1.0.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - '='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.0.
|
29
|
+
version: 1.0.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: clap
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,5 +94,5 @@ rubyforge_project:
|
|
94
94
|
rubygems_version: 1.8.23
|
95
95
|
signing_key:
|
96
96
|
specification_version: 3
|
97
|
-
summary: Airplay
|
97
|
+
summary: Airplay CLI
|
98
98
|
test_files: []
|