Compare commits
3 Commits
40da25920a
...
fb75d9bc40
| Author | SHA1 | Date | |
|---|---|---|---|
| fb75d9bc40 | |||
| 2a5d513509 | |||
| 8a04baaa20 |
@@ -0,0 +1,71 @@
|
||||
<TaskerData sr="" dvi="1" tv="6.6.20">
|
||||
<Task sr="task9">
|
||||
<cdate>1774931800563</cdate>
|
||||
<edate>1774932946532</edate>
|
||||
<id>9</id>
|
||||
<nme>Git Sync</nme>
|
||||
<Action sr="act0" ve="7">
|
||||
<code>107361459</code>
|
||||
<Bundle sr="arg0">
|
||||
<Vals sr="val">
|
||||
<EnableDisableAccessibilityService><null></EnableDisableAccessibilityService>
|
||||
<EnableDisableAccessibilityService-type>java.lang.String</EnableDisableAccessibilityService-type>
|
||||
<Password><null></Password>
|
||||
<Password-type>java.lang.String</Password-type>
|
||||
<com.twofortyfouram.locale.intent.extra.BLURB>Actions To Perform: openApp(com.viscouspot.gitsync)
|
||||
|
||||
click(text,SYNC CHANGES)
|
||||
|
||||
backOutOfApp()
|
||||
Not In AutoInput: true
|
||||
Not In Tasker: true
|
||||
Separator: ,
|
||||
Check Millis: 1000</com.twofortyfouram.locale.intent.extra.BLURB>
|
||||
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
|
||||
<net.dinglisch.android.tasker.JSON_ENCODED_KEYS>parameters</net.dinglisch.android.tasker.JSON_ENCODED_KEYS>
|
||||
<net.dinglisch.android.tasker.JSON_ENCODED_KEYS-type>java.lang.String</net.dinglisch.android.tasker.JSON_ENCODED_KEYS-type>
|
||||
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%ailastbounds
|
||||
Last Bounds
|
||||
Bounds (left,top,right,bottom) of the item that the action last interacted with</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%ailastcoordinates
|
||||
Last Coordinates
|
||||
Center coordinates (x,y) of the item that the action last interacted with</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2>%err
|
||||
Error Code
|
||||
Only available if you select &lt;b&gt;Continue Task After Error&lt;/b&gt; and the action ends in error</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3>%errmsg
|
||||
Error Message
|
||||
Only available if you select &lt;b&gt;Continue Task After Error&lt;/b&gt; and the action ends in error</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
|
||||
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
|
||||
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>parameters plugininstanceid plugintypeid </net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
|
||||
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
|
||||
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
|
||||
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
|
||||
<parameters>{"_action":"openApp(com.viscouspot.gitsync)\n\nclick(text,SYNC CHANGES)\n\nbackOutOfApp()","_additionalOptions":{"checkMs":"1000","separator":",","withCoordinates":false},"_whenToPerformAction":{"notInAutoInput":true,"notInTasker":true},"generatedValues":{}}</parameters>
|
||||
<parameters-type>java.lang.String</parameters-type>
|
||||
<plugininstanceid>5910f160-ad6a-4b47-ab40-810a62e77df1</plugininstanceid>
|
||||
<plugininstanceid-type>java.lang.String</plugininstanceid-type>
|
||||
<plugintypeid>com.joaomgcd.autoinput.intent.IntentActionv2</plugintypeid>
|
||||
<plugintypeid-type>java.lang.String</plugintypeid-type>
|
||||
</Vals>
|
||||
</Bundle>
|
||||
<Str sr="arg1" ve="3">com.joaomgcd.autoinput</Str>
|
||||
<Str sr="arg2" ve="3">com.joaomgcd.autoinput.activity.ActivityConfigActionv2</Str>
|
||||
<Int sr="arg3" val="60"/>
|
||||
<Int sr="arg4" val="1"/>
|
||||
</Action>
|
||||
<Action sr="act1" ve="7">
|
||||
<code>130</code>
|
||||
<Str sr="arg0" ve="3">JWL_Merge</Str>
|
||||
<Int sr="arg1">
|
||||
<var>%priority</var>
|
||||
</Int>
|
||||
<Int sr="arg10" val="1"/>
|
||||
<Str sr="arg2" ve="3"/>
|
||||
<Str sr="arg3" ve="3"/>
|
||||
<Str sr="arg4" ve="3"/>
|
||||
<Int sr="arg5" val="0"/>
|
||||
<Int sr="arg6" val="0"/>
|
||||
<Str sr="arg7" ve="3"/>
|
||||
<Int sr="arg8" val="0"/>
|
||||
<Int sr="arg9" val="0"/>
|
||||
</Action>
|
||||
</Task>
|
||||
</TaskerData>
|
||||
@@ -114,9 +114,53 @@ Syncs JW Library backups (`.jwlibrary`) across multiple Android devices via a ce
|
||||
|
||||
---
|
||||
|
||||
## Adding a New Device
|
||||
|
||||
All task files for a new device are in `stacks/n8n/JW_Backup/` — the `(1)` suffixed files are the phone templates.
|
||||
|
||||
### 1. Install Apps
|
||||
- **Tasker** (Play Store)
|
||||
- **AutoInput** (Play Store — same source as Tasker)
|
||||
- **GitSync** (Play Store)
|
||||
- **JW Library** (Play Store)
|
||||
|
||||
### 2. Configure GitSync
|
||||
1. Open GitSync → add a new repository
|
||||
2. Clone URL: `https://gitea.bunny-wyvern.ts.net/artanis/Inanis_Vault`
|
||||
3. Local path: `/storage/emulated/0/vault`
|
||||
4. Credentials: Gitea username + password (see `credentials.gpg`)
|
||||
5. Do an initial sync to confirm the repo clones correctly — `JW_Backups/` folder should appear at `/storage/emulated/0/vault/JW_Backups/`
|
||||
|
||||
### 3. Import Tasker Tasks
|
||||
Import the following files from `stacks/n8n/JW_Backup/` into Tasker (long-press task list → Import):
|
||||
- `JWL_Backup_To_Git.tsk(1).xml`
|
||||
- `Git_Sync.tsk(1).xml`
|
||||
- `JWL_Merge.tsk(1).xml`
|
||||
- `JWL_Restore_From_Git.tsk(1).xml`
|
||||
|
||||
### 4. Update Device Name
|
||||
In `JWL_Merge`, find the HTTP POST body and update the device identifier:
|
||||
```json
|
||||
{"device": "YOUR-DEVICE-NAME-HERE"}
|
||||
```
|
||||
This is only used for logging — set it to something recognizable (e.g., `Samsung-Phone-A55`).
|
||||
|
||||
### 5. Grant Permissions
|
||||
- **Tasker:** grant accessibility service, notification access, and storage permissions
|
||||
- **AutoInput:** grant accessibility service
|
||||
- **GitSync:** grant storage permissions
|
||||
- **JW Library:** grant storage permissions
|
||||
|
||||
### 6. Set Up Tasker Profile
|
||||
Create a **Time** profile to trigger `JWL_Backup_To_Git` at the device's scheduled time (e.g., 04:35 for phone). The task chain handles everything from there: backup → git push → n8n merge → git pull → restore.
|
||||
|
||||
### 7. Test
|
||||
Run `JWL_Backup_To_Git` manually and verify each step completes. Check n8n Executions tab to confirm the webhook fired and the SSH script succeeded.
|
||||
|
||||
---
|
||||
|
||||
## Open Items
|
||||
|
||||
- [ ] **Screen-off handling** — verify AutoInput sequence works when device screen is off (may need `Turn On Display` + `Dismiss Keyguard` actions before AutoInput steps)
|
||||
- [ ] **Phone e2e test** — tablet verified, phone not yet tested end-to-end
|
||||
- [ ] **Stagger validation** — confirm 5-min gap between phone push (04:35) and tablet n8n trigger (04:45) is sufficient on slow networks
|
||||
- [ ] **`.gitignore`** — verify temp `.tmp` files from JW Library export are ignored in the vault repo
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"name": "JW Library Sync",
|
||||
"nodes": [
|
||||
{
|
||||
"parameters": {
|
||||
"command": "bash /home/artanis/Documents/JW_Backup_Sync_Engine.sh"
|
||||
},
|
||||
"type": "n8n-nodes-base.ssh",
|
||||
"typeVersion": 1,
|
||||
"position": [
|
||||
112,
|
||||
-112
|
||||
],
|
||||
"id": "5a156815-edbb-4c08-9e7d-75f98c2f6c39",
|
||||
"name": "Execute a command",
|
||||
"alwaysOutputData": true,
|
||||
"credentials": {
|
||||
"sshPassword": {
|
||||
"id": "wILbpFcpVSKcewXl",
|
||||
"name": "Homelab Login"
|
||||
}
|
||||
},
|
||||
"onError": "continueErrorOutput"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"httpMethod": "POST",
|
||||
"path": "sync-jw-backup",
|
||||
"responseMode": "responseNode",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.webhook",
|
||||
"typeVersion": 2.1,
|
||||
"position": [
|
||||
-112,
|
||||
-112
|
||||
],
|
||||
"id": "37b4ca1b-8910-41d5-8b1f-e7696b71f07f",
|
||||
"name": "Webhook",
|
||||
"webhookId": "5e348016-4d6e-4226-a5dc-c91eb7d6ea0e"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"authentication": "webhook",
|
||||
"content": "=JW SYNC ERROR:\n {{ $json.stderr }}",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.discord",
|
||||
"typeVersion": 2,
|
||||
"position": [
|
||||
336,
|
||||
-16
|
||||
],
|
||||
"id": "abac265b-78c6-4bc0-9ba9-f846d39eefa8",
|
||||
"name": "Discord",
|
||||
"webhookId": "4f823df1-38b6-4a5b-ae32-2fc586a9aa9b",
|
||||
"credentials": {
|
||||
"discordWebhookApi": {
|
||||
"id": "0i1bW7qtePtHMHjA",
|
||||
"name": "SV98"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "text",
|
||||
"responseBody": "Merge Successful",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.5,
|
||||
"position": [
|
||||
560,
|
||||
-208
|
||||
],
|
||||
"id": "be993bb8-c654-42d1-9bea-7d6ffbd75db9",
|
||||
"name": "Respond to Webhook"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"respondWith": "text",
|
||||
"responseBody": "Merge Failed",
|
||||
"options": {}
|
||||
},
|
||||
"type": "n8n-nodes-base.respondToWebhook",
|
||||
"typeVersion": 1.5,
|
||||
"position": [
|
||||
560,
|
||||
-16
|
||||
],
|
||||
"id": "daa52075-9bd6-4425-a9d5-8763d935a372",
|
||||
"name": "Respond to Webhook1"
|
||||
}
|
||||
],
|
||||
"pinData": {
|
||||
"Webhook": [
|
||||
{
|
||||
"json": {
|
||||
"headers": {
|
||||
"user-agent": "Tasker/6.6.20 (Android/16)",
|
||||
"content-type": "application/json",
|
||||
"content-length": "33",
|
||||
"host": "n8n.bunny-wyvern.ts.net:5678",
|
||||
"connection": "Keep-Alive",
|
||||
"accept-encoding": "gzip"
|
||||
},
|
||||
"params": {},
|
||||
"query": {},
|
||||
"body": {
|
||||
"device": "Samsung-Tablet-S10+"
|
||||
},
|
||||
"webhookUrl": "http://n8n.bunny-wyvern.ts.net:5678/webhook/sync-jw-backup",
|
||||
"executionMode": "production"
|
||||
},
|
||||
"pairedItem": {
|
||||
"item": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"connections": {
|
||||
"Webhook": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Execute a command",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Execute a command": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Discord",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Discord": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Respond to Webhook1",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"active": true,
|
||||
"settings": {
|
||||
"executionOrder": "v1",
|
||||
"binaryMode": "separate"
|
||||
},
|
||||
"versionId": "e3c5e92f-e32e-4e76-88bb-5167c0c4896c",
|
||||
"meta": {
|
||||
"templateCredsSetupCompleted": true,
|
||||
"instanceId": "cb40080ef54f0b350fa960324602081324276be1181221a02a674c62336f7933"
|
||||
},
|
||||
"id": "rmbJkjlgZi5hbRpg",
|
||||
"tags": []
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
<TaskerData sr="" dvi="1" tv="6.6.20">
|
||||
<Task sr="task3">
|
||||
<cdate>1774912401659</cdate>
|
||||
<edate>1774991619042</edate>
|
||||
<id>3</id>
|
||||
<nme>JWL_Backup_To_Git</nme>
|
||||
<pri>100</pri>
|
||||
<Action sr="act0" ve="7">
|
||||
<code>18</code>
|
||||
<App sr="arg0">
|
||||
<appClass>org.jw.jwlibrary.mobile.MainActivity</appClass>
|
||||
<appPkg>org.jw.jwlibrary.mobile</appPkg>
|
||||
<label>JW Library</label>
|
||||
</App>
|
||||
<Int sr="arg1" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act1" ve="7">
|
||||
<code>30</code>
|
||||
<Int sr="arg0" val="0"/>
|
||||
<Int sr="arg1" val="2"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="0"/>
|
||||
<Int sr="arg4" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act2" ve="7">
|
||||
<code>20</code>
|
||||
<App sr="arg0">
|
||||
<appClass>org.jw.jwlibrary.mobile.MainActivity</appClass>
|
||||
<appPkg>org.jw.jwlibrary.mobile</appPkg>
|
||||
<label>JW Library</label>
|
||||
</App>
|
||||
<Str sr="arg1" ve="3"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="1"/>
|
||||
</Action>
|
||||
<Action sr="act3" ve="7">
|
||||
<code>30</code>
|
||||
<Int sr="arg0" val="0"/>
|
||||
<Int sr="arg1" val="3"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="0"/>
|
||||
<Int sr="arg4" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act4" ve="7">
|
||||
<code>107361459</code>
|
||||
<Bundle sr="arg0">
|
||||
<Vals sr="val">
|
||||
<EnableDisableAccessibilityService><null></EnableDisableAccessibilityService>
|
||||
<EnableDisableAccessibilityService-type>java.lang.String</EnableDisableAccessibilityService-type>
|
||||
<Password><null></Password>
|
||||
<Password-type>java.lang.String</Password-type>
|
||||
<com.twofortyfouram.locale.intent.extra.BLURB>Actions To Perform: click(id,org.jw.jwlibrary.mobile:id/nav_personal_study)
|
||||
|
||||
click(id,org.jw.jwlibrary.mobile:id/action_backup_restore)
|
||||
|
||||
click(text,Create Backup)
|
||||
Not In AutoInput: true
|
||||
Not In Tasker: true
|
||||
Separator: ,
|
||||
Check Millis: 1000</com.twofortyfouram.locale.intent.extra.BLURB>
|
||||
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
|
||||
<net.dinglisch.android.tasker.JSON_ENCODED_KEYS>parameters</net.dinglisch.android.tasker.JSON_ENCODED_KEYS>
|
||||
<net.dinglisch.android.tasker.JSON_ENCODED_KEYS-type>java.lang.String</net.dinglisch.android.tasker.JSON_ENCODED_KEYS-type>
|
||||
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>parameters plugininstanceid plugintypeid </net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
|
||||
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
|
||||
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
|
||||
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
|
||||
<parameters>{"_action":"click(id,org.jw.jwlibrary.mobile:id/nav_personal_study)\n\nclick(id,org.jw.jwlibrary.mobile:id/action_backup_restore)\n\nclick(text,Create Backup)","_additionalOptions":{"checkMs":"1000","separator":",","withCoordinates":false},"_whenToPerformAction":{"notInAutoInput":true,"notInTasker":true},"generatedValues":{}}</parameters>
|
||||
<parameters-type>java.lang.String</parameters-type>
|
||||
<plugininstanceid>4a568374-2445-46f3-be31-a879d2940e36</plugininstanceid>
|
||||
<plugininstanceid-type>java.lang.String</plugininstanceid-type>
|
||||
<plugintypeid>com.joaomgcd.autoinput.intent.IntentActionv2</plugintypeid>
|
||||
<plugintypeid-type>java.lang.String</plugintypeid-type>
|
||||
</Vals>
|
||||
</Bundle>
|
||||
<Str sr="arg1" ve="3">com.joaomgcd.autoinput</Str>
|
||||
<Str sr="arg2" ve="3">com.joaomgcd.autoinput.activity.ActivityConfigActionv2</Str>
|
||||
<Int sr="arg3" val="60"/>
|
||||
<Int sr="arg4" val="1"/>
|
||||
</Action>
|
||||
<Action sr="act5" ve="7">
|
||||
<code>30</code>
|
||||
<Int sr="arg0" val="0"/>
|
||||
<Int sr="arg1" val="3"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="0"/>
|
||||
<Int sr="arg4" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act6" ve="7">
|
||||
<code>107361459</code>
|
||||
<Bundle sr="arg0">
|
||||
<Vals sr="val">
|
||||
<EnableDisableAccessibilityService><null></EnableDisableAccessibilityService>
|
||||
<EnableDisableAccessibilityService-type>java.lang.String</EnableDisableAccessibilityService-type>
|
||||
<Password><null></Password>
|
||||
<Password-type>java.lang.String</Password-type>
|
||||
<com.twofortyfouram.locale.intent.extra.BLURB>Actions To Perform: click(text,Save Locally)
|
||||
|
||||
click(id,android:id/button1)
|
||||
Not In AutoInput: true
|
||||
Not In Tasker: true
|
||||
Separator: ,
|
||||
Check Millis: 1000</com.twofortyfouram.locale.intent.extra.BLURB>
|
||||
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
|
||||
<net.dinglisch.android.tasker.JSON_ENCODED_KEYS>parameters</net.dinglisch.android.tasker.JSON_ENCODED_KEYS>
|
||||
<net.dinglisch.android.tasker.JSON_ENCODED_KEYS-type>java.lang.String</net.dinglisch.android.tasker.JSON_ENCODED_KEYS-type>
|
||||
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%ailastbounds
|
||||
Last Bounds
|
||||
Bounds (left,top,right,bottom) of the item that the action last interacted with</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%ailastcoordinates
|
||||
Last Coordinates
|
||||
Center coordinates (x,y) of the item that the action last interacted with</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2>%err
|
||||
Error Code
|
||||
Only available if you select &lt;b&gt;Continue Task After Error&lt;/b&gt; and the action ends in error</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3>%errmsg
|
||||
Error Message
|
||||
Only available if you select &lt;b&gt;Continue Task After Error&lt;/b&gt; and the action ends in error</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
|
||||
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
|
||||
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>parameters plugininstanceid plugintypeid </net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
|
||||
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
|
||||
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
|
||||
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
|
||||
<parameters>{"_action":"click(text,Save Locally)\n\nclick(id,android:id/button1)","_additionalOptions":{"checkMs":"1000","separator":",","withCoordinates":false},"_whenToPerformAction":{"notInAutoInput":true,"notInTasker":true},"generatedValues":{}}</parameters>
|
||||
<parameters-type>java.lang.String</parameters-type>
|
||||
<plugininstanceid>babe5b2c-f87a-4a8a-ab34-6a891fce327c</plugininstanceid>
|
||||
<plugininstanceid-type>java.lang.String</plugininstanceid-type>
|
||||
<plugintypeid>com.joaomgcd.autoinput.intent.IntentActionv2</plugintypeid>
|
||||
<plugintypeid-type>java.lang.String</plugintypeid-type>
|
||||
</Vals>
|
||||
</Bundle>
|
||||
<Str sr="arg1" ve="3">com.joaomgcd.autoinput</Str>
|
||||
<Str sr="arg2" ve="3">com.joaomgcd.autoinput.activity.ActivityConfigActionv2</Str>
|
||||
<Int sr="arg3" val="60"/>
|
||||
<Int sr="arg4" val="1"/>
|
||||
</Action>
|
||||
<Action sr="act7" ve="7">
|
||||
<code>130</code>
|
||||
<Str sr="arg0" ve="3">Git Sync</Str>
|
||||
<Int sr="arg1">
|
||||
<var>%priority</var>
|
||||
</Int>
|
||||
<Int sr="arg10"/>
|
||||
<Str sr="arg2" ve="3"/>
|
||||
<Str sr="arg3" ve="3"/>
|
||||
<Str sr="arg4" ve="3"/>
|
||||
<Int sr="arg5"/>
|
||||
<Int sr="arg6" val="1"/>
|
||||
<Str sr="arg7" ve="3"/>
|
||||
<Int sr="arg8"/>
|
||||
<Int sr="arg9"/>
|
||||
</Action>
|
||||
</Task>
|
||||
</TaskerData>
|
||||
@@ -0,0 +1,86 @@
|
||||
<TaskerData sr="" dvi="1" tv="6.6.20">
|
||||
<Task sr="task8">
|
||||
<cdate>1774931254224</cdate>
|
||||
<edate>1774986287495</edate>
|
||||
<id>8</id>
|
||||
<nme>JWL_Merge</nme>
|
||||
<Action sr="act0" ve="7">
|
||||
<code>339</code>
|
||||
<Bundle sr="arg0">
|
||||
<Vals sr="val">
|
||||
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%http_cookies
|
||||
Cookies
|
||||
The cookies the server sent in the response in the Cookie:COOKIE_VALUE format. You can use this directly in the 'Headers' field of the HTTP Request action</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%http_data
|
||||
Data
|
||||
Data that the server responded from the HTTP request.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2>%http_file_output
|
||||
File Output
|
||||
Will always contain the file's full path even if you specified a directory as the File to save.</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3>%http_response_code
|
||||
Response Code
|
||||
The HTTP Code the server responded</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES4>%http_headers()
|
||||
Response Headers
|
||||
The HTTP Headers the server sent in the response. Each header is in the 'key:value' format</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES4><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES5>%http_response_length
|
||||
Response Length
|
||||
The size of the response in bytes</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES5></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
|
||||
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
|
||||
</Vals>
|
||||
</Bundle>
|
||||
<Int sr="arg1" val="1"/>
|
||||
<Int sr="arg10" val="0"/>
|
||||
<Int sr="arg11" val="0"/>
|
||||
<Int sr="arg12" val="1"/>
|
||||
<Str sr="arg2" ve="3">http://n8n.bunny-wyvern.ts.net:5678/webhook/sync-jw-backup</Str>
|
||||
<Str sr="arg3" ve="3"/>
|
||||
<Str sr="arg4" ve="3"/>
|
||||
<Str sr="arg5" ve="3">{"device": "Samsung-Tablet-S10+"}</Str>
|
||||
<Str sr="arg6" ve="3"/>
|
||||
<Str sr="arg7" ve="3"/>
|
||||
<Int sr="arg8" val="60"/>
|
||||
<Int sr="arg9" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act1" ve="7">
|
||||
<code>30</code>
|
||||
<Int sr="arg0" val="0"/>
|
||||
<Int sr="arg1" val="2"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="0"/>
|
||||
<Int sr="arg4" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act2" ve="7">
|
||||
<code>37</code>
|
||||
<ConditionList sr="if">
|
||||
<Condition sr="c0" ve="3">
|
||||
<lhs>%http_data</lhs>
|
||||
<op>2</op>
|
||||
<rhs>*Successful*</rhs>
|
||||
</Condition>
|
||||
</ConditionList>
|
||||
</Action>
|
||||
<Action sr="act3" ve="7">
|
||||
<code>30</code>
|
||||
<Int sr="arg0" val="0"/>
|
||||
<Int sr="arg1" val="3"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="0"/>
|
||||
<Int sr="arg4" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act4" ve="7">
|
||||
<code>130</code>
|
||||
<Str sr="arg0" ve="3">JWL_Restore_From_Git</Str>
|
||||
<Int sr="arg1">
|
||||
<var>%priority+1</var>
|
||||
</Int>
|
||||
<Int sr="arg10" val="1"/>
|
||||
<Str sr="arg2" ve="3"/>
|
||||
<Str sr="arg3" ve="3"/>
|
||||
<Str sr="arg4" ve="3"/>
|
||||
<Int sr="arg5" val="0"/>
|
||||
<Int sr="arg6" val="0"/>
|
||||
<Str sr="arg7" ve="3"/>
|
||||
<Int sr="arg8" val="0"/>
|
||||
<Int sr="arg9" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act5" ve="7">
|
||||
<code>38</code>
|
||||
</Action>
|
||||
</Task>
|
||||
</TaskerData>
|
||||
@@ -0,0 +1,127 @@
|
||||
<TaskerData sr="" dvi="1" tv="6.6.20">
|
||||
<Task sr="task5">
|
||||
<cdate>1774912401659</cdate>
|
||||
<edate>1774991723740</edate>
|
||||
<id>5</id>
|
||||
<nme>JWL_Restore_From_Git</nme>
|
||||
<pri>100</pri>
|
||||
<Action sr="act0" ve="7">
|
||||
<code>130</code>
|
||||
<on>false</on>
|
||||
<Str sr="arg0" ve="3">Git Sync</Str>
|
||||
<Int sr="arg1">
|
||||
<var>%priority+1</var>
|
||||
</Int>
|
||||
<Int sr="arg10" val="1"/>
|
||||
<Str sr="arg2" ve="3"/>
|
||||
<Str sr="arg3" ve="3"/>
|
||||
<Str sr="arg4" ve="3"/>
|
||||
<Int sr="arg5" val="0"/>
|
||||
<Int sr="arg6" val="0"/>
|
||||
<Str sr="arg7" ve="3"/>
|
||||
<Int sr="arg8" val="0"/>
|
||||
<Int sr="arg9" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act1" ve="7">
|
||||
<code>30</code>
|
||||
<on>false</on>
|
||||
<Int sr="arg0" val="0"/>
|
||||
<Int sr="arg1" val="2"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="0"/>
|
||||
<Int sr="arg4" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act2" ve="7">
|
||||
<code>18</code>
|
||||
<on>false</on>
|
||||
<App sr="arg0">
|
||||
<appClass>org.jw.jwlibrary.mobile.MainActivity</appClass>
|
||||
<appPkg>org.jw.jwlibrary.mobile</appPkg>
|
||||
<label>JW Library</label>
|
||||
</App>
|
||||
<Int sr="arg1" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act3" ve="7">
|
||||
<code>30</code>
|
||||
<on>false</on>
|
||||
<Int sr="arg0" val="0"/>
|
||||
<Int sr="arg1" val="2"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="0"/>
|
||||
<Int sr="arg4" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act4" ve="7">
|
||||
<code>20</code>
|
||||
<on>false</on>
|
||||
<App sr="arg0">
|
||||
<appClass>org.jw.jwlibrary.mobile.MainActivity</appClass>
|
||||
<appPkg>org.jw.jwlibrary.mobile</appPkg>
|
||||
<label>JW Library</label>
|
||||
</App>
|
||||
<Str sr="arg1" ve="3"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="1"/>
|
||||
</Action>
|
||||
<Action sr="act5" ve="7">
|
||||
<code>30</code>
|
||||
<on>false</on>
|
||||
<Int sr="arg0" val="0"/>
|
||||
<Int sr="arg1" val="3"/>
|
||||
<Int sr="arg2" val="0"/>
|
||||
<Int sr="arg3" val="0"/>
|
||||
<Int sr="arg4" val="0"/>
|
||||
</Action>
|
||||
<Action sr="act6" ve="7">
|
||||
<code>102</code>
|
||||
<Str sr="arg0" ve="3">Vault/JW_Backups/master.jwlibrary</Str>
|
||||
<Str sr="arg1" ve="3"/>
|
||||
</Action>
|
||||
<Action sr="act7" ve="7">
|
||||
<code>107361459</code>
|
||||
<Bundle sr="arg0">
|
||||
<Vals sr="val">
|
||||
<EnableDisableAccessibilityService><null></EnableDisableAccessibilityService>
|
||||
<EnableDisableAccessibilityService-type>java.lang.String</EnableDisableAccessibilityService-type>
|
||||
<Password><null></Password>
|
||||
<Password-type>java.lang.String</Password-type>
|
||||
<com.twofortyfouram.locale.intent.extra.BLURB>Actions To Perform: click(text,RESTORE)
|
||||
|
||||
click(text,CLOSE)
|
||||
|
||||
backOutOfApp()
|
||||
Not In AutoInput: true
|
||||
Not In Tasker: true
|
||||
Separator: ,
|
||||
Check Millis: 1000</com.twofortyfouram.locale.intent.extra.BLURB>
|
||||
<com.twofortyfouram.locale.intent.extra.BLURB-type>java.lang.String</com.twofortyfouram.locale.intent.extra.BLURB-type>
|
||||
<net.dinglisch.android.tasker.JSON_ENCODED_KEYS>parameters</net.dinglisch.android.tasker.JSON_ENCODED_KEYS>
|
||||
<net.dinglisch.android.tasker.JSON_ENCODED_KEYS-type>java.lang.String</net.dinglisch.android.tasker.JSON_ENCODED_KEYS-type>
|
||||
<net.dinglisch.android.tasker.RELEVANT_VARIABLES><StringArray sr=""><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0>%ailastbounds
|
||||
Last Bounds
|
||||
Bounds (left,top,right,bottom) of the item that the action last interacted with</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES0><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1>%ailastcoordinates
|
||||
Last Coordinates
|
||||
Center coordinates (x,y) of the item that the action last interacted with</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES1><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2>%err
|
||||
Error Code
|
||||
Only available if you select &lt;b&gt;Continue Task After Error&lt;/b&gt; and the action ends in error</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES2><_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3>%errmsg
|
||||
Error Message
|
||||
Only available if you select &lt;b&gt;Continue Task After Error&lt;/b&gt; and the action ends in error</_array_net.dinglisch.android.tasker.RELEVANT_VARIABLES3></StringArray></net.dinglisch.android.tasker.RELEVANT_VARIABLES>
|
||||
<net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>[Ljava.lang.String;</net.dinglisch.android.tasker.RELEVANT_VARIABLES-type>
|
||||
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>parameters plugininstanceid plugintypeid </net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS>
|
||||
<net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>java.lang.String</net.dinglisch.android.tasker.extras.VARIABLE_REPLACE_KEYS-type>
|
||||
<net.dinglisch.android.tasker.subbundled>true</net.dinglisch.android.tasker.subbundled>
|
||||
<net.dinglisch.android.tasker.subbundled-type>java.lang.Boolean</net.dinglisch.android.tasker.subbundled-type>
|
||||
<parameters>{"_action":"click(text,RESTORE)\n\nclick(text,CLOSE)\n\nbackOutOfApp()","_additionalOptions":{"checkMs":"1000","separator":",","withCoordinates":false},"_whenToPerformAction":{"notInAutoInput":true,"notInTasker":true},"generatedValues":{}}</parameters>
|
||||
<parameters-type>java.lang.String</parameters-type>
|
||||
<plugininstanceid>952ed8a8-d00f-4278-bb41-07599243b5f1</plugininstanceid>
|
||||
<plugininstanceid-type>java.lang.String</plugininstanceid-type>
|
||||
<plugintypeid>com.joaomgcd.autoinput.intent.IntentActionv2</plugintypeid>
|
||||
<plugintypeid-type>java.lang.String</plugintypeid-type>
|
||||
</Vals>
|
||||
</Bundle>
|
||||
<Str sr="arg1" ve="3">com.joaomgcd.autoinput</Str>
|
||||
<Str sr="arg2" ve="3">com.joaomgcd.autoinput.activity.ActivityConfigActionv2</Str>
|
||||
<Int sr="arg3" val="60"/>
|
||||
<Int sr="arg4" val="1"/>
|
||||
</Action>
|
||||
</Task>
|
||||
</TaskerData>
|
||||
@@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
|
||||
# --- CONFIG ---
|
||||
TARGET_DIR="/home/artanis/Inanis_Vault/JW_Backups"
|
||||
MASTER_NAME="master.jwlibrary"
|
||||
LIB_SOURCE="/usr/local/lib/libjwlCore.so"
|
||||
|
||||
# 1. Environment & Pathing
|
||||
export PATH=$PATH:/usr/local/bin:/usr/bin:/bin
|
||||
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
cd "$TARGET_DIR" || exit 1
|
||||
|
||||
# 2. Update Repo
|
||||
git pull origin main
|
||||
|
||||
# 3. Rename messy filenames (Spaces/Brackets)
|
||||
shopt -s nullglob
|
||||
counter=1
|
||||
for f in *.jwlibrary; do
|
||||
if [[ "$f" != "$MASTER_NAME" && "$f" != incoming_* ]]; then
|
||||
mv "$f" "incoming_$counter.jwlibrary"
|
||||
((counter++))
|
||||
fi
|
||||
done
|
||||
shopt -u nullglob
|
||||
|
||||
# 4. Identify standardized files
|
||||
INCOMING_FILES=$(ls incoming_*.jwlibrary 2>/dev/null)
|
||||
|
||||
if [ -z "$INCOMING_FILES" ]; then
|
||||
echo "No new device backups found. Exiting."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 5. Satisfy Binary & Merge
|
||||
ln -sf "$LIB_SOURCE" ./libjwlCore.so
|
||||
FILE_COUNT=$(echo "$MASTER_NAME $INCOMING_FILES" | wc -w)
|
||||
|
||||
if [ -f "$MASTER_NAME" ] && [ "$FILE_COUNT" -gt 1 ]; then
|
||||
jwlFusion -o:"master_tmp" "$MASTER_NAME" $INCOMING_FILES
|
||||
elif [ ! -f "$MASTER_NAME" ] && [ $(echo "$INCOMING_FILES" | wc -w) -gt 1 ]; then
|
||||
jwlFusion -o:"master_tmp" $INCOMING_FILES
|
||||
else
|
||||
# Recovery: If only 1 file exists and no master, promote it
|
||||
cp $INCOMING_FILES "$MASTER_NAME"
|
||||
echo "Promoted single file to master."
|
||||
fi
|
||||
|
||||
# 6. Cleanup & Finalize
|
||||
rm -f ./libjwlCore.so incoming_*.jwlibrary
|
||||
|
||||
if [ -f "master_tmp.jwlibrary" ]; then
|
||||
mv "master_tmp.jwlibrary" "$MASTER_NAME"
|
||||
fi
|
||||
|
||||
# 7. Git Push
|
||||
if git status --porcelain | grep -q .; then
|
||||
git add -A
|
||||
git commit -m "Automated Sync: $(date +'%Y-%m-%d %H:%M')"
|
||||
git push origin main
|
||||
echo "Sync successful. Master updated and pushed."
|
||||
else
|
||||
echo "No changes detected in master."
|
||||
fi
|
||||
Binary file not shown.
Reference in New Issue
Block a user