GlobalDataverseCommunityConsortium / dataverse-previewers

A collection of Datafile Previewers that can be configured to work with Dataverse
MIT License
13 stars 38 forks source link

Make Dataverse Previewers support more media types #64

Open philippconzett opened 2 years ago

philippconzett commented 2 years ago

As a potential dataset downloader, I'd like to be able to preview more media types, in particular the following ones:

image/tiff audio/flac text/markdown text/semicolon-separated-values

Note on text/semicolon-separated-values: When testing in the Harvard Demo Dataverse, semicolon-separated .csv files are not ingested and previewed. Semicolon-separated .txt files are not ingested, but previewed as plain text files. See this test dataset: https://demo.dataverse.org/dataset.xhtml?persistentId=doi:10.70122/FK2/H0U0FQ

adam3smith commented 2 years ago

Do you want the markdown rendered or just displayed as text? The latter should be trivial

Sent from my phone

On Thu, Nov 4, 2021, 04:09 Philipp Conzett @.***> wrote:

As a potential dataset downloader, I'd like to be able to preview more media types, in particular the following ones:

image/tiff audio/flac text/markdown text/semicolon-separated-values

Note on text/semicolon-separated-values: When testing in the Harvard Demo Dataverse, semicolon-separated .csv files are not ingested and previewed. Semicolon-separated .txt files are not ingested, but previewed as plain text files. See this test dataset:

https://demo.dataverse.org/dataset.xhtml?persistentId=doi:10.70122/FK2/H0U0FQ

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GlobalDataverseCommunityConsortium/dataverse-previewers/issues/64, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA7PWX7FQUCB7K4XCMUGNTUKI5UJANCNFSM5HK2KAOA .

philippconzett commented 2 years ago

Yes, that would be good. If it at a later stage will be possible to be displayed as Markdown, that would be even better :)

kaitlinnewson commented 2 years ago

For Markdown, perhaps something like marked could be used for rendering?

kaitlinnewson commented 2 years ago

I did a quick test, and Markdown files should work as-is in the text previewer (but are not rendered), e.g.:

https://dataverse.scholarsportal.info/preview/previewers/TextPreview.html?fileid=110999&siteUrl=https://dataverse.scholarsportal.info&datasetid=110661&datasetversion=3.0&locale=en

pdurbin commented 2 years ago

It would be cool so have some sort of toggle to switch between raw text and rendered HTML but this is a great start!