ruby-macrodroid 0.9.18 → 0.9.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/ruby-macrodroid/actions.rb +37 -31
- data/lib/ruby-macrodroid/actionsnlp.rb +34 -0
- metadata +24 -24
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5b0e328f9ba62c9217cfc9dcce286b3d450953d77eef32ba00c7fd1bf07d3d7
|
4
|
+
data.tar.gz: d8e6c46d8fc8b4a3185ab9b1a0da3a6937e1aabf43a152e6c238b1187455c0db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11f4918c738e8e42d78f0d5acc2b04994b45848d5d56010dc6c3f89f6c1a05ea24166cd95aaeca736a09d2b0990874cbdfdd8dba8f9548d999e5c50bae2e9dba
|
7
|
+
data.tar.gz: '09d9a30e0c8799ae2cb68acccc3d505a6f8cbe04a6206c28d0584e2b3f16b26b92b394ea24f137bfb576b8df5574a50aed3d32a09b03fe311e4427ddfab7bd3f'
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -797,7 +797,7 @@ class SetAirplaneModeAction < ConnectivityAction
|
|
797
797
|
|
798
798
|
state = ['On', 'Off', 'Toggle'][@h[:state]]
|
799
799
|
@s = 'Airplane Mode ' + state
|
800
|
-
super(
|
800
|
+
super()
|
801
801
|
|
802
802
|
end
|
803
803
|
|
@@ -819,34 +819,20 @@ class SetWifiAction < ConnectivityAction
|
|
819
819
|
|
820
820
|
end
|
821
821
|
|
822
|
-
def to_s(colour: false, indent: 0)
|
823
|
-
|
824
|
-
|
822
|
+
def to_s(colour: false, indent: 0)
|
823
|
+
|
824
|
+
@s = if @h[:state] <= 2 then
|
825
|
+
state = %w(Enable Disable Toggle)[@h[:state]]
|
826
|
+
state + ' Wifi'
|
827
|
+
else
|
828
|
+
"Connected to Network\n%s" % @h[:ssid]
|
829
|
+
end
|
830
|
+
|
831
|
+
super()
|
825
832
|
end
|
826
833
|
|
827
834
|
end
|
828
835
|
|
829
|
-
# Category: Connectivity
|
830
|
-
#
|
831
|
-
class SetBluetoothAction < ConnectivityAction
|
832
|
-
|
833
|
-
def initialize(h={})
|
834
|
-
|
835
|
-
options = {
|
836
|
-
device_name: '',
|
837
|
-
state: 0
|
838
|
-
}
|
839
|
-
|
840
|
-
super(options.merge h)
|
841
|
-
|
842
|
-
end
|
843
|
-
|
844
|
-
def to_s(colour: false, indent: 0)
|
845
|
-
'SetBluetoothAction ' + @h.inspect
|
846
|
-
end
|
847
|
-
|
848
|
-
alias to_summary to_s
|
849
|
-
end
|
850
836
|
|
851
837
|
# Category: Connectivity
|
852
838
|
#
|
@@ -855,6 +841,8 @@ class SetBluetoothAction < ConnectivityAction
|
|
855
841
|
def initialize(h={})
|
856
842
|
|
857
843
|
options = {
|
844
|
+
|
845
|
+
device_address: '',
|
858
846
|
device_name: '',
|
859
847
|
state: 1
|
860
848
|
}
|
@@ -864,7 +852,21 @@ class SetBluetoothAction < ConnectivityAction
|
|
864
852
|
end
|
865
853
|
|
866
854
|
def to_s(colour: false, indent: 0)
|
867
|
-
|
855
|
+
|
856
|
+
@s = if @h[:state] <= 2 then
|
857
|
+
|
858
|
+
state = %w(Enable Disable Toggle)[@h[:state]]
|
859
|
+
state + ' Bluetooth'
|
860
|
+
|
861
|
+
else
|
862
|
+
|
863
|
+
state = @h[:state] == 3 ? 'Connect' : 'Disconnect'
|
864
|
+
state + ' Audio Device' + "\n" + @h[:device_name]
|
865
|
+
|
866
|
+
end
|
867
|
+
|
868
|
+
super()
|
869
|
+
|
868
870
|
end
|
869
871
|
|
870
872
|
alias to_summary to_s
|
@@ -2223,16 +2225,18 @@ class ControlMediaAction < MediaAction
|
|
2223
2225
|
}.merge h2
|
2224
2226
|
|
2225
2227
|
else
|
2226
|
-
{
|
2228
|
+
{
|
2229
|
+
send_media_player_commands: true,
|
2230
|
+
simulate_media_button: false
|
2231
|
+
}
|
2227
2232
|
end
|
2228
2233
|
end
|
2229
2234
|
#puts 'h: ' + h.inspect
|
2230
2235
|
|
2231
2236
|
options = {
|
2232
|
-
|
2233
|
-
|
2234
|
-
|
2235
|
-
simulate_media_button: true,
|
2237
|
+
option: "Play/Pause",
|
2238
|
+
send_media_player_commands: true,
|
2239
|
+
simulate_media_button: false,
|
2236
2240
|
}
|
2237
2241
|
|
2238
2242
|
super(options.merge h)
|
@@ -2245,6 +2249,8 @@ class ControlMediaAction < MediaAction
|
|
2245
2249
|
|
2246
2250
|
if @h[:simulate_media_button] then
|
2247
2251
|
@s += "\nSimulate Media Button (%s)" % @h[:application_name]
|
2252
|
+
else
|
2253
|
+
@s += "\nSimulate Audio Button"
|
2248
2254
|
end
|
2249
2255
|
|
2250
2256
|
super()
|
@@ -41,6 +41,27 @@ class ActionsNlp
|
|
41
41
|
|
42
42
|
# -- Connectivity ------------------------------------------------------
|
43
43
|
|
44
|
+
get /^Airplane Mode (On|Off|Toggle)/i do |state|
|
45
|
+
|
46
|
+
index = %w(on off toggle).index state.downcase
|
47
|
+
[SetAirplaneModeAction, {state: index }]
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
get /^(Enable|Disable|Toggle) Bluetooth/i do |state|
|
52
|
+
|
53
|
+
index = %w(enable disable toggle).index state.downcase
|
54
|
+
[SetBluetoothAction, {state: index }]
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
get /^(Connect|Disconnect) Audio Device/i do |state|
|
59
|
+
|
60
|
+
index = %w(connect disconnect).index(state.downcase) + 3
|
61
|
+
[SetBluetoothAction, {state: index }]
|
62
|
+
|
63
|
+
end
|
64
|
+
|
44
65
|
get /^(Enable|Disable) HotSpot/i do |state|
|
45
66
|
enable, state = if state.downcase == 'enable' then
|
46
67
|
[true, 0]
|
@@ -50,6 +71,19 @@ class ActionsNlp
|
|
50
71
|
[SetHotspotAction, {turn_wifi_on: enable, state: state }]
|
51
72
|
end
|
52
73
|
|
74
|
+
get /^(Enable|Disable|Toggle) Wifi/i do |state|
|
75
|
+
|
76
|
+
index = %w(enable disable toggle).index state.downcase
|
77
|
+
[SetWifiAction, {state: index }]
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
get /^Connect to Network$/i do
|
82
|
+
|
83
|
+
[SetWifiAction, {state: 4 }]
|
84
|
+
|
85
|
+
end
|
86
|
+
|
53
87
|
# e.g. message popup: hello world!
|
54
88
|
get /^(?:message popup|popup message): (.*)/i do |msg|
|
55
89
|
[ToastAction, {msg: msg}]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-macrodroid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -11,31 +11,31 @@ cert_chain:
|
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjAxMDI2MjIxOTU3WhcN
|
15
|
+
MjExMDI2MjIxOTU3WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDoaG+o
|
17
|
+
lMHEA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k8ZBSsgEUvHCnX0mU
|
31
|
+
7KPih5gG+3xgOKy+OYP9KT68nqJk0MOZa0wf+7Mdi0yfCQ35OWU6k4MLhVlPn3rs
|
32
|
+
KTWiZmv8DTY/GD7UmsU9PyWo4mRL/HStHKOJpayJ+hzdezD1gIKCViUJVQLaNpV4
|
33
|
+
a1xyM49vQ8wAk4hd+36Hs+te+24tUgisk5YF/m5/xHLPzCwU/dzghzyqurY1CcdZ
|
34
|
+
AP47l82yywwqaxpCXBvlpPZ81LOozzu7JOmr/ziys4ube7PbUYN6uiwfoE2/N8Ol
|
35
|
+
cu2W9lmvKJ505bT8+KLouVOtLlxYZknIB/uIea9r5rrGEJDMdYEYl4ZySFmkvJR4
|
36
|
+
tf7VMFcAy1q1HMyemsBUJk5h
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2020-10-
|
38
|
+
date: 2020-10-26 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: glw
|
metadata.gz.sig
CHANGED
Binary file
|