#!/bin/bash # https://www.alexhyett.com/notes/getting-starred-items-from-miniflux/ # Define API endpoint and token API_URL="" AUTH_TOKEN="" # Fetch JSON response from the API response=$(curl -s -H "X-Auth-Token: $AUTH_TOKEN" $API_URL/v1/entries?starred=true) # Parse JSON to get entry IDs entry_ids=$(echo "$response" | jq -r '.entries[].id') # Loop through each entry ID and send a PUT request to unstar it for entry_id in $entry_ids; do update_url="$API_URL/v1/entries/$entry_id/bookmark" curl -s -o /dev/null -X PUT -H "Content-Type: application/json" -H "X-Auth-Token: $AUTH_TOKEN" $update_url done echo "Unstarred all entries."