Created
October 3, 2025 19:53
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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