NAME

cs - command line callsign searching program

SYNOPSIS

Usage: cs [OPTIONS]

OPTIONS:

Database Options:
  --dbtype=STRING        DBI database initialization string (EG: SQLite:/path)
  --sets=STRING          Comma separated list of databases sets to use.  Default: US

Commands:
   -c                    Create database files
   -i STRING             Import database files
   -s STRING             Search for details on a callsign
   -F STRING             Format type (format or dump)
   -f STRING             Format string (for type = 'format' only)

EXAMPLE

# create (or recreate) the storage database (defaults to ~/.callsigns.sqlite)
% cs -c

# get a copy of the fcc zip file and unzip it...
# then run (this will take a while and the resulting file will be >600Mb!):
# Get the zip file from http://wireless.fcc.gov/uls/data/complete/a_amat.zip
% cs -i /path/to/dir/containing/dotdat/files

# search for the WS6Z details:
% cs -s WS6Z
US: E WS6Z      Wesley Hardaker => Davis, CA
DX:   WS6Z        W = United States

# if all you're doing is searching, you can drop the -s flag too:
% cs WS6Z
US: E WS6Z      Wesley Hardaker => Davis, CA
DX:   WS6Z        W = United States

Command Line Options

--sets SETNAMES

There are actually multiple databases that can be searched. By default, the US and DX sets are searched. Here are current possibilities:

US

Searches a loaded U.S. FCC callsign database (must be loaded using the -c and -i switches first).

DX

An internal database consisting country callsign prefix listings.

QRZ

Does an online lookup using the Ham::Scraper class (which must be loaded first). The current Ham::Scraper class in CPAN is broken, so this isn't on by default. WS6Z has a patched copy that he's trying to feed back to the author.

YFK

If you're using the yfk program from the yfklog package for doing QSO logging, this module will look up previous contact information with that person. You need to specify your callsign in the ~/.callsignrc file with a line like "callsign WS6Z" for example so it finds the right database lookup table to use.

-f FORMATTING STRING

Is a printf-like string containing %{NUMBERS:VARIABLE} which will control the output. EGs:

# normal output
% cs WS6Z
US: E WS6Z      Wesley Hardaker => Davis, CA
DX:   WS6Z         W = United States

# just a listing of the state
% cs -f '%{-8.8:thecallsign} %{state}' WS6Z
WS6Z     CA
WS6Z

See the -F flag below for dumping all available data to see what can be used.

-F FORMAT TYPE

The -F flag will try to load a generic Ham::Callsign::Display::FORMAT module to display the results, where FORMAT is the option to the -F flag. By default this is the "Format" module (which gets translated to Ham::Callsign::Display::Format). You can also write your own module or use the other "Dump" module:

# dump all the possible data from a callsign resource
cs -F  WS6Z
Data for WS6Z in US:
  certifier_last_name:           Hardaker
  region_code:                   6
  group_code:                    A
  request_sequence:              1
...

Configuration

By default the $HOME/.callsignrc file will be read which can contain various types of configuration settings:

format: FORMAT

Formatting string similar to -f

DBformat: FORMAT

Formatting for a particular DB type. EG, the following will be the formatting used for the US database but all others (eg, QRZ and DX) will continue to use the default formatting:

USformat: %{3.3:FromDB}:   %{-8.8:thecallsign} %{first_name} %{last_name} %{street_address} %{qth}
sets: SETS

Sets setting, similar to --sets

LICENSE

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

SEE ALSO

Ham::Callsign::DB(3)