add more documentation
This commit is contained in:
parent
0ebec3bb20
commit
0cefb3ca19
74
README.md
74
README.md
|
@ -1,13 +1,69 @@
|
||||||
# adif-pota2sig
|
# adif-pota2sig
|
||||||
|
|
||||||
Convert POTA fields in adif files to SIG and SIG_INFO fields
|
Process adif file for POTA uploads
|
||||||
|
|
||||||
Parse adif file, if a record has one or more POTA_REF entries (delimited by a
|
## SYNOPSIS
|
||||||
comma), add SIG POTA and SIG_INFO with reference. Multiply record such, that
|
|
||||||
every POTA_REF entry is a separate record with own SIG_INFO.
|
|
||||||
Extended adif file will be printed to stdout.
|
|
||||||
|
|
||||||
## Usage:
|
adif-pota2sig.pl -i `in.adi` -o `out.adi`
|
||||||
```sh
|
|
||||||
adif-pota2sig.pl logfile.adi > extended-logfile.adi
|
adif-pota2sig.pl < `in.adi` > `out.adi`
|
||||||
```
|
|
||||||
|
adif-pota2sig.pl -r K-TEST -t `out_REF.adi` -i `in.adi`
|
||||||
|
|
||||||
|
adif-pota2sig.pl -r K-TEST -t `out_REF.adi` < `in.adi`
|
||||||
|
|
||||||
|
adif-pota2sig.pl -h
|
||||||
|
|
||||||
|
## DESCRIPTION
|
||||||
|
|
||||||
|
**adif-pota2sig** will read an adif file, if a contact has one or more POTA\_REF
|
||||||
|
entries (delimited by a comma), add SIG POTA and SIG\_INFO with reference.
|
||||||
|
Multiply contact such, that every POTA\_REF entry is a separate contact with own
|
||||||
|
SIG\_INFO. Extendet adif file will be printed to stdout or a file.
|
||||||
|
|
||||||
|
If used with **-r** and **-t** options a number of files with contents described
|
||||||
|
above will be created. One file for each POTA reference. For output filenames
|
||||||
|
see **-t**.
|
||||||
|
|
||||||
|
With **-r** you can also include the location in the format REFERENCE@LOCATION,
|
||||||
|
which is handy for trails. E. g. -r DE-0622@DE-HH
|
||||||
|
|
||||||
|
## OPTIONS
|
||||||
|
|
||||||
|
- **-h|--help**
|
||||||
|
|
||||||
|
Print a brief help message and exits.
|
||||||
|
|
||||||
|
- **-i `in.adi`|--input=`in.adi`**
|
||||||
|
|
||||||
|
Use `in.adi` as input (default: - for stdin).
|
||||||
|
|
||||||
|
- **-o `out.adi`|--output=`out.adi`**
|
||||||
|
|
||||||
|
Use `out.adi` as output (default: - for stdout).
|
||||||
|
|
||||||
|
- **-r MY\_POTA\_REF|--reference=MY\_POTA\_REF**
|
||||||
|
|
||||||
|
Use MY\_POTA\_REF as own POTA reference. If there are more than one (for a
|
||||||
|
n-fer) create a list with commas, e. g. **-r** K-TEST1,K-TEST2,K-TEST3.
|
||||||
|
|
||||||
|
Also set the entries MY\_SIG and MY\_SIG\_INFO matching the reference in the
|
||||||
|
output files. By default already existing entries with MY\_SIG and MY\_SIG\_INFO
|
||||||
|
won't be overwritten and the program will stop. Using **-f** will overwrite the
|
||||||
|
entries.
|
||||||
|
|
||||||
|
**-t** is mandatory for this option.
|
||||||
|
|
||||||
|
- **-t `out_REF.adi`|--template=`out_REF.adi`**
|
||||||
|
|
||||||
|
Use `out_REF.adi` as output filename template for multiple references. REF
|
||||||
|
will be replaced by a POTA reference. Multiple filenames will be created.
|
||||||
|
|
||||||
|
**-o** is not allowed for this option.
|
||||||
|
|
||||||
|
**-r** is mandatory for this option.
|
||||||
|
|
||||||
|
- **-f|--force**
|
||||||
|
|
||||||
|
By default filenames selected with **-o** and **-t** won't be overwritten and the
|
||||||
|
program will stop. Using **-f** will overwrite output files.
|
||||||
|
|
|
@ -19,13 +19,13 @@ adif-pota2sig - Process adif file for POTA uploads
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
adif-pota2sig.pl -i in.adi -o out.adi
|
adif-pota2sig.pl -i F<in.adi> -o F<out.adi>
|
||||||
|
|
||||||
adif-pota2sig.pl < in.adi > out.adi
|
adif-pota2sig.pl < F<in.adi> > F<out.adi>
|
||||||
|
|
||||||
adif-pota2sig.pl -r K-TEST -t out_REF.adi -i in.adi
|
adif-pota2sig.pl -r K-TEST -t F<out_REF.adi> -i F<in.adi>
|
||||||
|
|
||||||
adif-pota2sig.pl -r K-TEST -t out_REF.adi < in.adi
|
adif-pota2sig.pl -r K-TEST -t F<out_REF.adi> < F<in.adi>
|
||||||
|
|
||||||
adif-pota2sig.pl -h
|
adif-pota2sig.pl -h
|
||||||
|
|
||||||
|
@ -54,6 +54,20 @@ GetOptions (
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
|
||||||
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
|
B<adif-pota2sig> will read an adif file, if a contact has one or more POTA_REF
|
||||||
|
entries (delimited by a comma), add SIG POTA and SIG_INFO with reference.
|
||||||
|
Multiply contact such, that every POTA_REF entry is a separate contact with own
|
||||||
|
SIG_INFO. Extendet adif file will be printed to stdout or a file.
|
||||||
|
|
||||||
|
If used with B<-r> and B<-t> options a number of files with contents described
|
||||||
|
above will be created. One file for each POTA reference. For output filenames
|
||||||
|
see B<-t>.
|
||||||
|
|
||||||
|
With B<-r> you can also include the location in the format REFERENCE@LOCATION,
|
||||||
|
which is handy for trails. E. g. -r DE-0622@DE-HH
|
||||||
|
|
||||||
=head1 OPTIONS
|
=head1 OPTIONS
|
||||||
|
|
||||||
=over
|
=over
|
||||||
|
@ -73,14 +87,19 @@ Use F<out.adi> as output (default: - for stdout).
|
||||||
=item B<-r MY_POTA_REF|--reference=MY_POTA_REF>
|
=item B<-r MY_POTA_REF|--reference=MY_POTA_REF>
|
||||||
|
|
||||||
Use MY_POTA_REF as own POTA reference. If there are more than one (for a
|
Use MY_POTA_REF as own POTA reference. If there are more than one (for a
|
||||||
n-fer) create a list with commas, e. g. S<B<-r> K-TEST1,K-TEST2,K-TEST3>
|
n-fer) create a list with commas, e. g. S<B<-r> K-TEST1,K-TEST2,K-TEST3>.
|
||||||
|
|
||||||
|
Also set the entries MY_SIG and MY_SIG_INFO matching the reference in the
|
||||||
|
output files. By default already existing entries with MY_SIG and MY_SIG_INFO
|
||||||
|
won't be overwritten and the program will stop. Using B<-f> will overwrite the
|
||||||
|
entries.
|
||||||
|
|
||||||
B<-t> is mandatory for this option.
|
B<-t> is mandatory for this option.
|
||||||
|
|
||||||
=item B<-t F<out_REF.adi>|--template=F<out_REF.adi>>
|
=item B<-t F<out_REF.adi>|--template=F<out_REF.adi>>
|
||||||
|
|
||||||
Use out_REF.adi as output filename template for multiple references. REF will
|
Use F<out_REF.adi> as output filename template for multiple references. REF
|
||||||
be replaced by a POTA reference. Multiple filenames will be created.
|
will be replaced by a POTA reference. Multiple filenames will be created.
|
||||||
|
|
||||||
B<-o> is not allowed for this option.
|
B<-o> is not allowed for this option.
|
||||||
|
|
||||||
|
@ -209,18 +228,3 @@ foreach my $output_filename (keys %filenames_ref) {
|
||||||
close($FH_OUT);
|
close($FH_OUT);
|
||||||
}
|
}
|
||||||
close($FH_IN);
|
close($FH_IN);
|
||||||
|
|
||||||
__END__
|
|
||||||
|
|
||||||
=head1 DESCRIPTION
|
|
||||||
|
|
||||||
B<adif-pota2sig> will read an adif file, if a contact has one or more POTA_REF
|
|
||||||
entries (delimited by a comma), add SIG POTA and SIG_INFO with reference.
|
|
||||||
Multiply contact such, that every POTA_REF entry is a separate contact with own
|
|
||||||
SIG_INFO. Extendet adif file will be printed to stdout or a file.
|
|
||||||
|
|
||||||
If used with B<-r> and B<-t> options a number of files with contents described
|
|
||||||
above will be created. On file for each POTA reference. For output filenames
|
|
||||||
see B<-t>.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
|
Loading…
Reference in a new issue