Created
May 2, 2024 20:31
-
-
Save cpyle0819/516ccd2ec359122b17c741f46ea6af08 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env zsh | |
# Array of command names | |
sdk_commands=( | |
GetObjectCommand | |
) | |
# Client name | |
client=s3 | |
# Base URL for documentation | |
base_url="https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/$client/command" | |
# Function to fetch and save documentation | |
fetch_doc() { | |
local cmd="$1" | |
local url="${base_url}/${cmd}" | |
local output_file="${cmd}.md" | |
echo "Fetching documentation from ${url}..." | |
curl -sL "${url}" > "${output_file}" | |
echo "Documentation saved to ${output_file}" | |
} | |
# Loop through commands and fetch documentation | |
for cmd in "${sdk_commands[@]}"; do | |
fetch_doc "$cmd" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment