Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul committed Oct 5, 2023
1 parent 81c4682 commit 5bbfb5f
Show file tree
Hide file tree
Showing 32 changed files with 15 additions and 11,264 deletions.
90 changes: 0 additions & 90 deletions .github/scripts/build_previewers.py

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/build_react_previewers.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,2 @@
/.project
/.settings
.DS_STORE
node_modules
dist
scripts/flow/*/.flowconfig
.flowconfig
*~
*.pyc
.grunt
_SpecRunner.html
__benchmarks__
build/
remote-repo/
coverage/
.module-cache
fixtures/dom/public/react-dom.js
fixtures/dom/public/react.js
test/the-files-to-test.generated.js
*.log*
chrome-user-data
*.sublime-project
*.sublime-workspace
.idea
*.iml
.vscode
*.swp
*.swo

packages/react-devtools-core/dist
packages/react-devtools-extensions/chrome/build
packages/react-devtools-extensions/chrome/*.crx
packages/react-devtools-extensions/chrome/*.pem
packages/react-devtools-extensions/firefox/build
packages/react-devtools-extensions/firefox/*.xpi
packages/react-devtools-extensions/firefox/*.pem
packages/react-devtools-extensions/shared/build
packages/react-devtools-extensions/.tempUserDataDir
packages/react-devtools-inline/dist
packages/react-devtools-shell/dist
packages/react-devtools-timeline/dist
93 changes: 7 additions & 86 deletions 5.2curlcommands.md
Original file line number Diff line number Diff line change
Expand Up @@ -696,54 +696,6 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
}'
```

### H5Web Previewer for HDF5 and NetCDF files:

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"H5Web",
"description":"Explore and visualize HDF5 files",
"toolName":"HDF5Preview",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/HDF5Preview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"apiToken":"{apiToken}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"application/x-hdf5"
}'
```

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"H5Web",
"description":"Explore and visualize HDF5 files",
"toolName":"HDF5Preview",
"scope":"file",
"types":["preview"],
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/HDF5Preview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"apiToken":"{apiToken}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"application/netcdf"
}'
```

### Markdown Previewer (beta)

```bash
Expand All @@ -769,48 +721,17 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
}'
```

### ESRI Shape Previewer (beta)

This previewer includes a hard-coded file size limit of a zipped shp file of 20 MB (larger zips will not be loaded). If you want to change this limit you can change the value in "previewers/betatest/js/mapshp.js", but then you have to host the customised previewer yourself (e.g. via github pages). Instructions on how to build external tools yourself can be found here: https://guides.dataverse.org/en/latest/api/external-tools.html.

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"View Map",
"description":"View a map of the file.",
"toolName":"mapShpPreviewer",
"scope":"file",
"types":["preview"],
"toolUrl":"gdcc.github.io/dataverse-previewers/previewers/betatest/MapShpPreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
{"siteUrl":"{siteUrl}"},
{"key":"{apiToken}"},
{"datasetid":"{datasetId}"},
{"datasetversion":"{datasetVersion}"},
{"locale":"{localeCode}"}
]
},
"contentType":"application/zipped-shapefile"
}'
```

### GeoTIFF Previewer (beta)

Please note that the Geotiff Previewer tries to display ALL image/tiff files in a map (because there is no own mimetype for Geotiffs at the moment). Therefore please only use it if you want to use Geotiffs only. As soon as there is an own mimetype for Geotiffs, this will be updated.

Limits are also defined for previewing raster files. Besides the file size limit (20 MB), a column and row limit (50,000) and a loading timeout (30 seconds) are defined. In case of an unsupported GeoTIFF (e.g. no projection specified), an error message is displayed after 30 seconds stating that the tiff image cannot be loaded. These limits can be adjusted as needed in previewers/betatest/js/mapraster.js, although this adjusted version must then also be hosted by yourself (e.g. via github pages). Instructions on how to build external tools yourself can be found here: https://guides.dataverse.org/en/latest/api/external-tools.html.
### RO-Crate Previewer (beta)

```bash
curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
"displayName":"View Map",
"description":"View a map of the file.",
"toolName":"mapShpPreviewer",
"displayName":"Show RO-Crate",
"description":"View the RO-Crate metadata file.",
"toolName":"rocratePreviewer",
"scope":"file",
"types":["preview"],
"toolUrl":"gdcc.github.io/dataverse-previewers/previewers/betatest/MapRasterPreview.html",
"toolUrl":"https://gdcc.github.io/dataverse-previewers/previewers/betatest/ROCratePreview.html",
"toolParameters": {
"queryParameters":[
{"fileid":"{fileId}"},
Expand All @@ -821,6 +742,6 @@ curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin
{"locale":"{localeCode}"}
]
},
"contentType":"image/tiff"
"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\""
}'
```
```
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +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.

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

## How can I help?

Expand Down
19 changes: 0 additions & 19 deletions previewers/betatest/HDF5Preview.html

This file was deleted.

49 changes: 0 additions & 49 deletions previewers/betatest/MapRasterPreview.html

This file was deleted.

Loading

0 comments on commit 5bbfb5f

Please sign in to comment.