ruby-macrodroid 0.8.4 → 0.8.6

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: e37f4ab29dcdcd4c347d15cefb087663679ec7859094f94dc50a39dd66799b85
4
- data.tar.gz: 26896b3fdea9e794467abdd41e4898d80ff240c9464316e09513db2d6b7956f2
3
+ metadata.gz: a58f2837ede78c4bdb29b2673c38cf07b850dd8431aa47bf59b9ba08512d1970
4
+ data.tar.gz: 5300eb53b78a33b8d52682ac21fc901a8fab86f273c581a4fdf5e4fbb033c404
5
5
  SHA512:
6
- metadata.gz: 3f7da291c314b2cd03ac2704ea3c1fbd2380f7a85389747b559cc1e5106499f71d120ba935ee73f6078978744abd1f20d16cad941bbac597746769e83c2954df
7
- data.tar.gz: 8bae5ed2da5e357335f9720746b5bca7358e0a134fc8cf64b8fd5fcc8fc780137d2d4ae20baf2568f8771a467c283d16dc6fd0fa3dddf4cb7cdcd3927c4ff0d7
6
+ metadata.gz: af593ce8663d6a1842fc3f49dedee195119c82dab6f2f2bba8f9f96cce1ef6e8065efa281777598502261e168ee452cccb09583460b15f7e425ea39a65e8f6b8
7
+ data.tar.gz: d0f84f3016d838e0fc326695dec1631fbfa27f07951045a3518cc7ad36b3f899e03a060459f72864568ea50e74c68009d9baf6411e31de36b8cea56f3be7bc93
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -253,6 +253,11 @@ class ActionsNlp
253
253
  [KeepAwakeAction, {enabled: false, screen_option: 0}]
254
254
  end
255
255
 
256
+ #a: Disable Keep Awake
257
+ #
258
+ get /if (.*)/i do
259
+ [IfConditionAction, {}]
260
+ end
256
261
 
257
262
  end
258
263
 
@@ -539,16 +544,25 @@ class Macro
539
544
 
540
545
  puts 'action e: ' + e.xml.inspect if @debug
541
546
  puts 'e.text ' + e.text if @debug
542
- r = ap.find_action e.text.strip
547
+
548
+ inner_lines = e.xpath('item/description/text()')
549
+
550
+ action = if e.text.to_s.strip.empty? then
551
+ inner_lines.shift
552
+ else
553
+ e.text.strip
554
+ end
555
+
556
+ r = ap.find_action action
543
557
  puts 'found action ' + r.inspect if @debug
544
558
 
545
559
  if r then
546
560
 
547
- loose = e.element('item/description/text()')
561
+ loose = inner_lines.shift
548
562
 
549
563
  raw_attributes = if loose then
550
564
 
551
- puts 'do something ' + loose.to_s
565
+ puts 'do something ' + loose.to_s if @debug
552
566
  loose.to_s
553
567
 
554
568
  else
@@ -356,7 +356,14 @@ end
356
356
  #
357
357
  class IfConditionAction < Action
358
358
 
359
- def initialize(h={})
359
+ def initialize(obj=nil)
360
+
361
+ h = if obj.is_a? Hash then
362
+ obj
363
+ else
364
+ # get the constraints
365
+
366
+ end
360
367
 
361
368
  options = {
362
369
  a: true,
@@ -1093,6 +1100,40 @@ class FileAction < Action
1093
1100
 
1094
1101
  end
1095
1102
 
1103
+
1104
+
1105
+ # Category: Files
1106
+ #
1107
+ class FileOperationV21Action < FileAction
1108
+
1109
+ def initialize(h={})
1110
+
1111
+ options = {
1112
+ :app_name=>"", :class_name=>"", :package_name=>"", :file_path=>"",
1113
+ :file_extensions=>["jpg", "jpeg", "png", "raw", "bmp", "tif", "tiff",
1114
+ "gif"], :file_option=>2, :from_name=>"Sent",
1115
+ :from_uri_string=>"", :option=>2
1116
+ }
1117
+
1118
+ super(options.merge h)
1119
+
1120
+ end
1121
+
1122
+ def to_s(colour: false)
1123
+
1124
+ operation = ['Copy', 'Move', 'Delete', 'Create Folder']
1125
+ file = ['All Files', 'All Media Files', 'Images', 'Audio', 'Videos', 'Specify File Pattern', 'Folder']
1126
+
1127
+ detail = @h[:from_name]
1128
+ detail += ' to: ' + @h[:to_name] if @h[:option] == 1
1129
+ @s = "%s %s" % [operation[@h[:option]], file[@h[:file_option]]] \
1130
+ + "\n " + detail #+ @h.inspect
1131
+ super()
1132
+ end
1133
+
1134
+ alias to_summary to_s
1135
+ end
1136
+
1096
1137
  # Category: Files
1097
1138
  #
1098
1139
  class OpenFileAction < FileAction
@@ -1304,6 +1345,32 @@ class ClearLogAction < LoggingAction
1304
1345
  alias to_summary to_s
1305
1346
  end
1306
1347
 
1348
+ # MacroDroid Specific
1349
+ #
1350
+ class ConfirmNextAction < Action
1351
+
1352
+ def initialize(h={})
1353
+
1354
+ options = {
1355
+ :message=>"Do you want to fill the clipboard? ", :title=>"Fill clipboard? ", :negative_text=>"NO", :positive_text=>"YES", :class_type=>"ConfirmNextAction"
1356
+
1357
+ }
1358
+
1359
+ super(h)
1360
+
1361
+ end
1362
+
1363
+ def to_s(colour: false)
1364
+
1365
+ @s = 'Confirm Next' + "\n %s: %s" % [@h[:title], @h[:message]]
1366
+ super()
1367
+
1368
+ end
1369
+
1370
+ alias to_summary to_s
1371
+
1372
+ end
1373
+
1307
1374
  # MacroDroid Specific
1308
1375
  #
1309
1376
  class ExportMacrosAction < Action
@@ -134,7 +134,9 @@ class ApplicationLaunchedTrigger < Trigger
134
134
  end
135
135
 
136
136
  def to_s(colour: false)
137
- 'ApplicationLaunchedTrigger ' + @h.inspect
137
+ a = @h[:application_name_list]
138
+ apps = a.length > 1 ? "[%s]" % a.join(', ') : a.first
139
+ 'Application Launched' + "\n " + apps
138
140
  end
139
141
 
140
142
  alias to_summary to_s
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.8.4
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  NZ2kdBIUDnAM24e0/wXdVxg4HnsZbdymxyzMQ4P5pKYcpI6oisBxI37p/Xy+wAg3
36
36
  SBHno3GEuuD8ZWj24IMJpfbp
37
37
  -----END CERTIFICATE-----
38
- date: 2020-09-18 00:00:00.000000000 Z
38
+ date: 2020-09-19 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: glw
metadata.gz.sig CHANGED
Binary file