From 8245611c01c387b3241589edfa7234d6c32ee358 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Sat, 14 Mar 2026 19:36:22 -0700 Subject: [PATCH 1/3] offline - Added a few sample offline documentation samples --- scripts/install-offline-lib.json | 22 ++++++++++++++++++++++ scripts/install-offline-lib.sh | 31 +++++++++++++++++++++++++++++++ scripts/install.sh | 5 ++++- 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 scripts/install-offline-lib.json create mode 100755 scripts/install-offline-lib.sh diff --git a/scripts/install-offline-lib.json b/scripts/install-offline-lib.json new file mode 100644 index 0000000..da9c26a --- /dev/null +++ b/scripts/install-offline-lib.json @@ -0,0 +1,22 @@ +[ + { + "url": "https://www.arrl.org/files/file/Regulatory/Band%20Chart/Hambands4_Color_11x8_5.pdf", + "file": "Hambands4_Color_11x8_5.pdf", + "dir": "bands/ham-radio" + }, + { + "url": "https://amrron.com/wp-content/uploads/2019/03/AmRRON-Intelligence-Brief-White-Paper.pdf", + "file": "AmRRON-Intelligence-Brief-White-Paper.pdf", + "dir": "nets/amrron" + }, + { + "url": "https://raw.githubusercontent.com/s2underground/GhostNet/1a2d08d579813e54967af06f1a871e7fa0ce583f/GhostNet_Version_1.5.pdf", + "file": "GhostNet_Version_1.5.pdf", + "dir": "nets/ghostnet" + }, + { + "url": "https://www.swpc.noaa.gov/sites/default/files/images/NOAAscales.pdf", + "file": "NOAAscales.pdf", + "dir": "space-weather" + } +] diff --git a/scripts/install-offline-lib.sh b/scripts/install-offline-lib.sh new file mode 100755 index 0000000..16d1529 --- /dev/null +++ b/scripts/install-offline-lib.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 14 March 2026 +# Purpose : Installs a variety of offline resources + +. ./env.sh +. ../overlay/opt/emcomm-tools/bin/et-common + +et-log "Installing offline docs..." + +OFFLINE_FILES_JSON="install-offline-lib.json" +OFFLINE_SAVE_DIR="/etc/skel/Desktop/offline" + +[[ ! -e "${OFFLINE_SAVE_DIR}" ]] && mkdir -v -p ${OFFLINE_SAVE_DIR} + +jq -c '.[]' "${OFFLINE_FILES_JSON}" | while read -r item; do + URL=$(echo "$item" | jq -r '.url') + FILE=$(echo "$item" | jq -r '.file') + DIR=$(echo "$item" | jq -r '.dir') + ABS_DIR="${OFFLINE_SAVE_DIR}/${DIR}" + + # 1. Create missing directories + mkdir -v -p "${ABS_DIR}" + + # 2. Download resources + download_with_retries ${URL} ${FILE} + + # 3. Move to offline folder + mv "${FILE}" "${ABS_DIR}/" +done + diff --git a/scripts/install.sh b/scripts/install.sh index 4650def..9c3fee2 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 -# Updated : 6 March 2026 +# Updated : 14 March 2026 # Purpose : Main installer for EmComm Tools Community (ETC) . ./env.sh @@ -102,3 +102,6 @@ exitIfNotRoot # Install security tools ./install-gpa.sh + +# Install offline resources +./install-offline-lib.sh From fe4ba49de26f3ab011e6f52a301e8cd852ed569f Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Sat, 14 Mar 2026 19:39:12 -0700 Subject: [PATCH 2/3] offline - Added test case --- tests/test-offline-lib.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 tests/test-offline-lib.sh diff --git a/tests/test-offline-lib.sh b/tests/test-offline-lib.sh new file mode 100755 index 0000000..e2cc862 --- /dev/null +++ b/tests/test-offline-lib.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 14 March 2026 +# Purpose : Test offline resource + +OUT=$(ls /etc/skel/Desktop/offline/nets/ghostnet/GhostNet_Version_1.5.pdf) +exit $? From 6a05749ab46b4b4fbb78c71bc31182f614f7fd17 Mon Sep 17 00:00:00 2001 From: thetechprepper Date: Sat, 14 Mar 2026 19:42:38 -0700 Subject: [PATCH 3/3] offline - Added BPQ cheatsheet --- scripts/install-offline-lib.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/install-offline-lib.json b/scripts/install-offline-lib.json index da9c26a..a4ee507 100644 --- a/scripts/install-offline-lib.json +++ b/scripts/install-offline-lib.json @@ -4,6 +4,11 @@ "file": "Hambands4_Color_11x8_5.pdf", "dir": "bands/ham-radio" }, + { + "url": "https://ham.packet-radio.net/packet/bpq32/bpq32-guide/bpq-user-and-sysop-commands.pdf", + "file": "bpq-user-and-sysop-commands.pdf", + "dir": "bbs/bpq" + }, { "url": "https://amrron.com/wp-content/uploads/2019/03/AmRRON-Intelligence-Brief-White-Paper.pdf", "file": "AmRRON-Intelligence-Brief-White-Paper.pdf",