X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=html%2Fadminmanual-4.html;h=9faec43772389c921bd621159da7e775fe48fa0e;hb=70ffd373d199a2a83072da4e2b75572a2270383f;hp=48e5702a0d5f5567ffe489adbbb9908391a59be7;hpb=b8ff94755eecda16276c449274c6a76c4f14a8d1;p=spider.git diff --git a/html/adminmanual-4.html b/html/adminmanual-4.html index 48e5702a..9faec437 100644 --- a/html/adminmanual-4.html +++ b/html/adminmanual-4.html @@ -2,7 +2,7 @@ - The DXSpider Administration Manual v1.47: Other filters + The DXSpider Administration Manual v1.48: Databases @@ -13,118 +13,129 @@ Previous Contents
-

4. Other filters

+

4. Databases

-

4.1 Filtering Mail +

Spider allows the creation of local or remote databases. It supports +chained databases, allowing several different databases to be scanned +with one simple command. Importing of databases is limited at present +to the standard AK1A databases such as OBLAST and the DB0SDX QSL +database but will expand with time. +

+

4.1 Creating databases

-

In the /spider/msg directory you will find a file called badmsg.pl.issue. Rename -this to badmsg.pl and edit the file. The original looks something like this .... +

Creating a database could not be more simple. All the commands are +sent from the cluster prompt as the sysop user. +

To create a database you use the command dbcreate. It can +be used in 3 different ways like so ..

-
-# the list of regexes for messages that we won't store having
-# received them (bear in mind that we must receive them fully before
-# we can bin them)
-
-
-# The format of each line is as follows
-
-#     type      source             pattern 
-#     P/B/F     T/F/O/S            regex  
-
-# type: P - private, B - bulletin (msg), F - file (ak1a bull)
-# source: T - to field, F - from field,  O - origin, S - subject 
-# pattern: a perl regex on the field requested
-
-# Currently only type B and P msgs are affected by this code.
-# 
-# The list is read from the top down, the first pattern that matches
-# causes the action to be taken.
-
-# The pattern can be undef or 0 in which case it will always be selected
-# for the action specified
-
-
-
-package DXMsg;
-
-@badmsg = (
-'B',    'T',    'SALE', 
-'B',    'T',    'WANTED',
-'B',    'S',    'WANTED',
-'B',    'S',    'SALE', 
-'B',    'S',    'WTB',
-'B',    'S',    'WTS',
-'B',    'T',    'FS',
-);
+dbcreate <name>
 
+

To simply create a database locally, you just tell the command the +name of the database. This does not create the actual database, it +simply defines it to say that it exists.

-

I think this is fairly self explanatory. It is simply a list of subject -headers that we do not want to pass on to either the users of the cluster or -the other cluster nodes that we are linked to. This is usually because of -rules and regulations pertaining to items for sale etc in a particular country. +

+
+dbcreate <name> chain <name> [<name>...]
+
+
+

This creates a chained database entry. The first database will be +scanned, then the second, the third etc... +

+

+
+dbcreate <name> remote <name>
+
+
+

This creates a remote entry. the first name field is the database +name at the remote node, then the remote switch, then the actual +node_call of the remote node, for example... +

+

+
+dbcreate buckmaster remote gb7dxc
+
+
+

Remote databases cannot be chained, however, the last database in a +chain can be a remote database.

-

4.2 Filtering DX callouts (Depricated) +

4.2 Importing databases

-

From version 1.47, this method is replaced by the command set/baddx -

-

In the same way as mail, there are some types of spot we do not wish to pass on -to users or linked cluster nodes. In the /spider/data directory you will find -a file called baddx.pl.issue. Rename this to baddx.pl and edit the file. The -original looks like this .... +

The only databases that Spider can currently import are the standard +AK1A databases such as OBLAST or the DB0SDX qsl and address database. +This will be added to with time. +

To import such a database, first put the file somewhere useful like /tmp +and then issue the following command ...

-
-# the list of dx spot addresses that we don't store and don't pass on
-
-
-package DXProt;
-
-@baddx = qw 
-
- FROG 
- SALE
- FORSALE
- WANTED
- P1RATE
- PIRATE
- TEST
- DXTEST
- NIL
- NOCALL 
-);
+dbimport oblast /tmp/OBLAST.FUL
 
+

This will update the existing local oblast database or create it if +it does not exist.

-

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

4.3 Checking available databases +

+ +

Once a database is created, you will want to check that it has been +added. To do this use the dbavail command. This will +output the available databases. For example ...

+

+
+dbavail
+DB Name          Location   Chain
+qsl              Local
+buck             GB7ADX
+hftest           GB7DXM
+G0VGS de GB7MBC  3-Feb-2001 1925Z >
+
+

-

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

4.4 Looking up databases

-

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 ... +

To look for information in a defined database, simply use the dbshow +command, for example ...

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

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

will show the information for the callsign G0YLM from the buckmaster +database if it exists. To make things more standard for the users +you can add an entry in the Aliases file so that it looks like a standard +show command like this ...

-

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

+
+'^sh\w*/buc', 'dbshow buckmaster', 'dbshow',
+
+
+

Now you can simply use show/buckmaster or an abreviation. +

+

4.5 Removing databases +

+ +

To delete an existing database you use the dbremove command. +For example ... +

+

+
+dbremove oblast
+
+
+

would remove the oblast database and its associated datafile from the +system. There are no warnings or recovery possible from this command. +If you remove a database it ceases to exist and would have to be created +from scratch if you still required it.


Next