Skip to content

Instantly share code, notes, and snippets.

@fonsp
Created October 3, 2019 16:20
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 fonsp/655476cb1ec35f2dc23478ac22bca0a0 to your computer and use it in GitHub Desktop.
Save fonsp/655476cb1ec35f2dc23478ac22bca0a0 to your computer and use it in GitHub Desktop.
#!/bin/bash
#############################################
# CHANGE THIS LINE TO SET THE DEFAULT PROMPT
DEFAULT_PRINTI_ADDRESS="printi"
#############################################
if [ -z "$CHOSEN_ADDRESS" ]; then
echo ""
read -p "Send to printi.me/" -e -i "$DEFAULT_PRINTI_ADDRESS" PRINTI_ADDRESS
echo ""
fi
for file in "$@"
do
echo "$file:"
curl -F "files[]=@$file" "https://api.printi.me/submitimages/$PRINTI_ADDRESS" --progress-bar > /dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment