From 9ae1610c274ac683c8da4c137d97e22574b2750e Mon Sep 17 00:00:00 2001 From: "Moritz Schubotz (physikerwelt)" Date: Tue, 6 Feb 2024 22:55:18 +0100 Subject: [PATCH] Add more formats tested and works Close #23 --- formats/createFormats.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/formats/createFormats.sh b/formats/createFormats.sh index cb11a32..ba358aa 100755 --- a/formats/createFormats.sh +++ b/formats/createFormats.sh @@ -1,4 +1,11 @@ +#!/bin/bash #Create OAI_DC Format -AUTH=$(echo -ne "$OAI_BASIC_USER:$OAI_BASIC_PASSWORD" | base64) +AUTH=$(echo -n "$OAI_BASIC_USER:$OAI_BASIC_PASSWORD" | base64) printf "\n\nCreate Format oai_dc\n\n" curl --noproxy '*' -X POST -H 'Content-Type: application/json' -H "Authorization: Basic $AUTH" -i 'https://oai-input.portal.mardi4nfdi.de/oai-backend/format' --data '{"metadataPrefix":"oai_dc","schemaLocation":"http://www.openarchives.org/OAI/2.0/oai_dc.xsd","schemaNamespace":"http://www.openarchives.org/OAI/2.0/oai_dc/","identifierXpath":"/identifier"}' +printf "\n\nCreate Format datacite\n\n" +curl --noproxy '*' -X POST -H 'Content-Type: application/json' -H "Authorization: Basic $AUTH" -i 'https://oai-input.portal.mardi4nfdi.de/oai-backend/format' --data '{"metadataPrefix":"datacite","schemaLocation":"https://schema.datacite.org/meta/kernel-4.0/metadata.xsd","schemaNamespace":"http://datacite.org/schema/kernel-4","identifierXpath":""}' +printf "\n\nCreate Format datacite\n\n" +curl --noproxy '*' -X POST -H 'Content-Type: application/json' -H "Authorization: Basic $AUTH" -i 'https://oai-input.portal.mardi4nfdi.de/oai-backend/format' --data '{"metadataPrefix":"oai_zb_preview","schemaLocation":"https://zbmath.org/OAI/2.0/oai_zb_preview/","schemaNamespace":"https://zbmath.org/zbmath/elements/1.0/","identifierXpath":""}' +printf "\n\n Read all formats\n\n" +curl --noproxy '*' -X GET -H "Authorization: Basic $AUTH" 'https://oai-input.portal.mardi4nfdi.de/oai-backend/format' \ No newline at end of file