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/cullwn.pl - cull stale entries from what's new listings

SYNOPSIS

  bin/cullwn.pl [-cdh] [-f directory] [-n name]
    [-w name] hhmmssDDMMYYYY

DESCRIPTION

The cullwn.pl program removes entries from a What's New listing file that were added before a certain date. The new listing file is then converted into a static HTML document which can be placed on the WWW. The What's New file is intended to show end users what resources have just been catalogued by the ROADS service and/or when some aspect of a catalogued resource's template has changed.

USAGE

It is anticipated that you will want to remove What's New listing entries which are past their use-by date, and the ROADS software provides a tool to help you do this. cullwn.pl will remove any What's New entries which are older than a given date - or the current date if no date is specified. At the moment you have to run this from the command line, but in a future version of the software we will be providing a World-Wide Web front end.

The cullwn.pl tool uses the same view configuration information as the addwn.pl tool - see the section on this for more information. It can be run either with or without a date from which to begin culling, e.g.

(start culling from now...)

  % cullwn.pl

(start culling from the 15th of January 1997...)

  % cullwn.pl 00000015011997

OPTIONS

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

-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.

-n name

Specifies the name of the database to use - defaulting to the service name which was entered when the ROADS server was created.

-w name

Sets the name of What's New view to use in configuring the cullwn.pl script.

These options are then followed by a 14 character time and date string in the following format:

  hhmmssDDMMYYYY

where (in order):

  • hh is the hours,

  • mm is the minutes,

  • ss is the seconds,

  • DD is the day of the month,

  • MM is the month (0-11),

  • YYYY is the year.

This time and date string specifies the culling time; all entries in the what's new list generated before that date are removed. Thus the string 10452312021995 tells cullwn.pl to remove any entries added the What's New list before 10:45:23am on 12th March 1995.

FILES

config/whats-new/* - "What's New" view specifications

config/multilingual/*/whats-new-views/* - rendering rules for the various "What's New" views

htdocs/whats-new.html - default location of listing.

FILE FORMAT

The cullwn.pl program 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-File:      /WWW/htdocs/ROADS/whats-new.html
  Listing-File:   /usr/local/ROADS/guts/whats-new/Default.lst

The various attributes currently defined in the view file are:

HTML-File:

The path to the file in which the subject listing HTML document should be generated. This file should be accessible to the HTTP daemon that serves the ROADS documents if the HTML document is 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 where ROADS related HTML documents are rooted.

Listing-File:

The path to the file in which the What's Newm listing file should be located. This is typically located in the guts directory of the ROADS installation, which is where the internal files needed by the ROADS software are found. If the path is a relative one, it is assumed to be relative to the ROADS guts directory.

SEE ALSO

"addsl.pl" in bin, "addwn.pl" in bin, "cullsl.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>