View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Jakob Voß > Data-Beacon-0.2.7 > beacon


Annotate this POD


View/Report Bugs
Source   Latest Release: Data-Beacon-0.3.1


beacon - beacon command line client


beacon [ <options> ] {KEY=VALUE} [ <command> <name> ] [ <file> ]


  -file <name>   specify a BEACON file (use '-' for stdin)
  -name <name>   specify a name (for Beacons in a collection)
  -pre <file>    start with meta fields from a given BEACON file
  -mtime         use file's modification time if no TIMESTAMP given
  -test          enable test mode (no stored Beacon is modified)
  -quiet         suppress all error messages
  -help          brief help message
  -man           full documentation with examples
  -verbose       print additional messages
  -dbi <dbi>     database connection to a beacon collection
  -config <file> specify config file, e.g. for database connection

  about  <name>  show meta information about a file or stored beacon
  parse  <name>  parse a full BEACON file and print meta information
  dump   <name>  parse a BEACON file or dump a stored beacon
  links  <name>  only print links, without meta fields
  expand <name>  parse and expand a BEACON file or dump a stored Beacon
  query <name> <id> query a BEACON file or stored Beacon for an identifier

  list                  list names of all Beacons in a collection
  insert <name> <file>  insert a new beacon from file to a collection
  update <name> <file>  replace a beacon from file to a collection
  delete <name>         remove a beacon from a collection


This command line script manages beacon files. You can use it for parsing, validating, expanding, and storing beacon files.


The first command line argument is treated as command or as [file]name, if it does not match a known command. The following commands are recognized:


Print the meta fields. This command is the default, if no command is specified. Parsing BEACON file with this commands stops at the first non-meta line, so errors in the links will not be detected.


Print the meta fields, possibly extended by automatically generated fields, such as COUNT after parsing the full BEACON file. Use this command to validate a BEACON file.


Parse a BEACON file and print all valid links.


Parse a BEACON file and print all meta fields (possibly extended), followed by all valid links.


Print all valid links in fully expanded form, without meta fields.


Query a BEACON file ore stored BEACON for an id (without prefix).


To show the meta fields of a BEACON file (command about):

  beacon about myfile

As about is the default command, alternatively you can use one of:

  beacon myfile
  beacon -file myfile
  beacon -file myfile about

To connect to a collection of Beacons, you can use the dbi option:

  beacon -dbi SQLite:dbname=mydb.db
  beacon -dbi mysql:database=mydb;

It is recommended to put dbi, user, and password in a configuration file. You can then simply say:

  beacon -c my.conf list
  beacon -c my.conf about mybeacon
  beacon -c my.conf query mybeacon someid

To validate a BEACON file and show errors only:

  beacon parse myfile > /dev/null

Prepend meta fields from file mfields to BEACON file myfile. Use last modification time of myfile as TIMESTAMP if not included in myfile:

  beacon -pre myfields -mtime dump myfile


The command name beacon clashes with a tool of same name from the ax25-tools package ( If you need to use beacon together with hamradio, you need to rename one of the two scripts.


Jakob Voss <>


Copyright (C) 2010 by Verbundzentrale Goettingen (VZG) and Jakob Voss

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

In addition you may fork this library under the terms of the GNU Affero General Public License.

syntax highlighting: