Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.27 KB

README.md

File metadata and controls

44 lines (29 loc) · 1.27 KB

PDF Preview Image MyTardis Filter

Filter for generating image thumbnails for MyTardis using ImageMagick's convert tool.

Screenshot

Requirements

Installation

  • Install ImageMagick, using sudo apt-get install imagemagick

Git clone this repository into /path/to/mytardis/tardis/tardis_portal/filters:

git clone [email protected]:wettenhj/pdf-mytardis-filter.git pdf

Add the following to your MyTardis settings file eg. /path/to/mytardis/tardis/settings.py

MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ('tardis.tardis_portal.filters.FilterInitMiddleware',)

FILTER_MIDDLEWARE = (("tardis.tardis_portal.filters", "FilterInitMiddleware"),)

The above enables the filter middleware for all actions.

Then add the definition for this filter.

POST_SAVE_FILTERS = [
   ("tardis.tardis_portal.filters.pdf.pdf.make_filter",
    ["PDF", "http://tardis.edu.au/schemas/pdf/1"])
   ]

cd /path/to/mytardis and load the parameter schema into the MyTardis database:

python mytardis.py loaddata tardis/tardis_portal/filters/pdf/pdf.json

Restart MyTardis.