diff --git a/21-Server Reference/homelab/stacks/n8n/JW_Backup/Git_Sync.tsk.xml b/21-Server Reference/homelab/stacks/n8n/JW_Backup/Git_Sync.tsk.xml deleted file mode 100644 index 19d4591..0000000 --- a/21-Server Reference/homelab/stacks/n8n/JW_Backup/Git_Sync.tsk.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - 1774931800563 - 1774932946532 - 9 - Git Sync - - 107361459 - - - <null> - java.lang.String - <null> - java.lang.String - Actions To Perform: openApp(com.viscouspot.gitsync) - -click(text,SYNC CHANGES) - -backOutOfApp() -Not In AutoInput: true -Not In Tasker: true -Separator: , -Check Millis: 1000 - java.lang.String - parameters - java.lang.String - <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> - [Ljava.lang.String; - parameters plugininstanceid plugintypeid - java.lang.String - true - java.lang.Boolean - {"_action":"openApp(com.viscouspot.gitsync)\n\nclick(text,SYNC CHANGES)\n\nbackOutOfApp()","_additionalOptions":{"checkMs":"1000","separator":",","withCoordinates":false},"_whenToPerformAction":{"notInAutoInput":true,"notInTasker":true},"generatedValues":{}} - java.lang.String - 5910f160-ad6a-4b47-ab40-810a62e77df1 - java.lang.String - com.joaomgcd.autoinput.intent.IntentActionv2 - java.lang.String - - - com.joaomgcd.autoinput - com.joaomgcd.autoinput.activity.ActivityConfigActionv2 - - - - - 130 - JWL_Merge - - %priority - - - - - - - - - - - - - diff --git a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JW Library Sync.json b/21-Server Reference/homelab/stacks/n8n/JW_Backup/JW Library Sync.json deleted file mode 100644 index 94f6d29..0000000 --- a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JW Library Sync.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "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": {}, - "type": "n8n-nodes-base.wait", - "typeVersion": 1.1, - "position": [ - 336, - -208 - ], - "id": "d2827797-21f7-496e-8afb-a5044299c07d", - "name": "Wait", - "webhookId": "e147b0a0-18c4-4423-8cee-605e68f4fbde" - }, - { - "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": {}, - "connections": { - "Webhook": { - "main": [ - [ - { - "node": "Execute a command", - "type": "main", - "index": 0 - } - ] - ] - }, - "Execute a command": { - "main": [ - [ - { - "node": "Wait", - "type": "main", - "index": 0 - } - ], - [ - { - "node": "Discord", - "type": "main", - "index": 0 - } - ] - ] - }, - "Wait": { - "main": [ - [ - { - "node": "Respond to Webhook", - "type": "main", - "index": 0 - } - ] - ] - }, - "Discord": { - "main": [ - [ - { - "node": "Respond to Webhook1", - "type": "main", - "index": 0 - } - ] - ] - } - }, - "active": false, - "settings": { - "executionOrder": "v1", - "binaryMode": "separate" - }, - "versionId": "7c2bf541-5763-4961-ae65-00940a5f32f8", - "meta": { - "templateCredsSetupCompleted": true, - "instanceId": "cb40080ef54f0b350fa960324602081324276be1181221a02a674c62336f7933" - }, - "id": "rmbJkjlgZi5hbRpg", - "tags": [] -} \ No newline at end of file diff --git a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JWL_Backup_To_Git.tsk.xml b/21-Server Reference/homelab/stacks/n8n/JW_Backup/JWL_Backup_To_Git.tsk.xml deleted file mode 100644 index d5c91f4..0000000 --- a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JWL_Backup_To_Git.tsk.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - 1774912401659 - 1774932929717 - 3 - JWL_Backup_To_Git - 100 - - 20 - - org.jw.jwlibrary.mobile.MainActivity - org.jw.jwlibrary.mobile - - - - - - - - 30 - - - - - - - - 107361459 - - - <null> - java.lang.String - <null> - java.lang.String - 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 - java.lang.String - parameters - java.lang.String - parameters plugininstanceid plugintypeid - java.lang.String - true - java.lang.Boolean - {"_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":{}} - java.lang.String - 4a568374-2445-46f3-be31-a879d2940e36 - java.lang.String - com.joaomgcd.autoinput.intent.IntentActionv2 - java.lang.String - - - com.joaomgcd.autoinput - com.joaomgcd.autoinput.activity.ActivityConfigActionv2 - - - - - 30 - - - - - - - - 107361459 - - - <null> - java.lang.String - <null> - java.lang.String - Actions To Perform: click(text,Save Locally) - -click(id,android:id/button1) -Not In AutoInput: true -Not In Tasker: true -Separator: , -Check Millis: 1000 - java.lang.String - parameters - java.lang.String - <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> - [Ljava.lang.String; - parameters plugininstanceid plugintypeid - java.lang.String - true - java.lang.Boolean - {"_action":"click(text,Save Locally)\n\nclick(id,android:id/button1)","_additionalOptions":{"checkMs":"1000","separator":",","withCoordinates":false},"_whenToPerformAction":{"notInAutoInput":true,"notInTasker":true},"generatedValues":{}} - java.lang.String - babe5b2c-f87a-4a8a-ab34-6a891fce327c - java.lang.String - com.joaomgcd.autoinput.intent.IntentActionv2 - java.lang.String - - - com.joaomgcd.autoinput - com.joaomgcd.autoinput.activity.ActivityConfigActionv2 - - - - - 130 - Git Sync - - %priority - - - - - - - - - - - - - diff --git a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JWL_Merge.tsk.xml b/21-Server Reference/homelab/stacks/n8n/JW_Backup/JWL_Merge.tsk.xml deleted file mode 100644 index 8cd7981..0000000 --- a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JWL_Merge.tsk.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - 1774931254224 - 1774932950369 - 8 - JWL_Merge - - 339 - - - <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> - [Ljava.lang.String; - - - - - - - http://n8n.bunny-wyvern.ts.net:5678/webhook/sync-jw-backup - - - {"device": "Samsung-Tablet-S10+"} - - - - - - - 30 - - - - - - - - 37 - - - %http_data - 2 - *Successful* - - - - - 30 - - - - - - - - 130 - JWL_Restore_From_Git - - %priority+1 - - - - - - - - - - - - - 38 - - - diff --git a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JWL_Restore_From_Git.tsk.xml b/21-Server Reference/homelab/stacks/n8n/JW_Backup/JWL_Restore_From_Git.tsk.xml deleted file mode 100644 index 742b2c8..0000000 --- a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JWL_Restore_From_Git.tsk.xml +++ /dev/null @@ -1,146 +0,0 @@ - - - 1774912401659 - 1774932910304 - 5 - JWL_Restore_From_Git - 100 - - 20 - - org.jw.jwlibrary.mobile.MainActivity - org.jw.jwlibrary.mobile - - - - - - - - 30 - - - - - - - - 107361459 - - - <null> - java.lang.String - <null> - java.lang.String - 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,Restore Backup) -Not In AutoInput: true -Not In Tasker: true -Separator: , -Check Millis: 1000 - java.lang.String - parameters - java.lang.String - <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> - [Ljava.lang.String; - parameters plugininstanceid plugintypeid - java.lang.String - true - java.lang.Boolean - {"_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,Restore Backup)","_additionalOptions":{"checkMs":"1000","separator":",","withCoordinates":false},"_whenToPerformAction":{"notInAutoInput":true,"notInTasker":true},"generatedValues":{}} - java.lang.String - 4a568374-2445-46f3-be31-a879d2940e36 - java.lang.String - com.joaomgcd.autoinput.intent.IntentActionv2 - java.lang.String - - - com.joaomgcd.autoinput - com.joaomgcd.autoinput.activity.ActivityConfigActionv2 - - - - - 30 - - - - - - - - 107361459 - - - <null> - java.lang.String - <null> - java.lang.String - Actions To Perform: click(text,Show roots) - -click(text,Spencer's Tab S8+) - -click(text,Vault) - -click(text,JW_Backups) - -wait(500) - -click(id,com.google.android.documentsui:id/icon_thumb) - -wait(500) - -click(text,RESTORE) - -click(text,CLOSE) - -wait(500) - -backOutOfApp() -Not In AutoInput: true -Not In Tasker: true -Separator: , -Check Millis: 1000 - java.lang.String - parameters - java.lang.String - <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> - [Ljava.lang.String; - parameters plugininstanceid plugintypeid - java.lang.String - true - java.lang.Boolean - {"_action":"click(text,Show roots)\n\nclick(text,Spencer's Tab S8+)\n\nclick(text,Vault)\n\nclick(text,JW_Backups)\n\nwait(500)\n\nclick(id,com.google.android.documentsui:id/icon_thumb)\n\nwait(500)\n\nclick(text,RESTORE)\n\nclick(text,CLOSE)\n\nwait(500)\n\nbackOutOfApp()","_additionalOptions":{"checkMs":"1000","separator":",","withCoordinates":false},"_whenToPerformAction":{"notInAutoInput":true,"notInTasker":true},"generatedValues":{}} - java.lang.String - b68fb928-2b48-41e9-b01f-359d4826b699 - java.lang.String - com.joaomgcd.autoinput.intent.IntentActionv2 - java.lang.String - - - com.joaomgcd.autoinput - com.joaomgcd.autoinput.activity.ActivityConfigActionv2 - - - - - diff --git a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JW_Backup_Sync_Engine.sh b/21-Server Reference/homelab/stacks/n8n/JW_Backup/JW_Backup_Sync_Engine.sh deleted file mode 100644 index 79c4a0b..0000000 --- a/21-Server Reference/homelab/stacks/n8n/JW_Backup/JW_Backup_Sync_Engine.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/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