remotedroid 0.4.2 → 0.4.3
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/remotedroid.rb +55 -3
- metadata +2 -2
- 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: 93065c866dfef9501613644d3f1ec4f18fd7ba5459c62645eb97bbdfb6069b89
|
4
|
+
data.tar.gz: 8ae132d997c1c7072383eb6878e757bbcc7deeb1241d783d261a2d4885bd0c42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 548cc195f2f8525be869c8429dbb1ede8c9da42ba3ff489b347b204f2bdcb630e09b5d012b4c496ff49bcd2ec6d94bccfc968ff9d4cfbe4d057186bc6209d991
|
7
|
+
data.tar.gz: 5b5eff2de32dfe89a2110558bce22e1a11ddf4cc6ed9d69e903b6c087575e5a9e48e20fbea39a95eade2d69e67b6d49db7ae68874e947aa93ae4a8896852cbf6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/remotedroid.rb
CHANGED
@@ -13,6 +13,10 @@ require 'ruby-macrodroid'
|
|
13
13
|
#
|
14
14
|
# # Triggers
|
15
15
|
#
|
16
|
+
# ## Device Events
|
17
|
+
#
|
18
|
+
# * screen on
|
19
|
+
#
|
16
20
|
# ## Sensors
|
17
21
|
#
|
18
22
|
# * proximity (near)
|
@@ -22,7 +26,11 @@ require 'ruby-macrodroid'
|
|
22
26
|
#
|
23
27
|
# # Actions
|
24
28
|
#
|
25
|
-
##
|
29
|
+
# ## Camera/Photo
|
30
|
+
#
|
31
|
+
# * Take Picture
|
32
|
+
#
|
33
|
+
# ## Connectivity
|
26
34
|
#
|
27
35
|
# * Enable HotSpot
|
28
36
|
#
|
@@ -152,7 +160,12 @@ a:
|
|
152
160
|
Disable Hotspot
|
153
161
|
End If
|
154
162
|
|
155
|
-
|
163
|
+
m: Take Picture
|
164
|
+
t: webhook
|
165
|
+
a:
|
166
|
+
Take Picture
|
167
|
+
Rear Facing
|
168
|
+
|
156
169
|
m: Share location
|
157
170
|
t:
|
158
171
|
WebHook
|
@@ -222,7 +235,10 @@ a:
|
|
222
235
|
m: Power connected
|
223
236
|
t: Power Connected: Any
|
224
237
|
a: webhook
|
225
|
-
|
238
|
+
|
239
|
+
m: screen on off
|
240
|
+
t: screen on
|
241
|
+
a: webhook
|
226
242
|
|
227
243
|
EOF
|
228
244
|
|
@@ -731,6 +747,13 @@ module RemoteDroid
|
|
731
747
|
end
|
732
748
|
|
733
749
|
alias say speak_text
|
750
|
+
|
751
|
+
def take_picture(options={})
|
752
|
+
http_exec :'take-picture', options
|
753
|
+
end
|
754
|
+
|
755
|
+
alias take_photo take_picture
|
756
|
+
|
734
757
|
|
735
758
|
def toast(options={})
|
736
759
|
http_exec :toast, options
|
@@ -872,6 +895,10 @@ module RemoteDroid
|
|
872
895
|
query.location
|
873
896
|
end
|
874
897
|
|
898
|
+
def photo()
|
899
|
+
take_picture
|
900
|
+
end
|
901
|
+
|
875
902
|
def say(text)
|
876
903
|
control.speak_text text
|
877
904
|
end
|
@@ -894,6 +921,31 @@ module RemoteDroid
|
|
894
921
|
screen :off
|
895
922
|
end
|
896
923
|
|
924
|
+
def take_picture(ftp_src: nil, fileout: '.')
|
925
|
+
|
926
|
+
screen.on
|
927
|
+
r = control.take_picture
|
928
|
+
|
929
|
+
if ftp_src then
|
930
|
+
|
931
|
+
# the sleep statement will be replaced in the near future,
|
932
|
+
# but it's fine to demonstrate it works
|
933
|
+
sleep 8
|
934
|
+
|
935
|
+
credentials, dir = ftp_src.match(/(ftp:\/\/[^\/]+)\/([^$]+)/).captures
|
936
|
+
ftp = MyMediaFTP.new(credentials)
|
937
|
+
ftp.cd dir
|
938
|
+
filename = ftp.ls.sort_by {|x| x[:ctime]}.last[:name]
|
939
|
+
ftp.cp filename, fileout
|
940
|
+
|
941
|
+
end
|
942
|
+
|
943
|
+
end
|
944
|
+
|
945
|
+
def take_photo()
|
946
|
+
control.take_photo
|
947
|
+
end
|
948
|
+
|
897
949
|
def torch()
|
898
950
|
control.torch
|
899
951
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remotedroid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
io3WPRDjULC924M5S8wbrus31v2AUjqFBPvmHr7caf/VHErWypV482xcDhWt1eif
|
36
36
|
0G2k2ptozXcBS9odsqGUTb5N
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2020-10-
|
38
|
+
date: 2020-10-16 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: onedrb
|
metadata.gz.sig
CHANGED
Binary file
|