en:developer:plugins
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | en:developer:plugins [2023/03/13 01:46] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | ===== Explaining plugins ===== | ||
+ | |||
+ | Plugins are written in the Perl language. | ||
+ | They all derive from a basic plugin called // | ||
+ | which performs universally-required operations like creating | ||
+ | a new Greenstone archive document to work with, | ||
+ | assigning an object identifier (OID), and handling the sections in a document. | ||
+ | Plugins are kept in the // | ||
+ | |||
+ | An outline of program flow when using '' | ||
+ | |||
+ | * '' | ||
+ | * This starts at the import directory. | ||
+ | * RecPlugin handles directories, | ||
+ | * The '' | ||
+ | |||
+ | All plugins inherit from BasPlugin. | ||
+ | * BasPlugin inplements the metadata_read and read methods. | ||
+ | * BasPlugin read calls the process method. | ||
+ | |||
+ | Most plugins call the BasePlugin read method, then do the format specific stuff using their own process method. | ||
+ | * Some plugins override read. | ||
+ | |||
+ | Plugins can implement either read or process (or both). | ||
+ | |||
+ | ===== NOTE on methods- order called ===== | ||
+ | |||
+ | * **metadata_read**: | ||
+ | * in RecPlugin Greenstone '' | ||
+ | * in MetadataCSVPlugin a '' | ||
+ | * **read**: called after metadata read | ||
+ | * **process**: | ||
+ | |||
+ | Adding metadata | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | |||
+ | |||
+ | ===== Collections-Specific Plugins ===== | ||
+ | |||
+ | * It's best to put modified plugins into **''< | ||
+ | * A collection specific plugin has to have the same name as an existing plugin if you are over-riding the system-wide version of the plugin. | ||
+ | * The collection-specific one is used instead the system-wide one. | ||
+ | * The collection-specific plugin appears in the GLI when you have that collection loaded. | ||
+ | |||
+ | //Thanks to Wendy Osborn for most of this text.// | ||
+ | |||
+ | |||
+ | ===== Inheritance ===== | ||
+ | If you select a plugin and press **Configure Plugin...**, | ||
+ | for the plugin. You might notice that the options are split into sections. The options | ||
+ | at the very top are specific to the plugin; the remaining options are // | ||
+ | other plugins. | ||
+ | |||
+ | If you are creating your own plugin, you can choose to have it inherit from other, similar plugins | ||
+ | (which, in turn, likely inherit from additional plugins). Top-level plugins (including those that you select [[#Document processing plugins|to process documents]]) all inherit from other plugins. | ||
+ | |||
+ | |||
+ | ==== Document processing plugins ==== | ||
+ | |||
+ | Document processing plugins are used by the collection-building software to parse each source document in a way that depends on its format. A collection' | ||
+ | |||
+ | The standard Greenstone plugins are [[en: | ||
+ | |||
+ | Some plugins are written for specific collections that have a document format not found elsewhere. These collection-specific plugins are found in the collection' | ||
+ | |||
+ | Some document-processing plugins use external programs that parse specific proprietary formats—for example, Microsoft Word—into either plain text, images, or HTML. A general plugin called // | ||
+ | |||
+ | Some plugins have individual options, which control what they do in finer detail than the general options allow. Select a plugin from the [[en: | ||
+ | |||
+ | ==== Plugins to import proprietary formats ==== | ||
+ | |||
+ | Proprietary formats pose difficult problems for any digital library system. Although documentation may be available about how they work, they are subject to change without notice, and it is difficult to keep up with changes. Greenstone has adopted the policy of using GPL (Gnu Public License) conversion utilities written by people dedicated to the task. Utilities to convert Word and PDF formats are included in the // | ||
+ | |||
+ | <tabbox Greenstone3> | ||
+ | When // | ||
+ | <tabbox Greenstone2> | ||
+ | When // | ||
+ | </ | ||
+ | |||
+ | |||
+ | Sometimes there are several conversion utilities for a particular format, and // | ||
+ | |||
+ | The steps involved in adding a new external document conversion utility are: | ||
+ | |||
+ | * Install the new conversion utility so that it is accessible by Greenstone (put it in the // | ||
+ | * Alter // | ||
+ | * Write a top-level plugin that inherits from // | ||
+ | |||
+ | |||
+ | ===== Potential Plugins ===== | ||
+ | |||
+ | Greenstone incorporates plugins for many different file formats, listed on the [[en: | ||
+ | |||
+ | **Documents/ | ||
+ | * AbiWord | ||
+ | * Gnumeric Spreadsheet | ||
+ | * Kword (all Koffice formats) | ||
+ | * OpenOffice file formats: | ||
+ | * Writer (.sxw) | ||
+ | * Calc (.sxd) | ||
+ | * Impress (.sxi) | ||
+ | * Draw (.sxd) | ||
+ | * StarOffice formats (.sdc, .sdw etc) | ||
+ | * Wordperfect | ||
+ | |||
+ | **Video:** | ||
+ | * MPEG | ||
+ | * Quicktime (.mov) | ||
+ | * AVI (Audio Video Interleave), | ||
+ | |||
+ | **Audio:** | ||
+ | |||
+ | * Windows Media Audio (.wma) | ||
+ | * Windows audio (.wav) | ||
+ | * Sun Audio (.au) | ||
+ | * Audio Interchange File Format (.aiff) | ||
+ | * MIDI (.mid) | ||
+ | * MIDI karoke (.kar) | ||
+ | * CD Audio (.cda) | ||
+ | * Shorten (.shn) | ||
+ | |||
+ | **Bibliographic: | ||
+ | |||
+ | * Endnote | ||
+ | |||
+ | **Images:** | ||
+ | |||
+ | * DjVu (.djvu) | ||
+ | * Photoshop (.psd) | ||
+ | * PaintShopPro (.psp) | ||
+ | |||
+ | **Macintosh archives:** | ||
+ | |||
+ | * .hqx Mac archive | ||
+ | * .sit | ||
+ | * Self extracting Archive (.sea) | ||
+ | |||
+ | **Others:** | ||
+ | |||
+ | * Scalable Graphics Format (.svg) | ||
+ | * Synchronized Multimedia Integration Language SMIL (.smil) | ||
+ | * Macromedia Flash (.fla) | ||
+ | * Macromedia shockwave (.swf) | ||
+ | * OpenGL | ||
+ | * VRML/X3D | ||
+ | * TrueType fonts (TTF) |
en/developer/plugins.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1