X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=html%2Fadminmanual-5.html;h=3facea5642285cc1710db931b02b762a22450218;hb=04f192bf9da26bd6fbed506a2cbb2a10dda25d35;hp=53b4e66bca8e2af88bff2389b62dbbba3c0621f1;hpb=4fa8a0251b64361c908d056393b46abece6d38be;p=spider.git diff --git a/html/adminmanual-5.html b/html/adminmanual-5.html index 53b4e66b..3facea56 100644 --- a/html/adminmanual-5.html +++ b/html/adminmanual-5.html @@ -14,13 +14,50 @@

5. Filtering

-

Filters can be set for spots, announcements and WWV. You will find the directories for these under /spider/filter. You will find some example in the directories with the suffix .issue. There are two types of filter, one for incoming information and one for outgoing information. Outgoing filters are in the form CALLSIGN.pl and incoming filters are in the form in_CALLSIGN.pl. Filters can be set for both nodes and users. +

Filters can be set for spots, announcements and WWV. You will find the directories for these under /spider/filter. You will find some examples in the directories with the suffix .issue. There are two types of filter, one for incoming information and one for outgoing information. Outgoing filters are in the form CALLSIGN.pl and incoming filters are in the form in_CALLSIGN.pl. Filters can be set for both nodes and users. +

+

All filters work in basically the same way. There are several elements delimited by commas. +There can be many lines in the filter and they are read from the top by the program. +When writing a filter you need to think carefully about just what you want to achieve. You +are either going to write a filter to accept or to reject. +Think of a filter as having 2 main elements. For a reject filter, you would have a line +or multiple lines rejecting the things you do not wish to receive and then a default +line accepting everything else that is not included in the filter. Likewise, for an +accept filter, you would have a line or multiple lines accepting the things you wish +to receive and a default line rejecting everthing else. +

+

In the example below, a user requires a filter that would only return SSB spots +posted in Europe on the HF bands. This is achieved by first rejecting the CW section +of each HF band and rejecting all of VHF, UHF etc based on frequency. +Secondly, a filter rule is set based on CQ zones to only accept spots posted in +Europe. Lastly, a default filter rule is set to reject anything outside the filter. +

+

+
+$in = [
+        [ 0, 0, 'r', # reject all CW spots
+                [
+                1800.0, 1850.0,
+                3500.0, 3600.0,
+                7000.0, 7040.0,
+                14000.0, 14100.0,
+                18068.0, 18110.0,
+                21000.0, 21150.0,
+                24890.0, 24930.0,
+                28000.0, 28180.0,
+                30000.0, 49000000000.0,
+                ] ,1 ],
+        [ 1, 11, 'n', [ 14, 15, 16, 20, 33, ], 15 ], #accept EU
+        [ 0, 0, 'd', 0, 1 ], # 1 = want, 'd' = everything else
+];
+
+
+

+

The actual elements of each filter are described more fully in the following sections.

5.1 Spots

-

All filters work in basically the same way. There are several elements delimited by commas. I will use the spot filter as an example .... -

The elements of the Spot filter are ....

@@ -98,6 +135,7 @@ Lets look carefully at the first line. The first element is 0 (drop). Therefor

+  [ 0, 0, 'r',
     [  
       1800.0, 2000.0,         # top band 
       10100.0, 10150.0,       # WARC  
@@ -247,6 +285,27 @@ package DXProt;
 

Again, this is simply a list of names we do not want to see in the spotted field of a DX callout.

+

5.6 Filtering words from text fields in Announce, Talk and DX spots +

+ +

Create a file in /spider/data called badwords. The format is quite +simple. Lines beginning with # are ignored so comments can be added. An +example file is below ... +

+

+
+# Below is a list of words we do not wish to see on the cluster
+grunge grunged grunging
+splodge splodger splodging
+grince
+fluffle
+
+
+

Multiple words can be used on the same line as shown. Obviously these +are just examples :-) +

+

You can reload the file from the cluster prompt as sysop with load/badwords. +


Next Previous