The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

bin/cullsl.pl - cull entries from subject listings

SYNOPSIS

  bin/cullsl.pl [-ANacdh] [-f directory] [-l view]
    [-m filename] [-n name] [-p pattern]
    [-s directory] [-t directory] [-u name]
    [handle1 handle2 ... handleN]

DESCRIPTION

The cullsl.pl program removes one or more templates from a set of subject listing files. These changed listing files are also converted into static HTML documents which can be placed on the WWW. The program also generates HTML lists in numerical and alphabetical order based on the contents of a subject descriptor mapping file. This program shares many of its configuration files with addsl.pl.

USAGE

<em>cullsl.pl</em> which lets you remove selected templates' details from the subject listings generated by addsl.pl. This uses the same mechanism as addsl.pl, and simply takes the handles of the templates you wish to remove as its arguments when run, e.g.

  % cullsl.pl 814010256-14355

OPTIONS

A number of options are available cullsl.pl program to control which files are used for generating the subject listings and where configuration options are located:

-A

Don't generate alphabetically sorted breakdown of subject categories.

-a

Process all templates in source directory.

-c

Specify that the alphabetical listing should take acount of the case of the characters. Without this option, acorn , Apple and Zebra are sorted in that order. With this flag set, they would be sorted as Apple , Zebra and acorn.

-d

Specify that some (fairly copious) debugging information should be generated during the generation of the hypertext tree. This option is probably not of interest to anyone bar the developers.

-f directory

Specify the directory for views configuration files.

-h

Provide some online help outlining the options available and exit.

-l view

Set subject listing view name. This is the name of the file that contains the configuration information concerning the location of the listings, HTML and outline files. For more information on this see below.

-m filename

Specify the subject descriptor mapping file to use.

-n name

Specifies the name of the database to use - by default this is the name of the service as entered when the ROADS software was installed.

-p pattern

Only enter entries in the subject listings for templates that have URI fields that match the supplied pattern. The pattern can be a full Perl regular expression and allows one to, for example, restrict entries in the subject listings to only include UK academic sites. By default the pattern matches all URLs and so all templates are included in the hypertext lists.

-s directory

Set the absolute pathname of the directory containing the IAFA templates.

-t directory

Set the absolute pathname of the directory where subject listing mapping files (internal files used to maintain state between runs of the ROADS subject listing tools) should be stored.

-u name

Sets the name of the Subject-Descriptor-Scheme to search for in the templates. The default is UDC.

These options are then followed by zero or more templates handles (note - not filenames). If the -a option is given, no handles need be given on the command line; all templates in the database will be added to the subject listings.

FILES

config/class-map - default mappings from

Subject-Descriptor-Scheme attributes in templates to filenames used for generating HTML.

config/subject-listing/* - view files, each of which describing a particular way of rendering the templates into HTML.

config/multilingual/*/subject-listing-views/* - HTML rendering rules for subject listing views.

guts/subject-listing/*.lst - default location of the internal files used to maintain state between runs of subject listing tools.

htdocs/subject-listing - default location of the HTML generated by cullsl.pl

FILE FORMATS

Subject Descriptor Mapping File

The subject descriptor mapping file specifies the code for a particular subject section, the name given to that section in the HTML documents and the root of the filename used to hold that section's hypertext listing, each element being separated by a colon. An example line from a subject descriptor mapping file (for the UDC subject descriptor scheme) is:

 30.442:Development Studies:devstud

Note that the section name should not contain the colon character ":" - this would confuse addsl.pl.

CONFIGURING VIEWS

The cullsl.pl can generate a number of different subject listings. This allows, for example, a subject listing of UK based resources in addition to a subject listing of all resources. The views also allow easy selection of which subject listing a template should be added to in the mktemp.pl editor.

The view is specified by a view file. An example file is:

  HTML-Directory: /WWW/htdocs/ROADS/subject-listing/
  WWW-Directory: /ROADS/sl/
  NumList-File: /ROADS/sl/numeric.html
  AlphaList-File: /ROADS/sl/numeric.html
  Listing-Directory: /usr/local/ROADS/guts/subject-listing/
  Mapping-File: /usr/local/ROADS/config/subject-listing/class-map
  Generate-Children: yes

The various attributes currently defined in the view file are:

AlphaList-File

The name of the file into which addsl.pl will save a list of the subject categories sorted by alphabetical order.

Casefold-List

Turns on case folding when alphabetising the list - the same as the -c option on the command line.

Generate-Children

Whether or not to generate subject listings for templates that only have ChildOf relation types in them.

HTML-Directory

The path to the directory in which the subject listing HTML documents should be generated. This directory should be accessible to the HTTP daemon that serves the ROADS documents if they are to be accessible via the World Wide Web. If the path is a relative one, it is assumed to be relative to the ROADS htdocs directory, i.e. the directory under which the ROADS related HTML documents are rooted.

Listing-Directory

The path to the directory in which the subject listing files should be located. This is typically a subdirectory of the guts directory of the ROADS installation, where internal files used only by the ROADS software are kept. If this is a relative path, it is assumed to be relative to the ROADS guts directory.

Mapping-File

The path to the subject descriptor mapping file. If this is a relative path, it is assumed to be relative to the ROADS config directory.

Subject-Scheme

The name of the subject scheme that this view relates to.

WWW-Directory

The WWW path to the directory in which the HTML generated by addsl.pl will appear. This includes the AlphaList-File and NumList-File listings.

SEE ALSO

"addsl.pl" in bin, "addwn.pl" in bin, "cullwn.pl" in bin, "mkinv.pl" in bin

COPYRIGHT

Copyright (c) 1988, Martin Hamilton <martinh@gnu.org> and Jon Knight <jon@net.lut.ac.uk>. 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 by the Department of Computer Studies at Loughborough University of Technology, as part of the ROADS project. ROADS is funded under the UK Electronic Libraries Programme (eLib), the European Commission Telematics for Research Programme, and the TERENA development programme.

AUTHOR

Jon Knight <jon@net.lut.ac.uk>, Martin Hamilton <martinh@gnu.org>