iafa2spt.pl - Munge a collection of IAFA (ROADS) templates into SPT format
iafa2spt.pl <iafa.txt >spt.txt cat source/* | iafa2spt.pl >spt.txt
The iafa2spt.pl program accepts one or more IAFA templates (as used by the ROADS software), and uses them as the basis for new records created in the Scout Portal Toolkit (SPT) bulk import/export format for merging into an SPT database. This provides a potential migration path from ROADS to the SPT software, and an easy way to offer service using both packages in parallel.
Note that this program has been tested primarily with the DUBLINCORESIMPLE IAFA template type, which was created in order that the ROADS software could be used to manipulate Dublin Core metadata. Some effort has been made to make it compatible with the attributes found in other common ROADS templates, e.g. DOCUMENT and IMAGE, but it may be necessary to hand edit the program in order to achieve the best results when converting an arbitrary ROADS database.
The IAFA templates in the ROADS database need not be particularly well-formed, and it should not be necessary to insert any blank lines or other punctuation between them. Be sure to check that continuation lines have been preserved for multi-line attribute/value pairs, since some versions of the ROADS metadata editor mktemp.pl had problems writing out correctly formatted templates.
$ cat 0004
Template-Type: DOCUMENT
Handle: 0004
Category: Book
Title: The Unlimited Dream Company
Author-Name-v1: J. G. Ballard
Description: From the moment Blake crashes his stolen aircraft into
the Thames, the unlimited dream company takes over and the town
of Shepperton is transformed into an apocalyptic kingdom of desire
and stunning imagination ruled over by Blake's messianic figure.
Tropical flora and fauna appear; pan-sexual celebrations occur
regularly; and in a final climax of liberation, the townspeople
learn to fly.
Publisher-Name-v1: Triad/Panther Books
Creation-Date: 1979
URI-v1: http://www.simons-rock.edu/~craigs/ballard.html
ISBN-v1: 0-586-05205-4
Subject-Descriptor-v1: 823
Subject-Descriptor-Scheme-v1: DDC
Comments: First published in Great Britain by Jonathan Cape.
This edition published in 1991.
$ iafa2spt.pl <0004
The Unlimited Dream Company From the moment Blake
crashes his stolen aircraft into the Thames, the unlimited dream
company takes over and the town of Shepperton is transformed
into an apocalyptic kingdom of desire and stunning imagination
ruled over by Blake's messianic figure. Tropical flora and fauna
appear; pan-sexual celebrations occur regularly; and in a final
climax of liberation, the townspeople learn to fly.
1979 1979 1979 1979 0
(SPT records use the tab character as a delimiter - but the above has been word wrapped for readability)
spt2iafa.pl
Copyright (c) 2002, Martin Hamilton <imeshtk-utils@martinh.net> All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
It was developed at the Department of Computer Science at Loughborough University, as part of the joint JISC/NSF IMesh Toolkit project.
Martin Hamilton <imeshtk-utils@martinh.net>