File: README

package info (click to toggle)
xtlf 0.0%2B1.03beta-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,140 kB
  • ctags: 233
  • sloc: perl: 6,072; sh: 160; makefile: 42
file content (158 lines) | stat: -rw-r--r-- 5,693 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
External scoring modules for tlf
================================

This archive contains various perl modules which together build a program 
which can:

* calculate the contest score from a raw tlf logfile containing only
	the mode, date, time, qso nu,ber, call and exchange.

* write a new log file in tlf (trlog) format containing mults and points so you 
	can check it.
	
* display results in real time during the contest.

* check cty.dat and sections files. (checkctydat.pl, testsections.pl)
	
Why external?
=============

I wanted to separate the scoring logic from the tlf main program. Every time
a new feature is added to tlf the change of breaking the program increases.

Moreover, some contest committees are fighting for the "most silly rules" prize,
and it is much easier to write the scoring logic and checks in Perl.
To give you an idea, I find the time difference between C and Perl to be a factor 
of 10. And the time I can put into tlf is limited...

I also want to write a perl version of tlf in the future, and these libraries 
will come in handy...

How does it work?
=================

The basic work is done in testinput.pl. It reads the tlf log file and calls
the libraries it needs to do the scoring, the log generation and the score 
display.

The basic functions are setmults, setpoints, addcalls, addcontinent, writenewlog and
printresults.

These basic functions call others, depending on the rules for the particular contest.
E.g. the cqww contest needs addcountry and addcqzone and addqso, whereas the iota 
contest needs addcwsection, addssbsection, addcwqso and addssbqso as the iota allows 
qso's to be made in cw as well as ssb...

What functions are needed is fixed in scoring.pm. We have to arrange the mults, the 
points and the output format of the results, depending on the rules.

The rules.pm file sets the main parameters. 
Copy the ~/tlf/scoring/rules/... file to ~/tlf/scoring/rules.pm and edit it. 
E.g. for the SPDX RTTY contest rules.pm must be: 

#! /usr/bin/perl -w

# Date: 08-04-06

################################################
# SPDXRTTY rules
################################################

$contestname = "Contest: SPDX RTTY test";
$mycall = "PA0R";
$logfile = "/home/rein/tlf/test/qso.log";

################################################
$method = "spdxrtty";

$mult1 = "country";
$mult2 = "section";

$mycountrypoints = 2;
$dxpoints = 10;
$mycontinentpoints = 5;

1;
############ END ###############################

To generate a raw contest log file use RULES=contest.
This will generate a log which can be parsed by the scoring module.

If you run ./testinput.pl you will get the results printed once, e.g.:

Contest: SPDX RTTY test
-----------------------------------------
Band    160    80    40    20    15    10
QSO  :    0     0     5    10     0     0
cty  :    0     0     4     7     0     0
Sect :    0     0     2     1     0     0
Continents worked: AS EU NA
-----------------------------------------
Pts:     92  Mults:   42  Score:     3864
-----------------------------------------

You can print the new log with:
'cat outlog.log':

 40CW  08-Apr-06 09:33 0001  G3DEL          599  599  023           G        5
 40CW  08-Apr-06 09:36 0002  SP3DL          599  599  P             SP  P    5
 40CW  08-Apr-06 09:38 0003  K2SLK          599  599  9             K       10
 40CW  08-Apr-06 09:38 0004  PA8J           599  599  34            PA       2
 40CW  08-Apr-06 09:53 0005  SP5DL          599  599  M                 M    5
 20CW  08-Apr-06 09:55 0006  HA6SH          599  599  45            HA       5
 20CW  08-Apr-06 09:55 0007  SP3DL          599  599  P             SP  P    5
 20CW  08-Apr-06 09:55 0008  SP3DL          599  599  P                      0
 20CW  08-Apr-06 09:58 0009  F3SDL          599  599  23            F        5
 20CW  08-Apr-06 10:25 0010  JA6HS          599  599  34            JA      10
 20CW  08-Apr-06 10:33 0011  G2SKD          599  599  56            G        5
 20CW  08-Apr-06 10:36 0012  N2SKD          599  599  62            K       10
 20CW  08-Apr-06 10:45 0013  G3SWD          599  599  65                     5
 20CW  08-Apr-06 10:58 0014  K3SI           599  599  234                   10
 20CW  08-Apr-06 10:59 0015  JT1CO          599  599  2567          JT      10

If you want a real time display of the data in an xterm window:
start an xterm in the background and start ./tlfinfo.pl
resize the window so you only see the results table
see http://tlf.wikispaces.com:/screens

If you want a realtime display of the new log in an xterm:
start an xterm in the background and start:
	tail -f --retry showlog.log
resize the window so you only see the required number of log lines.
see http://tlf.wikispaces.com:/screens

You can also have a separate display of the cluster input:
start an xterm in the background and start:
 tail -f <path>/clusterlog (in your working dir)
resize the window so you only see the required number of lines.
see http://tlf.wikispaces.com:/screens

Can I write my own rules this way?
==================================

Yes, learn Perl and look at the examples.

Which contests have already been programmed?
===========================================
SPDX RTTY
IOTA (cw/ssb/mixed)

How do I check the cty.dat and sections files?
==============================================

Start ./checkctydat.pl and enter a call. The result will be displayed

Start ./testsections and enter a section. The program will tell if the
section is in the list.

= end of readme =

<<< I hope you can use this. If not, I will use it.>>>

IF YOU CAN WRITE PERL PLEASE HELP ADDING CONTESTS!!

Rein Couperus, PA0R, 10Apr2006
tlf-devel@nongnu.org