Skip to content

Instantly share code, notes, and snippets.

@stevedylandev
Created October 3, 2025 19:53
Show Gist options
  • Save stevedylandev/3bc0a8de45f646d0c6f0abf6cdfe4bdc to your computer and use it in GitHub Desktop.
Save stevedylandev/3bc0a8de45f646d0c6f0abf6cdfe4bdc to your computer and use it in GitHub Desktop.
A simple bash script that pulls down my current RSS feeds from a FreshRSS instance and converts it into a tidy markdown list (used at bearblog.stevedylan.dev/feeds)
#!/bin/bash
# Fetch the JSON data and parse it with jq to create markdown links
response=$(curl -s "https://feeds.stevedylan.dev?format=json" | \
jq -r '.subscriptions[] | "- [\(.title)](\(.htmlUrl))"' | \
sort)
# Copy to clipboard (works on macOS, Linux with xclip, or Linux with xsel)
if command -v pbcopy &> /dev/null; then
# macOS
echo "$response" | pbcopy
echo "✔︎ Feeds copied to clipboard"
elif command -v xclip &> /dev/null; then
# Linux with xclip
echo "$response" | xclip -selection clipboard
echo "Copied to clipboard (xclip)"
elif command -v xsel &> /dev/null; then
# Linux with xsel
echo "$response" | xsel --clipboard --input
echo "Copied to clipboard (xsel)"
else
echo "Error: No clipboard utility found. Install pbcopy (macOS), xclip, or xsel (Linux)"
echo "$response"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment