Skip to content

Commit

Permalink
RO-Crate previewer
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul committed Oct 2, 2023
1 parent ab93045 commit 52f9272
Show file tree
Hide file tree
Showing 6 changed files with 34,126 additions and 1 deletion.
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

0 comments on commit 52f9272

Please sign in to comment.