nixos-config/claude-code/skills/article-extractor/default.nix
Sridhar Ratnakumar c527cde02f toplevel
2025-11-10 15:23:26 -05:00

23 lines
383 B
Nix

{ writeShellApplication, curl, reader }:
writeShellApplication {
name = "article-extractor";
runtimeInputs = [ curl reader ];
text = ''
URL="$1"
# Create unique temp file
TEMP_HTML=$(mktemp)
# Download HTML
curl -s -L "$URL" > "$TEMP_HTML"
# Extract and output article to stdout
reader "$TEMP_HTML"
# Clean up
rm "$TEMP_HTML"
'';
}