From 389c7abe9653c937fe4bb3019afe731d45db01c8 Mon Sep 17 00:00:00 2001 From: cediackermann Date: Wed, 15 Apr 2026 11:13:35 +0200 Subject: [PATCH] add source fetch script this script can fetch all sources in json format from the riot website --- fetchContent.sh | 32 ++++++++++++++++++++++++++++++++ riot-sources.txt | 6 ++++++ 2 files changed, 38 insertions(+) create mode 100644 fetchContent.sh create mode 100644 riot-sources.txt diff --git a/fetchContent.sh b/fetchContent.sh new file mode 100644 index 0000000..f86ec68 --- /dev/null +++ b/fetchContent.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +OUTPUT_DIR="content" +INPUT_FILE="${1:-urls.txt}" + +mkdir -p "$OUTPUT_DIR" + +# Validate input file + +if [[ ! -f "$INPUT_FILE" ]]; then +echo "File not found: $INPUT_FILE" +exit 1 +fi + +download() { +url="$1" + +name=$(echo "$url" | awk -F/ '{print $(NF-1)}') + +filename="${name}.json" + +echo "Fetching: $url -> $filename" + +curl -sS "$url" -o "$OUTPUT_DIR/$filename" + +echo "Saved: $filename" +} + +export -f download +export OUTPUT_DIR + +cat "$INPUT_FILE" | xargs -n 1 -P 5 bash -c 'download "$@"' _ diff --git a/riot-sources.txt b/riot-sources.txt new file mode 100644 index 0000000..cdae078 --- /dev/null +++ b/riot-sources.txt @@ -0,0 +1,6 @@ +https://riotsecure.se/shield/content.json +https://riotsecure.se/brawl/content.json +https://riotsecure.se/oasis/content.json +https://riotsecure.se/fusion/content.json +https://riotsecure.se/microTLS/content.json +https://www.riotsecure.se/platform/content.json \ No newline at end of file