remotedroid 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b788429e24f18de3a9237abe1fb9d8ba73ddb252edb59caa63b99fa9be986fad
4
- data.tar.gz: 5257691864646241e82b92eeece3139c01ca743e1d4c13e49675f441fb5a734d
3
+ metadata.gz: 8182bbf99c5d4129da2c118d695a98ddbe0f11f95912ddd1d5efbf4dd78e1729
4
+ data.tar.gz: 773d8738eb35ff52275fc425326a0ebd6cdd43dd209de7090040e1347bfcc463
5
5
  SHA512:
6
- metadata.gz: dc5aee582390fe67b13e0e69876207292ab4b0892761bb55fea80826bbf5bf62515118decd47815d5ff00b28b2dd25f8179a74e3ddf2d4a02a6ee5c90c662711
7
- data.tar.gz: 0c1fabdaa87e9907f4d79b1fb68285c1f6b7190393daffedfb362436628badfbf0f0c14a8da8d46869197d861f377ad02b7b0bae2681aa3a796d88f7346fd45b
6
+ metadata.gz: 52271972500cd3a2f18da5494247d64e660687188a525f98b929f87c462aaf2296e1d78630c413a13088548261e01034d87df2192d67f461c2b4899284d95c04
7
+ data.tar.gz: 6f57080d7164e68ee66db0ef4e864bfdad9a149adef0f7753bbe74d0ccf85929e82d918b458df0423c58a369721c26074be7b0f181e891d0d192737cbb5f1d03
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -9,8 +9,38 @@ require 'sps-sub'
9
9
  require 'ruby-macrodroid'
10
10
 
11
11
 
12
+ # Here's what's available so far:
13
+ #
14
+ # # Triggers
15
+ #
16
+ # ## Sensors
17
+ #
18
+ # * proximity (near)
19
+ # * shake device
20
+ #
21
+ # ------------------------------------
22
+ #
23
+ # # Actions
24
+ #
25
+ # ## Date/Time
26
+ #
27
+ # * Say Current Time
28
+ #
29
+ # ## Device Actions
30
+ #
31
+ # * Speak text
32
+ # * Torch toggle
33
+ #
34
+ # ## Notification
35
+ # * Popup Message
36
+
37
+
12
38
 
13
39
  RD_MACROS =<<EOF
40
+ m: Camera flash light
41
+ t: webhook
42
+ a: Torch toggle
43
+
14
44
  m: Torch
15
45
  t: webhook
16
46
  a: Torch toggle
@@ -22,9 +52,26 @@ a:
22
52
  Popup Message
23
53
  [lv=msg]
24
54
 
55
+ m: Say current time
56
+ t: webhook
57
+ a: Say Current Time
58
+
59
+ m: Speak text
60
+ v: text
61
+ t: webhook
62
+ a: speak text ([lv=text])
63
+
25
64
  m: shake device
26
65
  t: shake device
27
66
  a: webhook
67
+
68
+ m: Proximity near
69
+ t: Proximity near
70
+ a:
71
+ webhook
72
+ identifier: proximity
73
+ option: 0
74
+
28
75
  EOF
29
76
 
30
77
  module RemoteDroid
@@ -276,6 +323,10 @@ module RemoteDroid
276
323
  def export(s)
277
324
  @macros = MacroDroid.new(s).macros
278
325
  end
326
+
327
+ def invoke(name, options={})
328
+ @control.method(name.to_sym).call(options)
329
+ end
279
330
 
280
331
  # Object Property (op)
281
332
  # Helpful for accessing properites in dot notation
@@ -360,10 +411,13 @@ module RemoteDroid
360
411
  @bluetooth
361
412
  end
362
413
 
414
+ def camera_flash_light(options={})
415
+ http_exec 'camera-flash-light', options
416
+ end
417
+
363
418
  def http_exec(command, options={})
364
419
 
365
420
  url = "https://trigger.macrodroid.com/%s/%s" % [@deviceid, command]
366
- File.write '/tmp/foo.txt', 'url : ' + url.inspect #if @debug
367
421
 
368
422
  if options and options.any? then
369
423
  h = options
@@ -375,12 +429,22 @@ module RemoteDroid
375
429
 
376
430
  end
377
431
 
432
+ def say_current_time(options={})
433
+ http_exec 'say-current-time'
434
+ end
435
+
436
+ alias say_time say_current_time
437
+
438
+ def speak_text(options={})
439
+ http_exec 'speak-text', options
440
+ end
441
+
378
442
  def toast(options={})
379
- http_exec 'toast', options
443
+ http_exec :toast, options
380
444
  end
381
445
 
382
- def torch()
383
- @torch
446
+ def torch(options={})
447
+ http_exec :torch
384
448
  end
385
449
 
386
450
  def write(s)
@@ -459,4 +523,3 @@ module RemoteDroid
459
523
 
460
524
 
461
525
  end
462
-
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.1.0
4
+ version: 0.1.1
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-02 00:00:00.000000000 Z
38
+ date: 2020-10-03 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: onedrb
metadata.gz.sig CHANGED
Binary file