Skip to content

revett/rss-explore

Repository files navigation

rss-explore

GoDoc Builds Go Report Card License

Tools to help you easily find and manage RSS feeds.

Usage

Convert a YouTube video URL in to the RSS feed for that video's channel:

curl --location --silent \
  --request POST 'https://rss-explore.revcd.com/youtube/convert' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "url": "https://youtube.com/watch?v=7LICrnxWd38"
  }' | jq -r '.url'
"https://youtube.com/feeds/videos.xml?channel_id=UCWaC58KxHxyCgZVl4cRDxSg"

Raycast

Import the raycast-rss-explore.sh file as a Raycast Script Command.

Screenshot of the Raycast Script Command

Development

Code Generation

# Install oapi-codegen
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest

# Generate the API models, server implementation, and spec
make generate

Production

  • Vercel deploys each .go file within api/ as a serverless function
  • Each of these are wrappers around a handler function within the internal/handler package, which holds the business logic of the API

Local

make run

API available at http://localhost:5691

  • main.go creates a single echo.Echo instance, and registers all the handler functions from the internal/handler package as routes
  • This is done via the api.ServerInterface that is generated by deepmap/oapi-codegen, to make sure that the OpenAPI spec is correctly implemented
  • This means that get a near-similar experience to production without having to mess about with Vercel's api/ directory structure