Stream: containers

Topic: previewers


view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 21 2023 at 19:31):

We should probably include previewers in our container setup: https://github.com/gdcc/dataverse-previewers

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 21 2023 at 19:32):

We added them a long time ago to Ansible.

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 21 2023 at 19:33):

As I test this PR, I'm wishing they were already in place: signed URLs with private url users, autogenerate API token #10098

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 21 2023 at 20:16):

Something like this should work:

cd docker-dev-volumes/app/data/docroot
mkdir dataexplore
cd dataexplore
git clone https://github.com/gdcc/dataverse-previewers.git

view this post on Zulip Philip Durbin ๐Ÿš€ (Nov 21 2023 at 20:18):

Followed by this:

curl -X POST -H 'Content-type: application/json' http://localhost:8080/api/admin/externalTools -d \
'{
  "displayName":"Read Text",
  "description":"Read the text file.",
  "toolName":"textPreviewer",
  "scope":"file",
  "types":["preview"],
  "toolUrl":"http://localhost:8080/dataexplore/dataverse-previewers/previewers/v1.3/TextPreview.html",
  "toolParameters": {
      "queryParameters":[
        {"fileid":"{fileId}"},
        {"siteUrl":"{siteUrl}"},
        {"key":"{apiToken}"},
        {"datasetid":"{datasetId}"},
        {"datasetversion":"{datasetVersion}"},
        {"locale":"{localeCode}"}
      ]
    },
  "contentType":"text/plain"
}'

Last updated: Oct 30 2025 at 05:14 UTC