From b6faac7ab0189af924088861556d2d6293a737bf Mon Sep 17 00:00:00 2001 From: Bounty Bot Date: Sat, 6 Jun 2026 18:30:54 +0800 Subject: [PATCH] feat: add script to append new SN radar signals to data file #49 --- README.md | 12 ++++++++++++ scripts/append_signal.sh | 23 +++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 scripts/append_signal.sh diff --git a/README.md b/README.md index 9208f26f..2f920a10 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,15 @@ Cloud cron runtime for the SN Monetization sub-project (sister to `ClaudeEarnSel ## Public repo = unlimited GitHub Actions minutes. PAT: `ClaudeEarnSelf-gh-pat` (Keychain, `relayhop` user) — repo scope. + +## Adding new radar signals + +When a new `OPEN_BOUNTY` or other signal is detected, append the tab-separated line to +data files under `data/sn_targets_accumulated/`. Use the helper script: + +```bash +# single line +echo "1503135 Stacker_Sports 3 841 2100 12 16.0 232181 3719 recent@Stacker_Sports|top@Stacker_Sports OPEN_BOUNTY,SELF_POST_OPP Weekly Random Sports Pick 'em" | bash scripts/append_signal.sh +``` + +The script ensures the header row exists and appends to `all_signals.tsv`. diff --git a/scripts/append_signal.sh b/scripts/append_signal.sh new file mode 100644 index 00000000..1de72cf0 --- /dev/null +++ b/scripts/append_signal.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# append_signal.sh – Append a single SN radar signal line to all_signals.tsv +# Usage: echo "" | ./append_signal.sh +# Or: ./append_signal.sh "" + +DATA_FILE="data/sn_targets_accumulated/all_signals.tsv" +HEADER="# id\tsub\tcol3\tcol4\tcol5\tcol6\tcol7\tcol8\tcol9\tcol10\tcol11\tcol12" + +mkdir -p "$(dirname "$DATA_FILE")" + +if [ ! -f "$DATA_FILE" ]; then + echo "$HEADER" > "$DATA_FILE" + echo "Created $DATA_FILE with header." +fi + +if [ $# -ge 1 ]; then + LINE="$1" +else + read -r LINE +fi + +echo "$LINE" >> "$DATA_FILE" +echo "Appended signal to $DATA_FILE"