This is QSO class library for Ruby. It can handle some of popular formats
storing QSO data of amateure radio. At this moment, following formats are
supported.

  - ADIF
  - Cabrillo (write only)
  - ZLog for DOS
  - ZLog for Windows

By using the library, you can convert QSO data from one format to another
very easily. A sample program is found in the released archive. Also it
would be useful for writing a short Ruby script to make a breakdown of your
contest log.

This library is released under Gnu GPL. You are encouraged to modify it
and play with it. However, the library is still in beta. Please, report any
bugs and suggestions to me. Of course, your contribution is welcome. In
following, some technical issues are noted for those who wish to add a new
feature to the library. Nevertheless, it should be helpful for those who
want to use the library, as well.


Quick guide
===========

You may find a simple Ruby script named `zdos2adif.rb' in the released
archive. This script converts log data of ZLog for DOS to ADIF's, like
this;

$ ./zdos2adif.rb zlog_data.txt > adif_data.adi

Note that you have to set an appropriate path in the first line of the
script before running. If you want to convert to Cabrillo format, the
answer is simple. Replace all words `Adif' in the script with `Cabrillo',
and save it with a different name, e.g. zdos2cab.rb.

$ QSO_MY_CALLSIGN=JA3YQY ./zdos2cab.rb zlog_data.txt > cab_data.cab 

The above line will get you have a Cabrillo log. At this time, you have
to tell your callsign to the script, since it is necessary to include in
the log. For the usage of the other enviromental variables, see below.


How to convert the frequency
============================

The internal expression of the QSOed frequency in QSO class is a floating
point variable. If you'd like to convert it to a band notation which might
be varying in each data format, a hash table for the translation has to be
given. For example,

 52.558 ---> 50.0 ---> "6m"
         |         |
         |         +- class Adif
         +- class Qso

abbreviation of the frequency is done by QSO class, and the subsequential
translation is done by calling the hash table, like h.index(50.0). Note
the notation `6m' is defined in Adif class. On the other hand, the
translation from a band notation to a frequency is quite straightforward.

 "6m" ---> 50.0

The value is obtained by evaluating h['6m']. The key point is the
abbreviated frequency is defined in QSO class. So you have to refer those
frequencies if you wish to add a new class.


Environmental Variable
======================

QSO_MY_CALLSIGN   Your callsign must be set.
QSO_ZLOG_YEAR     Setting 'year' for ZLog DOS, which is a contest logging
                  software used in Japan.

