Skip to content

Commit

Permalink
Switch README from RST to Markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
spilth committed Oct 31, 2024
1 parent fdb933d commit b782814
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 112 deletions.
90 changes: 90 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Invenio-Previewer-Geospatial

[![image](https://github.com/nyudlts/invenio-previewer-geospatial/workflows/CI/badge.svg)](https://github.com/nyudlts/invenio-previewer-geospatial/actions?query=workflow%3ACI) [![image](https://img.shields.io/github/license/nyudlts/invenio-previewer-geospatial.svg)](https://github.com/nyudlts/invenio-previewer-geospatial/blob/master/LICENSE)

Provides previewers for geospatial file formats

## Installation

To add this package to your Invenio RDM instance:

### Add Package

``` bash
$ cd your-invenio-rdm
$ pipenv install git+https://github.com/nyudlts/invenio-previewer-geospatial.git
```

### Add Previews to Invenio Configuration

In `invenio.cfg` edit (or add) `PREVIEWER_PREVIEWERS_ORDER` and
`PREVIEWER_PREFERENCE` to include the previewers provided by this
package:

PREVIEWER_PREVIEWERS_ORDER = [
"invenio_previewer.extensions.gpx",
"invenio_previewer.extensions.csv_papaparsejs",
"invenio_previewer.extensions.json_prismjs",
"invenio_previewer.extensions.simple_image",
"invenio_previewer.extensions.xml_prismjs",
"invenio_previewer.extensions.mistune",
"invenio_previewer.extensions.pdfjs",
"invenio_previewer.extensions.zip",
"invenio_previewer.extensions.ipynb",
"invenio_previewer.extensions.audio_videojs",
"invenio_previewer.extensions.video_videojs",
"invenio_previewer.extensions.txt_previewer",
"invenio_previewer.extensions.default",
]

PREVIEWER_PREFERENCE = [
"gpx",
"csv_papaparsejs",
"json_prismjs",
"simple_image",
"xml_prismjs",
"mistune",
"pdfjs",
"zip",
"ipynb",
"audio_videojs",
"video_videojs",
"txt",
]

### Allow Images from Open Street Map

In `invenio.cfg` edit `APP_DEFAULT_SECURE_HEADERS` to allow images from
OpenStreetMap:

APP_DEFAULT_SECURE_HEADERS = {
'content_security_policy': {
'default-src': [
"'self'",
'data:',
"'unsafe-inline'",
"blob:",
],
'img-src': [
"'self'",
"https://*.openstreetmap.org",
'data:',
]
},
...
}

## Development

To check out the project, install dependencies and run the test suite,
do the following:

``` bash
$ git clone [email protected]:nyudlts/invenio-previewer-geospatial.git
$ cd invenio-previewer-geospatial
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install --upgrade pip
$ pip install ".[all,tests]"
$ ./run-tests.sh
```
112 changes: 0 additions & 112 deletions README.rst

This file was deleted.

0 comments on commit b782814

Please sign in to comment.