Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RO-Crate previewer #41

Merged
merged 9 commits into from
Dec 7, 2023
25 changes: 25 additions & 0 deletions 5.2curlcommands.md
Original file line number Diff line number Diff line change
Expand Up @@ -799,3 +799,28 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
"contentType":"image/tiff"
}'
```

### RO-Crate Previewer (beta)

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Show RO-Crate",
"description":"View the RO-Crate metadata file.",
"toolName":"rocratePreviewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/ROCratePreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"key":"{apiToken}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"application/ld+json; profile=\"http://www.w3.org/ns/json-ld#flattened http://www.w3.org/ns/json-ld#compacted https://w3id.org/ro/crate\""
}'
```
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The Spreadsheet Previewer was contributed by [anncie-pcss](https://github.com/an

[Max Planck Digital Library](https://github.com/MPDL) contributed the ZIP Previewer.

[erykkul](https://github.com/erykkul) contributed the Markdown (MD) Previewer.
[erykkul](https://github.com/erykkul) contributed the Markdown (MD) Previewer and the RO-Crate previewer.

[Jan Range](https://github.com/JR-1991) contributed the H5Web Previewer.

Expand Down
44 changes: 44 additions & 0 deletions previewers/betatest/ROCrate.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<html>

<head>
<meta charset="utf-8">
<title class="rocratePreviewText">RO-Crate Preview</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript" src="js/xss.js"></script>
<script type="text/javascript" src="js/rocrate.js"></script>
<script src="lib/jquery.i18n.js"></script>
<script src="lib/jquery.i18n.messagestore.js"></script>
<script src="lib/jquery.i18n.language.js"></script>
<script type="text/javascript" src="js/retriever.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link type="text/css" rel="stylesheet" href="css/preview.css" />
<style>
table.table {
padding-bottom: 300px;
}
</style>
</head>

<body class="container">
<main><img id='logo' alt='Site Logo'>
<h1 class="page-title rocratePreviewText">RO-Crate Preview</h1>
<div class='preview-container'>
<div class='preview-header'></div>
<div class='preview'>
<div class="container">
<div id="scripts"></div>
<div class="jumbotron">
<div id="check"></div>
</div>
<div id="summary"></div>
</div>
</div>
</div>
</main>
</body>

</html>
1 change: 1 addition & 0 deletions previewers/betatest/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"zipPreviewText": "ZIP Preview",
"mdPreviewText": "Markdown Preview",
"ncmlPreviewText": "NcML Preview",
"rocratePreviewText": "RO-Crate Preview",
"prev": "Previous",
"next": "Next",
"pageText": "Page:",
Expand Down
Loading