Files
FitTrack_GarminSync/list_synced_activities.sh

22 lines
718 B
Bash
Executable File

#!/bin/bash
# This script retrieves and lists all synced activities from the CentralDB service.
# --- Configuration ---
CENTRAL_DB_URL="http://localhost:8000" # Adjust if your CentralDB is running on a different host/port
# --- Retrieve Synced Activities ---
echo "Retrieving all synced activities from CentralDB..."
ACTIVITIES_RESPONSE=$(curl -s "${CENTRAL_DB_URL}/activities")
if [ -z "${ACTIVITIES_RESPONSE}" ]; then
echo "Error: No response received from CentralDB. Is the CentralDB service running?"
exit 1
fi
echo "${ACTIVITIES_RESPONSE}"
# Optional: Add more robust parsing and display of activities if needed
# For example, using `jq` to pretty-print the JSON:
# echo "${ACTIVITIES_RESPONSE}" | jq .