Table of Contents

This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.

Explaining plugins

[This was written for 2.80 and earlier. Its a little bit out of date for 2.81]

An outline of program flow when using import.pl for developers writing their own plugins:

import.pl calls the methods begin, read then end.

This starts at the import directory.

RecPlug handles directories, and will look through a directory to see what files are there. These files get passed to the plugin pipeline, first using metadata_read, then read.

All plugins inherit from BasPlug.

Most plugins call the BasPLug read method, then do the format specific stuff using their own process method.

Plugins can implement either read or process (or both). (Note to self - give examples)


Types of Plugin

There are two types, metadata and document plugins.


Operational summaries of example plugins

For basic information about plugins see Plugins.

Another good section is How_do_I_get_my_XML_files_into_Greenstone

MetadataCSVPlugin

So the contents of a csv file containing 2 records would look as follows (the first line contains the fieldnames):

Filename,ex.dc.title,ex.dc.subject
file1.jpg,example title,example subject
file2.jpg,example title2,example subject2

For example:

Filename,ex.dc.Description,ex.dc.Creator,ex.dc.Subject
ieee.png,copyright policy of IEEE,Jane Smith,copyright
university-coauthorship.png, locations of international co-authors, University of Waikato, authorship

will appear in GLI's Enrich pane (with the ex.* prefix), but will be ineditable. If you wish to edit them, you need to edit them in the source CSV file itself and reimport the file.

ImagePlugin

ReferPlugin

NOTE on methods- order called

Adding metadata

- Thanks to Katherine Don for this text Which I have only edited slightly.