NAME
ftndb-nodelist - Fidonet/FTN Nodelist related processing using an SQL Database.
VERSION
Version 0.37
DESCRIPTION
This script both provides an example of using the FTN::Database and FTNDB::Nodelist modules as well as providing some basic functionality related to using an SQL Database for Fidonet/FTN related processing. The SQL Database engine is one for which a DBD module exists, defaulting to SQLite.
SYNOPSIS
ftndb-nodelist [-c config_file] [-t tablename] [-f nodelist_file] [-d domain] [-n net] [-z zone] [-e] [-v] [-x] load
ftndb-nodelist [-c config_file] [-t tablename] [-n net] [-z zone] [-o outfile] [-v] [-x] list
ftndb-nodelist [-h | --help]
ftndb-nodelist --version
OPTIONS
- -c
-
This is the filename and path of a configuration file, with the default being ftndb.cfg in the current directory.
- -v
-
Verbose option.
- -x
-
Debug option.
- -f
-
The nodelist file. If the -e option is also set, then this is an exact file name. If -e is not set, then this is the basename of the nodelist files. If -f is not set, then when needed it defaults to "nodelist".
- -e
-
If set, then the -f option must be exact file name. If not set, then the -f option is the basename of a nodelist file.
- -t
-
The nodelist table name to be used. Note that if there is a period in the name, that period will be changed to an underscore.
- -n
-
If set, it is the FTN Net number being operated on.
- -z
-
If defined; is the only zone being operated on.
- -d
-
If defined, this is the domain of the nodelist being loaded. Defaults to fidonet.
- -o
-
Output file. This needs to be at least the filename and can also include a path.
COMMANDS
- load
-
This will load an FTN Nodelist database table in an SQL database server being used for Fidonet/FTN processing. Note that it does not currently check if a nodelist for the same domain, year, and year day is already in the database.
- list
-
This will list information from an FTN Nodelist database table in an SQL database server being used for Fidonet/FTN processing, by a specified zone and/or net number.
CONFIGURATION
Configuration information not provided by the command line options are obtained from a configuration file. That can be defined by setting the "-c" option, which is the path and file name of the configuration file to be used. If that is not defined, it looks for a file named ftndb.cfg in the current directory. The file contains configuration items listed outside of a named section as well as those listed within a named section, and blank lines and lines starting with a "#" are ignored.
The first items in the file are those outside of a named section:
- LogFile
-
This is the required filename and path of a log file.
The Database section in the configuration file has the following keywords:
- Type
-
Database type. This needs to be a database type for which a DBD module exists, the type being the name as used in the DBD module. The default type is SQLite.
- Name
-
Database name. For an SQLite database; this needs to be at least the filename and can also include a path.
- User
-
Database user. For an SQLite database, this defaults to an empty string as it is not needed for that type of database.
- Password
-
Database password. For an SQLite database, this defaults to an empty string as it is not needed for that type of database.
The Nodelist section in the configuration file has the following keywords:
- Directory
-
The directory where the FTN Nodelist files are located.
This is an example of the contents of an ftndb.cfg file for use with FTN Nodelist related processing:
# ftndb.cfg
LogFile=/opt/ftndb/ftndb.log
[Database]
Type=mysql
Name=ftndbtst
User=sysop
Password=ftndbtst
[Nodelist]
Directory=/var/lib/ftn/nodelist
EXAMPLES
Given that $CFGFILE is a configuration file, the following command line can be used to create an FTN Nodelist table in that database file:
ftndb-nodelist -c $CFGFILE -t Nodelist -v create table
Given that NODELIST is the base nodelist filename and that $CFGFILE is an existing configuration file, the following command line can be used to load an FTN nodelist from a set of nodelist files all with the same basename of NODELIST:
ftndb-nodelist -c $CFGFILE -f NODELIST -d fidonet -v load
Given that $CFGFILE is an existing configuration file, the following command line can be used to load a specified zone of the specified domain from a specified nodelist:
ftndb-nodelist -c $CFGFILE -f nodelist.197 -d fidonet -z 1 -e -v load
AUTHOR
Robert James Clay, <jame at rocasa.us>
BUGS
Please report any bugs or feature requests via the web interface at https://sourceforge.net/p/ftnpl/ftndb/tickets/. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Note that you can also report any bugs or feature requests to bug-ftndb at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ftndb; however, the FTN Database application issue tracker at the SourceForge project is preferred.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc ftndb-nodelist
You can also look for information at:
FTN Database application issue tracker
RT: CPAN's request tracker
Search CPAN
SEE ALSO
L<FTN::Database>, L<FTNDB::Nodelist>, and L<ftndb-admin>.
COPYRIGHT & LICENSE
Copyright 2010-2012 Robert James Clay, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.