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

DD-1698 + DD-1699: 1.4-DANS-PATCH-1 video #7

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
cf94966
allow NcML preview to work with drafts #25
pdurbin May 17, 2023
d8c1a35
Merge pull request #32 from gdcc/25-ncml-drafts
qqmyers Jun 22, 2023
6011951
Merge pull request #47 from gdcc/develop
qqmyers Dec 8, 2023
8bc70f5
Merge pull request #48 from gdcc/v1.4
qqmyers Dec 15, 2023
3c51c89
Bump follow-redirects in /previewers/react-source/hdf5-previewer
dependabot[bot] Jan 10, 2024
a0e0ec9
Bump vite from 3.2.7 to 3.2.8 in /previewers/react-source/hdf5-previewer
dependabot[bot] Jan 19, 2024
1d07130
Merge pull request #50 from gdcc/dependabot/npm_and_yarn/previewers/r…
qqmyers Jan 22, 2024
b57d8cd
Merge pull request #51 from gdcc/dependabot/npm_and_yarn/previewers/r…
qqmyers Jan 22, 2024
8bcf476
Merge branch 'develop' of https://github.com/gdcc/dataverse-previewer…
qqmyers Jan 22, 2024
f4aa868
Bump follow-redirects in /previewers/react-source/hdf5-previewer
dependabot[bot] Mar 16, 2024
5c66976
Bump vite in /previewers/react-source/hdf5-previewer
dependabot[bot] Apr 3, 2024
3afea8e
Initial implementation of a X3D previewer with the X_ITE library
PaulBoon Apr 20, 2024
3897969
Copied v1.4 to v1.5 and removed x3d from v1.4
PaulBoon Apr 29, 2024
7d2ee26
Moved x3d from v1.5 to betatest and removed v1.5 folder
PaulBoon May 3, 2024
c3d2a1e
Cleanup of x3dview.js
PaulBoon May 3, 2024
5ff7287
Added more mimetypes for the X3DPreviewer
PaulBoon May 3, 2024
8dcbbaf
Set x3d-canvas width to 100%, allowing a wider view
PaulBoon May 3, 2024
ba88766
Moving below Betatest label
qqmyers May 3, 2024
bdf9700
Adding Ack/dropping v1.5 text
qqmyers May 3, 2024
b60f6e5
Instead of loading x_ite from Github it now loads it from jsdelivery …
PaulBoon May 3, 2024
227eaae
Improved x3d previewe title
PaulBoon May 3, 2024
3f1d4fa
Merge pull request #56 from PaulBoon/X3DViewer
qqmyers May 3, 2024
7e32887
Local Install script building on @BenediktMeierUIT download script
qqmyers May 22, 2024
5a8ecea
updates
qqmyers May 22, 2024
07767d9
Added missing value for max-width video preview
gwendoux May 16, 2024
19c7d07
Merge pull request #61 from gwendoux/develop
qqmyers May 23, 2024
bb94c7e
add changing example commands
qqmyers May 23, 2024
f506dff
updated instructions
qqmyers May 23, 2024
db46ec0
Merge remote-tracking branch 'gdcc/develop' into localinstall
qqmyers May 23, 2024
889013c
minor text edits
qqmyers May 24, 2024
5229ffc
Merge pull request #63 from gdcc/localinstall
qqmyers May 24, 2024
6d9ac86
Merge pull request #54 from gdcc/dependabot/npm_and_yarn/previewers/r…
qqmyers May 24, 2024
d1bc1b7
Merge pull request #53 from gdcc/dependabot/npm_and_yarn/previewers/r…
qqmyers May 24, 2024
771c770
fix for Firefox issue in displaying rich text
qqmyers May 30, 2024
345f121
Merge pull request #65 from gdcc/gdcc-64
qqmyers May 30, 2024
b14d4ab
incorrect folder for X3DPreview
qqmyers May 30, 2024
8ccccda
Merge branch 'develop' of https://github.com/gdcc/dataverse-previewer…
qqmyers May 30, 2024
76b2cd5
loading svg previewers
BenediktMeierUIT Jun 3, 2024
a286355
Bump braces in /previewers/react-source/hdf5-previewer
dependabot[bot] Jun 21, 2024
180cacc
Merge pull request #67 from DataverseNO/svg-logo-loading
qqmyers Jun 26, 2024
edafba9
Merge pull request #70 from gdcc/dependabot/npm_and_yarn/previewers/r…
qqmyers Jun 26, 2024
2fb10bb
remove polyfill.io from HDF5 Preview
qqmyers Jun 27, 2024
32864e5
Merge pull request #74 from gdcc/HDF5_fix
qqmyers Jun 27, 2024
b2a37ca
Initial Voyager 3D support for .glb files
qqmyers Aug 7, 2024
e997a95
registration example, readme updates
qqmyers Aug 8, 2024
41e6f1e
update to the latest compatible 42.1 version
qqmyers Aug 8, 2024
697cf3d
Use stock script
qqmyers Aug 8, 2024
353e9c8
Tweak naming, keep pre-6.4 edited script
qqmyers Aug 12, 2024
23df48d
Merge pull request #77 from gdcc/Voyager3D
qqmyers Aug 12, 2024
e7da8c7
cleanup
qqmyers Aug 12, 2024
da37018
Merge branch 'Voyager3D' into develop
qqmyers Aug 12, 2024
b190861
include support for Accept * to allow DV 6.3 etc. to use it
qqmyers Aug 12, 2024
909b027
Upgrade to modified v0.43.0
qqmyers Aug 12, 2024
47adf4b
need md url for separate page even though it doesn't show
qqmyers Aug 13, 2024
6ee7f2b
Update localinstall.sh
qqmyers Oct 25, 2024
71b8b1c
v1.4.1 max 100% width/height for video previewer
jo-pol Nov 14, 2024
fc8c254
reverted unintentional change
jo-pol Nov 21, 2024
95f4b44
Merge pull request #4 from DANS-KNAW-jp/DD-1699-too-large-video
janvanmansum Nov 21, 2024
3ffeb84
videos: max-width/height subtitles
jo-pol Feb 6, 2025
529609f
default not ???
jo-pol Feb 6, 2025
8bcad97
priority for depositors choice for default
jo-pol Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
299 changes: 299 additions & 0 deletions 6.1curlcommands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1496,3 +1496,302 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin

## Beta Versions:
As updates and additions are made, they will be added to a /betatest sub-folder which will make them accessible to users via github.io without affecting people who are using the latest numbered release (e.g. v1.4). When previewers in the betatest branch are included in the next release (e.g. v1.5), sites may wish to change their registration of the tools to use the stable version as the betatest version may continue to receive changes.
### 3D model Previewer using X_ITE X3D (beta)

__Note:__ There are many mimetypes that can be rendered as 3D models. The following example is for X3D files. You can add more mimetypes by adding more entries to the "contentType" field.

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Read 3D model",
"description":"Read the 3D model file using X3D from X_ITE.",
"toolName":"3D model Previewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/X3DPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"model/x3d+xml",
"allowedApiCalls": [
{
"name": "retrieveFileContents",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
"timeOut": 3600
},
{
"name": "downloadFile",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
"timeOut": 3600
},
{
"name": "getDatasetVersionMetadata",
"httpMethod": "GET",
"urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}",
"timeOut": 3600
}
]
}'
```

More types for 3D models that X_ITE can load below.

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Read 3D model",
"description":"Read the 3D model file using X3D from X_ITE.",
"toolName":"3D model Previewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/X3DPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"model/vrml",
"allowedApiCalls": [
{
"name": "retrieveFileContents",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
"timeOut": 3600
},
{
"name": "downloadFile",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
"timeOut": 3600
},
{
"name": "getDatasetVersionMetadata",
"httpMethod": "GET",
"urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}",
"timeOut": 3600
}
]
}'
```

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Read 3D model",
"description":"Read the 3D model file using X3D from X_ITE.",
"toolName":"3D model Previewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/X3DPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"model/gltf-binary",
"allowedApiCalls": [
{
"name": "retrieveFileContents",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
"timeOut": 3600
},
{
"name": "downloadFile",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
"timeOut": 3600
},
{
"name": "getDatasetVersionMetadata",
"httpMethod": "GET",
"urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}",
"timeOut": 3600
}
]
}'
```

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Read 3D model",
"description":"Read the 3D model file using X3D from X_ITE.",
"toolName":"3D model Previewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/X3DPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"model/obj",
"allowedApiCalls": [
{
"name": "retrieveFileContents",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
"timeOut": 3600
},
{
"name": "downloadFile",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
"timeOut": 3600
},
{
"name": "getDatasetVersionMetadata",
"httpMethod": "GET",
"urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}",
"timeOut": 3600
}
]
}'
```

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Read 3D model",
"description":"Read the 3D model file using X3D from X_ITE.",
"toolName":"3D model Previewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/X3DPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"model/stl",
"allowedApiCalls": [
{
"name": "retrieveFileContents",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
"timeOut": 3600
},
{
"name": "downloadFile",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
"timeOut": 3600
},
{
"name": "getDatasetVersionMetadata",
"httpMethod": "GET",
"urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}",
"timeOut": 3600
}
]
}'
```

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"Read 3D model",
"description":"Read the 3D model file using X3D from X_ITE.",
"toolName":"3D model Previewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/X3DPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"model/x-ply",
"allowedApiCalls": [
{
"name": "retrieveFileContents",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
"timeOut": 3600
},
{
"name": "downloadFile",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=false",
"timeOut": 3600
},
{
"name": "getDatasetVersionMetadata",
"httpMethod": "GET",
"urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}",
"timeOut": 3600
}
]
}'
```
### Smithsonian Voyager 3D model Previewer (beta)

__Note:__ Voyager supports multiple formats. Only *.glb (model/gltf-binary) is currently supported by the Previewer.
Also note that with current styling the Voyager app fills the window when launched as a separate page, so the usual
preview header/footer information doesn't show (and therefore isn't even requested from Dataverse).

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"View 3D model",
"description":"Explore the 3D model file using Voyager.",
"toolName":"voyagerPreviewer",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/VoyagerPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"model/gltf-binary",
"allowedApiCalls": [
{
"name": "retrieveFileContents",
"httpMethod": "GET",
"urlTemplate": "/api/v1/access/datafile/{fileId}?gbrecs=true",
"timeOut": 3600
},
{
"name": "getDatasetVersionMetadata",
"httpMethod": "GET",
"urlTemplate": "/api/v1/datasets/{datasetId}/versions/{datasetVersion}",
"timeOut": 3600
}
]
}'
```

15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ or, to just change between versions after you've switched to using the gdcc repo

update externaltool set toolurl=REPLACE(toolurl, 'v1.2', 'v1.3');

## Fully Local Installation
By default, previewers reference several JavaScript libraries and style files from their original web locations. If you would like to have a local installation that doesn't require access to other websites, you can use the localinstall.sh script. Download the repository to your local machine, change to the root directory where the localinstall.sh script is and run

./localinstall.sh previewers/v1.4 https://<your host>/<your base path to the previewers>

and the script will download all external JavaScript and css files required by the previewers for the version you specified and will update the example configuration commands in the 6.1curlcommands.md, 5.2curlcommands.md and pre5.2curlcommands.md files to reference your local URL. In the case above, using the parameters previewers/v1.4 and https://example.com/path would result example curl commands where the TextPreview.html would be available at https://example.com/path/previewers/v1.4/TextPreview.html.

## How do they work?

Expand All @@ -66,7 +72,8 @@ The image previewer only works with image/tiff files on some browsers (as of ~Ja

The original tools were developed through the [Qualitative Data Repository](https://qdr.syr.edu) but are being offered to the Dataverse community at large.

[qqmyers](https://github.com/qqmyers) - developer of the original previewer framework, contributions to the Rich Html Previewer
[qqmyers](https://github.com/qqmyers) - developer of the original previewer framework, contributions to the Rich Html Previewer, Voyager Previewer, updating to use signed URLs

The Spreadsheet Previewer was contributed by [anncie-pcss](https://github.com/anncie-pcss).

[pdurbin](https://github.com/pdurbin) updated the retriever.js script to allow previewers to be embedded directly in the Dataverse file pages.
Expand All @@ -81,6 +88,9 @@ The Spreadsheet Previewer was contributed by [anncie-pcss](https://github.com/an

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

[Paul Boon](https://github.com/PaulBoon) contributed the 3D Previewer.


## How can I help?

If you are interested in adding additional previewers, or in maintaining/enhancing existing ones, contact us at [[email protected]](mailto:[email protected]) or work through github to fork/make pull-requests against the repository.
Expand All @@ -94,8 +104,7 @@ By committing code to the repository, Contributors are agreeing to make it avail
## 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.


Previewers v1.4 (with betatest versions of newer previewers as noted)
Previewers v1.4 (with betatest versions of newer previewers as noted, e.g. 3D Previewer)
- [Dataverse 6.1+](6.1curlcommands.md) - using SignedUrls
- [Dataverse 5.2+](5.2curlcommands.md) - using API tokens, not recommended beyond Dataverse 6.0

Expand Down
Loading