Created
March 25, 2020 13:01
-
-
Save bryjbrown/aeb1c82f2e4a2798e372cbc0404e035e 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 bash | |
PREFIX='10.00000'; | |
USERNAME='username' | |
PASSWORD='password' | |
TESTMODE=true; | |
FILE='path/to/file.xml' | |
if $TESTMODE | |
then | |
URL='https://test.crossref.org/servlet/deposit' | |
else | |
URL='https://doi.crossref.org/servlet/deposit' | |
fi | |
curl -F \ | |
'operation=doQueryUpload' \ | |
-F "login_id=${USERNAME}" \ | |
-F "login_passwd=${PASSWORD}" \ | |
-F "fname=@${FILE}" \ | |
$URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmm. Not sure what to say. Just tested and both of these work (replace username/password):
As does this PHP (curl):