mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-02-05 05:51:37 +00:00
feat: Implement Garmin sync, login improvements, and utility scripts
This commit is contained in:
21
list_synced_activities.sh
Executable file
21
list_synced_activities.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/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 .
|
||||
Reference in New Issue
Block a user