2025 June 17
Evolving the preprint evaluation world with Sciety
This post is based on an interview with Sciety team at eLife.
We provide a Java program that performs file uploads (via HTTPS POST) to Crossref. This program allows you to upload a single file, a list of files, or a whole directory of files.
To use, download crossref-upload-tool.jar and place it in /usr/local/lib.
In the following examples:
role
. If you’re using personal user credentials, the username is your email address plus the role in the following format email@address.com/role
.java -jar crossref-upload-tool.jar --user [username] [password] --metadata ([filename/directory])
Using role credentials (note: in these examples, we have used the fictional role and password combination of mrcrossref and abc134):
java -jar crossref-upload-tool.jar --user mrcrossref abc134 --metadata crdeposit234.xml
Using user credentials (note: in these examples, we have used the fictional user credential, role, and password combination of: email@address.com/role, mrcrossref, and abc134)
java -jar crossref-upload-tool.jar --user email@address.com/mrcrossref abc134 --metadata crdeposit234.xml
java -jar crossref-upload-tool.jar --user [username] [password] --resources ([filename/directory])
for example:
java -jar crossref-upload-tool.jar --user mrcrossref abc134 --metadata cr_refs.xml
Single file:
java -jar crossref-upload-tool.jar --user mrcrossref abc134 --conflicts ticket1234.txt
Directory of files:
java -jar crossref-upload-tool.jar --user mrcrossref abc134 --conflicts ALIAS_123
Single file:
java -jar crossref-upload-tool.jar -user mrcrossref abc 134 -transfers ticket1234.text
Directory of files:
java -jar crossref-upload-tool.jar -user mrcrossref abc134 -transfer ALIAS_123
If you don’t already have Crossref test system credentials configured, you’ll need to contact our technical support team in order for us to enable a test account for test.crossref.org.
java -jar crossref-upload-tool.jar --user mrcrossref abc134 --host test.crossref.org --metadata crdeposit234.xml
Note that if the –metadata option is given a directory name instead of a filename then all files within the directory are uploaded. To ensure that you are uploading what you want use the –dry-run option and review the listing of files, eg:
java -jar crossref-upload-tool.jar --user mrcrossref abc134 --metadata mydeposits/ --dry-run
If your upload is successful, you will see this message:
[…] INFO uploading to https://doi.crossref.org:443/
[…] INFO uploading submission: file=myfile.xml
[…] INFO uploaded submission: file=myfile.xml
[…] INFO done
If the username is wrong, you will see the message:
[…] INFO uploading to https://doi.crossref.org:443/
[…] INFO uploading submission: file=myfile.xml
[…] INFO unauthorized: file=myfile.xml; user=mrcrossref
[…] INFO done
--user name password
--metadata ( file | directory )
--query ( file | directory )
--transfers ( file | directory )
--handles ( file | directory )
--resources ( file | directory )
--conflicts ( file | directory )
--address host port
--protocol ( http | https )
--dry-run
--help
Where:
role
, for role credentials, or email@address.com/role
, for user credentials) and passwordEntry into terminal
java -jar /usr/local/crossref-upload-tool.jar --user mrcrossref abc134 --metadata /Users/mistercrossref/Uploader/September/19/134/
Key for entry into terminal: