Skip to content

Commit

Permalink
changing folder from format to crosswalk in xslt.sh + fixing error in…
Browse files Browse the repository at this point in the history
… string reading the shell code + xslt now available on https://oai-input.portal.mardi4nfdi.de/oai-backend/crosswalk
  • Loading branch information
Mazztok45 committed Feb 7, 2024
1 parent 02cf02f commit e1273d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xslt/xslt-article-transformation.xslt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:oai_zb_preview="https://zbmath.org/OAI/2.0/oai_zb_preview/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:zbmath="https://zbmath.org/zbmath/elements/1.0/">
<xsl:template match="/">
<oai_zb_preview>
Expand Down
6 changes: 4 additions & 2 deletions xslt/xslt.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/bash
AUTH=$(echo -n "$OAI_BASIC_USER:$OAI_BASIC_PASSWORD" | base64)
XSLT_RADAR_DC='https://github.com/MaRDI4NFDI/python-zbMathRest2Oai/blob/main/xslt/xslt-article-transformation.xslt'
curl --noproxy '*' -X POST -H 'Content-Type: application/json' -i 'https://oai-input.portal.mardi4nfdi.de/oai-backend/item' --header "Authorization: Basic $AUTH" --data '{"name":"Radar2OAI_DC_v09","formatFrom":"radar","formatTo":"oai_dc","xsltStylesheet":'"$XSLT_RADAR_DC}"'}'
XSLT_RADAR_DATACITE='cat xslt-article-transformation.xslt | jq -Rsa . '
VAR_XSLT_RADAR_DATACITE=$(eval "$XSLT_RADAR_DATACITE")

curl --noproxy '*' -X POST -H 'Content-Type: application/json' -i 'https://oai-input.portal.mardi4nfdi.de/oai-backend/crosswalk' --header "Authorization: Basic $AUTH" --data '{"name":"Radar2OAI_DATACITE","formatFrom":"radar","formatTo":"datacite","xsltStylesheet":'"$VAR_XSLT_RADAR_DATACITE}"'}'

0 comments on commit e1273d3

Please sign in to comment.