Files
CrazyClaude/tools/fetch_url_via_jina.sh
Eric Coissac 2f1d437723 Squashed '.claude/llm-functions/' content from commit 616d8d8
git-subtree-dir: .claude/llm-functions
git-subtree-split: 616d8d84c5565fdb66d8782ae5ba56d994bfa82a
2026-03-27 09:14:17 +01:00

19 lines
449 B
Bash
Executable File

#!/usr/bin/env bash
set -e
# @describe Extract the content from a given URL.
# @option --url! The URL to scrape.
# @env JINA_API_KEY The api key
# @env LLM_OUTPUT=/dev/stdout The output path
main() {
curl_args=()
if [[ -n "$JINA_API_KEY" ]]; then
curl_args+=("-H" "Authorization: Bearer $JINA_API_KEY")
fi
curl -fsSL "${curl_args[@]}" "https://r.jina.ai/$argc_url" >> "$LLM_OUTPUT"
}
eval "$(argc --argc-eval "$0" "$@")"