Skip to content

Commit

Permalink
Merge pull request #48 from gdcc/v1.4
Browse files Browse the repository at this point in the history
V1.4 release changes
  • Loading branch information
qqmyers committed Dec 15, 2023
2 parents 6011951 + 2706a48 commit 8bc70f5
Show file tree
Hide file tree
Showing 58 changed files with 87,680 additions and 85 deletions.
78 changes: 40 additions & 38 deletions 5.2curlcommands.md

Large diffs are not rendered by default.

78 changes: 39 additions & 39 deletions 6.1curlcommands.md

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dataverse Previewers

A collection of data file previewers that conform to the [Dataverse](https://dataverse.org) external tools interface, originally developed by the [Qualitative Data Repository](https://qdr.syr.edu). Earlier versions of Dataverse (v4.11+) make previewers available through the external tools button on Dataset pages (left). Newer versions (v4.18+) also use previewers for embedded display on Datafile pages (right). Even more recent versions (5.2+) can distinguish 'preview' and 'explore' tools and display them in different ways/separate places.
A collection of data file previewers that conform to the [Dataverse](https://dataverse.org) external tools interface, originally developed by the [Qualitative Data Repository](https://qdr.syr.edu). v1.4 includes 17 previewers covering 34+ MIMEtypes. Earlier versions of Dataverse (v4.11+) make previewers available through the external tools button on Dataset pages (left). Newer versions (v4.18+) also use previewers for embedded display on Datafile pages (right). Even more recent versions (5.2+) can distinguish 'preview' and 'explore' tools and display them in different ways/separate places.

As of Dataverse 6.1, Previewers can use temporary signedUrls when accessing restricted files rather than long-lived API tokens. (SignedUrls were introduced in Dataverse 5.13 but did not work with Dataset PrivateUrl access until 6.1)

Expand Down Expand Up @@ -91,14 +91,14 @@ Contributors are expected to keep the master branch in a 'production-ready' stat

By committing code to the repository, Contributors are agreeing to make it available under the [MIT Open Source license](https://gdcc/dataverse-previewers/LICENSE).

## Example Curl commands to configure these tools with your Dataverse instance. The examples configure Previewers from the specified location within https://github.io/gdcc/ corresponding to a given branch. TO use older versions or locally installed versions of the previewers, you can change the "toolUrl" being used.
## Example Curl commands to configure these tools with your Dataverse instance.
The examples configure Previewers from the specified location within https://github.io/gdcc/ corresponding to a given branch. To use older versions or locally installed versions of the previewers, you can change the "toolUrl" being used.

Release of v1.4 is expected Dec. 2023

BetaTest Only (for testing, may change, not recommended for a production site):
Previewers v1.4 (with betatest versions of newer previewers as noted)
- [Dataverse 6.1+](6.1curlcommands.md) - using SignedUrls
Previewers v1.3 (with betatest versions of newer previewers as noted)
- [Dataverse 5.2+](5.2curlcommands.md) - using API tokens, not recommended beyond Dataverse 6.0
Previewers v1.3 (doesn't include newer previewers, configuration examples intended for Dataverse < v5.2)

Previewers v1.3 (doesn't include newer previewers, configuration examples intended for Dataverse < v5.2. Newer previewers may work with Dataverse < v5.2 but they have not been tested.)
- [Dataverse <= v5.1](pre5.2curlcommands.md)

4 changes: 2 additions & 2 deletions previewers/betatest/js/richhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ function writeContentAndData(data, fileUrl, file, title, authors) {
header.append($('<div/>').html($.i18n('richContentWarning')).addClass('center'));
subheader = $('<div/>').appendTo(header).addClass('center');
subheader.append($("<div/>").addClass("btn btn-default")
.html("<a href=\"javascript:console.log('Click');$('.preview').html(theData);\">" + $.i18n('displayWithRichContent') + "</a>"));
.html("<a href=\"javascript:$('.preview').html(theData);\">" + $.i18n('displayWithRichContent') + "</a>"));
subheader.append($("<div/>").addClass("btn btn-default")
.html("<a href=\"javascript:console.log('Click');$('.preview').html(filterXSS(theData,options));\">" + $.i18n('displayWithoutRichContent') + "</a>"));
.html("<a href=\"javascript:$('.preview').html(filterXSS(theData,options));\">" + $.i18n('displayWithoutRichContent') + "</a>"));
} else {
//Display filtered content as for normal HTML Previewer
$('.preview').append($("<div/>").html(filterXSS(data)));
Expand Down
33 changes: 33 additions & 0 deletions previewers/v1.4/AudioPreview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<html>

<head>
<meta charset="utf-8">
<title class="audioPreviewText">Audio 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/audio.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://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="css/preview.css" />
</head>

<body class="container">
<main>
<img id='logo' alt='Site Logo'>
<h1 class="page-title audioPreviewText">Audio Preview</h1>
<div class='preview-container'>
<div class='preview-header'></div>
<div class='preview'></div>
</div>
</main>
</body>

</html>
19 changes: 19 additions & 0 deletions previewers/v1.4/HDF5Preview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<title>H5Web</title>

<meta name="description" content="Web-based HDF5 file viewer." />
<script src="https://polyfill.io/v3/polyfill.min.js?features=globalThis"></script>
<script type="module" crossorigin src="./js/hdf5.js"></script>
<link rel="stylesheet" href="./css/hdf5.css">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>

</body>
</html>
33 changes: 33 additions & 0 deletions previewers/v1.4/HtmlPreview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<html>

<head>
<meta charset="utf-8">
<title class="htmlPreviewText">Html 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/html.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://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="css/preview.css" />
</head>

<body class="container">
<main>
<img id='logo' alt='Site Logo'>
<h1 class="page-title htmlPreviewText">Html Preview</h1>
<div class='preview-container'>
<div class='preview-header'></div>
<div class='preview'></div>
</div>
</main>
</body>

</html>
35 changes: 35 additions & 0 deletions previewers/v1.4/HypothesisPreview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<html>

<head>
<meta charset="utf-8">
<title class="annotationsText">Annotations</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/showdown.min.js"></script>
<script type="text/javascript" src="js/showdown-xss-filter.js"></script>
<script type="text/javascript" src="js/hypothesis.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://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="css/preview.css" />
</head>

<body class="container">
<main>
<img id='logo' alt='Site Logo'>
<h1 class="page-title">
<a href="https://qdr.syr.edu/ati">ATI</a><span class="annotationsText">Annotations</span>
</h1>
<div class='preview-header'></div>
<div class="hypothesis"></div>
</main>
</body>

</html>
34 changes: 34 additions & 0 deletions previewers/v1.4/ImagePreview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html>

<head>
<meta charset="utf-8">
<title class="imagePreviewText">Image 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/image.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-zoom/1.7.21/jquery.zoom.min.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://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="css/preview.css" />
</head>

<body class="container">
<main>
<img id='logo' alt='Site Logo'>
<h1 class="page-title imagePreviewText">Image Preview</h1>
<div class='preview-container'>
<div class='preview-header'></div>
<div class='preview'></div>
</div>
</main>
</body>

</html>
36 changes: 36 additions & 0 deletions previewers/v1.4/MapPreview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<html>
<head>
<meta charset="utf-8">
<title class="mapPreviewText">Map 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 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://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<!-- Leaflet -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin="anonymous"/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin="anonymous"></script>
<link type="text/css" rel="stylesheet" href="css/preview.css" />
</head>

<body class="container">
<main>
<img id='logo' alt='Site Logo'>
<h1 class="page-title mapPreviewText">Map Preview</h1>
<div class='preview-container'>
<div class='preview-header'></div>
<div class='preview'>
<div id="map" style="width: 800px; height: 500px;"></div>
</div>
</div>
</main>
<script type="text/javascript" src="js/map.js"></script>
</body>
</html>
49 changes: 49 additions & 0 deletions previewers/v1.4/MapRasterPreview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<html>
<head>
<meta charset="utf-8">
<title class="mapPreviewText">Map 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 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://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<!-- Leaflet -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin="anonymous"/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin="anonymous"></script>
<link type="text/css" rel="stylesheet" href="css/preview.css" />
<!--drawing raster-->
<script src="https://unpkg.com/georaster@1.6.0/dist/georaster.browser.bundle.min.js"
integrity="sha512-SkPYBKB00LoLZf/I0yaoIwp88e7E+X5iFliB4n84vmzhjdEdEla/vouiA0Nr6aLHoRCB54DK8CCynKNd0DfCSg==" crossorigin="anonymous"></script>
<script src="https://unpkg.com/georaster-layer-for-leaflet@3.10.0/dist/v3/webpack/bundle/georaster-layer-for-leaflet.min.js"
integrity="sha512-bNJ+bvpXepatbIMeaida52kR2AT5lr6a9dTfb/OB0c/3O2KzUrdUi3Gtri0zvJUbfKgmG+wN3GKTkBi/6OkVVA==" crossorigin="anonymous"></script>
<!-- spinner-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.js"
integrity="sha512-C7tgVIfPE0ivBKcs2WstAh5y7Njir2odGBjnuIa64SmVzZIoTb8kRrNursRzEv4bNcesPywtVAXqH1GmqRBmpg==" crossorigin="anonymous"></script>
</head>

<body class="container">
<main>
<img id='logo' alt='Site Logo'>
<h1 class="page-title mapPreviewText">Map Preview</h1>
<div class="alert alert-warning" id="file_error" hidden>
<span class="glyphicon glyphicon-warning-sign"></span>&nbsp;<strong>Drawing Error</strong>
</div>
<div class='preview-container'>
<div class='preview-header'></div>
<div class='preview'>
<div id="map" style="width: 800px; height: 500px;"></div>
</div>
</div>
</main>
<script type="text/javascript" src="js/mapraster.js"></script>
</body>
</html>
50 changes: 50 additions & 0 deletions previewers/v1.4/MapShpPreview.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<html>
<head>
<meta charset="utf-8">
<title class="mapPreviewText">Map 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 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://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<!-- Leaflet -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin="anonymous"/>
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin="anonymous"></script>
<link type="text/css" rel="stylesheet" href="css/preview.css" />
<!-- ShapeJS-->
<script src="https://cdn.rawgit.com/calvinmetcalf/shapefile-js/gh-pages/dist/shp.js"
integrity="sha512-RT1pg7PTZ3R8amXsuOV3aJAVjBxenRKgmLg68ZMN6RMeRQWTrbxnPszM9+6/UVkmuRYaM0cg6R5lqwQJfJhVUw==" crossorigin="anonymous"></script>
<script src="https://cdn.rawgit.com/calvinmetcalf/leaflet.shapefile/gh-pages/leaflet.shpfile.js"
integrity="sha512-pZ4bO+wYEIa3xGxktY7N3CDNF4QfBlzmps/cqfOY2SZA7v1kH/y7rxQaqvk1W31NqjVTcyZkV0fPaOBGcCTOgg==" crossorigin="anonymous"></script>
<!-- spinner-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/spin.js/2.3.2/spin.js"
integrity="sha512-C7tgVIfPE0ivBKcs2WstAh5y7Njir2odGBjnuIa64SmVzZIoTb8kRrNursRzEv4bNcesPywtVAXqH1GmqRBmpg==" crossorigin="anonymous"></script>

</head>

<body class="container">
<main>
<img id='logo' alt='Site Logo'>
<h1 class="page-title mapPreviewText">Map Preview</h1>
<div class="alert alert-warning" id="file_error" hidden>
<span class="glyphicon glyphicon-warning-sign"></span>&nbsp;<strong>Drawing Error</strong>
</div>
<div class='preview-container'>
<div class='preview-header'></div>
<div class='preview'>
<div id="map" style="width: 800px; height: 500px;"></div>
</div>
</div>
</main>
<script type="text/javascript" src="js/mapshp.js"></script>
</body>
</html>
Loading

0 comments on commit 8bc70f5

Please sign in to comment.