NAME

sasbactrl - command line interface to SeeAlso::Source::BeaconAggregator and auxiliary classes

SYNOPSIS

sasbactrl [Options] [Action [Args ...]]

Options:

(--dbfile | --dsn )
--force
--verbose|--quiet
--itype
--dbroot     ($dbroot)
--ignore-header-errors  [for update and load]
--distinct  [for idcounts and idstat]

--cache_size  [SQLite pragma]

Actions and Arguments:

init          Set up Database for dsn (dbroot must exist)
deflate       Apply VACUUM and REINDEX on SqLite Db 

load alias [uri [file]]
update [seqno_or_alias [uri]]

status  [seqno/alias/pattern]     parts of "list" and "headers"

unload  seqno/alias/pattern
purge   seqno/alias/pattern
list    seqno/alias/pattern

headers [seqno/alias/pattern]
header  seqno/alias/pattern [field=val ...]

dumposd     show OpenSearchDescription
refreshosd  refresh (then show) OpenSearchDescription

dumpmeta [cgi_base_url ...]     show beacon header
beacon cgi_base_url [uAformatname]

loadmeta  header_template_file        load OSD and Beacon meta constants

idststat [seqno/alias/pattern]
idcounts [identifier/pattern]
idlist [identifier/pattern]

admin [field[=value]]      list/get/set admin properties:
   DATA_VERSION
   IDENTIFIER_CLASS

OPTIONS

Global options for (almost) all types of actions

--dbfile filename

Name of database file relative to dbroot

--dsn basename

Database file will be the file basename-db in folder basename, giving SQLite enough headroom for temporary files. Relative to dbroot.

--dbroot

Prefix for --dbfile or --dsn (relative paths only)

--force

Use with care.

--verbose

Sometimes shows more.

--quiet

Sometimes shows less.

--itype

Identifier type (corresponding subclass of SeeAlso::Identifier must be installed)

--ignore-header-errors

[for update and load]

--distinct

[for idcounts and idstat]

Actions

These are typically an interface to methods of SeeAlso::Source::BeaconAggregator::Maintenance or of SeeAlso::Source::BeaconAggregator::Publisher

init

Creates a database with the necessary tables

list

Interface to the listCollections method.

List all loaded beacon files with identifier counts.

The optional parameter may specify a SQL-Pattern to restrict the result.

status

Prints the complete administrative fields and beacon fields and overview of the revisit policy for the beacon source(s) given by the first argument.

The first argument may be empty or a pattern to produce the information for more than one source.

headers

Interface to the headers method.

Prints all OSD fields and then all beacon fields.

load
load I<alias>, I<uri>, I<datafile>

Interface to the loadFile or update method

Load beacon data from Uri (if uri is given) or physical file from disk (datafile must be given).

The beacon file will under the alias alias be ready for later updates.

update

Interface to the update method

(Re)load beacon files with known URIs according to the following policy: Respect the #REVISIT hint, assume a #REVISIT period of 24h for beacon files without. Wait at least 5% of the file's age (difference between last updateate attempt and modification time) before trying again. Wait at least 4h anyway. However force reload after a couple of months.

The update method itself detects illegal headers and if the beacon file was modified at all and may skip loading the file. Use the --force option to override the test on modification time or clear the _mtime field.

When called with no arguments, update all beacon files.

purge

Interface to the <purge> method.

Clears all beacon data for the seqnos or aliases given by the first argument: The beacon source with its metadata remains known to the database.

The argument may be a pattern, but the --force option is needed if actually more than one beacon file is to be purged).

OSD fields are rebuild if something was done or --force is given.

unload

Interface to the <unload> method.

Clears all beacon data and removes the listed headers for the seqnos or aliases given by the first argument: Any knowledge of the beacon source is effectively deleted from the database.

The argument may be a pattern, but the --force option is needed if actually more than one beacon file is to be unloaded.

OSD fields are rebuild if something was done or --force is given.

idstat

Interface to the idStat method.

Counts indentifiers, optionally only from those beacon files with seqno or alias restricted by the first argument.

Recognized options are distinct and verbose.

idcounts

Interface to the idCounts method.

Counts identifiers, optionally only these identifiers which match the pattern given by the first argument.

Recognized options are distinct and verbose.

idlist

Interface to the idList method.

For each identifier list a complicated list of entries found. Optionally only these identifiers which match the pattern given by the first argument are shown.

dumpmeta

Interface to the dumpmeta method.

Lists all header fields from the database.

beacon

Interface to the beacon method.

Produces a beacon file (header fields plus beacon entries) for the database.

The Base URL for the service to be denoted is mandatory as first parameter.

loadmeta

Completely exchanges the OSD and beacon meta files for the database by the contents of the file given as first argument.

dumposd

Shows Open Search Description.

refreshosd

Recalculates default Open Search Description (list constituents as description, give counts, find examples, ...)

header
deflate

Interface to the deflate method (DEFLATE+REINDEX+ANALYZE the SQLite database);

AUTHOR

Thomas Berger
CPAN ID: THB
gymel.com
THB@cpan.org

COPYRIGHT

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

SeeAlso::Source::BeaconAggregator::Maintenance SeeAlso::Source::BeaconAggregator::Publisher