Skip to content

Instantly share code, notes, and snippets.

@adamburmister
Created October 19, 2017 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamburmister/f224ab1dacc8767f8983234a9fc1157b to your computer and use it in GitHub Desktop.
Save adamburmister/f224ab1dacc8767f8983234a9fc1157b to your computer and use it in GitHub Desktop.
CLI to look up Porsche vehicle details (sale price, options lists, warranty info) from a VIN
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Usage: $0 VIN" >&2
exit 1
fi
# Usage:
output_file_name="/tmp/porsche-$1.html"
curl -s -# http://admin.porschedealer.com/reports/build_sheets/print.php\?vin\=$1 | pup "style, .container" > $output_file_name
if type "open" > /dev/null; then
open $output_file_name
fi
echo "Wrote $output_file_name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment