ftnpl-cvs Mailing List for Perl for FTN Systems
Brought to you by:
jame
You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(24) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(17) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(26) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ja...@us...> - 2011-08-13 16:03:52
|
Revision: 624
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=624&view=rev
Author: jame
Date: 2011-08-13 16:03:45 +0000 (Sat, 13 Aug 2011)
Log Message:
-----------
bconf2html.pl v0.3
* develop:
Changes file for version v0.3
doc/TODO as of 13 August 2011.
Cleanup of whitespace in some files.
Explicitly use Carp.
Correct the file open line in bin/bconf2html.pl
Rename bin/bconfhtm.pl as bin/bconf2html.pl
Fix declaration of option variables in bconfhtm.pl
Rename ignore.txt as .gitignore
General cleanup of bin/bconfhtm, referencing Perl::Tidy.
List bin/bconfhtm.sh in MANIFEST.
Update README, especially regarding GitHub.
List bconfhtm.pl & bcnfhtml.tpl in MANIFEST.
Reorganize bconfhtm source directory.
Modified Paths:
--------------
trunk/scripts/BBBS/bconfhtm/README
trunk/scripts/BBBS/bconfhtm/doc/TODO
Added Paths:
-----------
trunk/scripts/BBBS/bconfhtm/.gitignore
trunk/scripts/BBBS/bconfhtm/Changes
trunk/scripts/BBBS/bconfhtm/MANIFEST
trunk/scripts/BBBS/bconfhtm/Makefile.PL
trunk/scripts/BBBS/bconfhtm/bin/
trunk/scripts/BBBS/bconfhtm/bin/bconf2html.pl
trunk/scripts/BBBS/bconfhtm/bin/bconfhtm.sh
trunk/scripts/BBBS/bconfhtm/doc/FILE_ID.DIZ
trunk/scripts/BBBS/bconfhtm/doc/bcnfhtml.tpl
Removed Paths:
-------------
trunk/scripts/BBBS/bconfhtm/FILE_ID.DIZ
trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl
trunk/scripts/BBBS/bconfhtm/bconfhtm.pl
trunk/scripts/BBBS/bconfhtm/bconfhtm.sh
trunk/scripts/BBBS/bconfhtm/doc/Changes
Added: trunk/scripts/BBBS/bconfhtm/.gitignore
===================================================================
--- trunk/scripts/BBBS/bconfhtm/.gitignore (rev 0)
+++ trunk/scripts/BBBS/bconfhtm/.gitignore 2011-08-13 16:03:45 UTC (rev 624)
@@ -0,0 +1,12 @@
+blib*
+Makefile
+Makefile.old
+Build
+Build.bat
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+cover_db
+pod2htm*.tmp
+BCONFHTM-*
Added: trunk/scripts/BBBS/bconfhtm/Changes
===================================================================
--- trunk/scripts/BBBS/bconfhtm/Changes (rev 0)
+++ trunk/scripts/BBBS/bconfhtm/Changes 2011-08-13 16:03:45 UTC (rev 624)
@@ -0,0 +1,37 @@
+Changes
+--------
+
+13 Aug 11
+ - Released as v0.3
+ - Cleanup of whitespace in some files.
+ - Explicitly 'use Carp' in bconf2html.pl
+ - Rename bin/bconfhtm.pl as bin/bconf2html.pl
+ - Correct the 'file open' line in bin/bconf2html.pl
+ - Fix declaration of option variables in bconf2html.pl
+
+ 7 Jul 11
+ - Reorganize the bconfhtm source directory.
+ - Edit line 6 of bcnfhtml.tpl to correct spelling, etc.
+ - Use example.org for domain in example bcnfhtml.tpl file.
+ - Update the README file about bconfhtm being at GitHub.
+ - General cleanup of bconfhtm script, referencing Perl::Tidy.
+
+29 Jun 11
+ - Bump bconfhtm version to v0.3
+ - Update bconfhtm copyright years to include the year 2011.
+
+31 Jul 10
+ - Released as v0.2
+ - README: Add bconfhtm usage and support information. Correct
+ one of the contact email addresses. Minor edits.
+ - Reword & edit Help subroutine in bconfhtm.pl.
+
+28 Jul 10
+ - Bump bconfhtm version to v0.2
+ - Update bconfhtm copyright years to include the year 2010.
+ - Correct declaration of option variables in bconfhtm.pl.
+
+26 Jun 06
+ - Released as v0.1
+ - Corrections & additions to meta's in bcnfhtml.tpl template file.
+ - Initial import of bconfhtm.pl into cvs at ftnpl.sourceforge.net.
Deleted: trunk/scripts/BBBS/bconfhtm/FILE_ID.DIZ
===================================================================
--- trunk/scripts/BBBS/bconfhtm/FILE_ID.DIZ 2011-08-13 16:03:26 UTC (rev 623)
+++ trunk/scripts/BBBS/bconfhtm/FILE_ID.DIZ 2011-08-13 16:03:45 UTC (rev 624)
@@ -1,7 +0,0 @@
-bconfhtm.pl v0.3
-Perl script that creates an html page
-from a file resulting from the BBBS
-command 'bbbs bconf'. Requires the
-HTML::Template modulue. See README
-for more information.
-
Added: trunk/scripts/BBBS/bconfhtm/MANIFEST
===================================================================
--- trunk/scripts/BBBS/bconfhtm/MANIFEST (rev 0)
+++ trunk/scripts/BBBS/bconfhtm/MANIFEST 2011-08-13 16:03:45 UTC (rev 624)
@@ -0,0 +1,8 @@
+Changes
+MANIFEST
+Makefile.PL
+README
+bin/bconfhtm.sh
+bin/bconf2html.pl
+doc/bcnfhtml.tpl
+doc/TODO
Added: trunk/scripts/BBBS/bconfhtm/Makefile.PL
===================================================================
--- trunk/scripts/BBBS/bconfhtm/Makefile.PL (rev 0)
+++ trunk/scripts/BBBS/bconfhtm/Makefile.PL 2011-08-13 16:03:45 UTC (rev 624)
@@ -0,0 +1,23 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'bconfhtm',
+ AUTHOR => q{Robert James Clay <ja...@ro...>},
+ VERSION_FROM => 'bin/bconf2html.pl',
+ ABSTRACT => 'Create a BBBS Conference Statistics HTML page for a BBBS system.',
+ ($ExtUtils::MakeMaker::VERSION >= 6.3002
+ ? ('LICENSE'=> 'perl')
+ : ()),
+ EXE_FILES => [ qw( bin/bconf2html.pl ) ],
+ PL_FILES => {},
+ PREREQ_PM => {
+ 'Readonly' => 0,
+ 'Getopt::Std' => 0,
+ 'File::Slurp' => 0,
+ 'HTML::Template' => 0,
+ },
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'bconfhtm-*' },
+);
Modified: trunk/scripts/BBBS/bconfhtm/README
===================================================================
--- trunk/scripts/BBBS/bconfhtm/README 2011-08-13 16:03:26 UTC (rev 623)
+++ trunk/scripts/BBBS/bconfhtm/README 2011-08-13 16:03:45 UTC (rev 624)
@@ -1,13 +1,14 @@
-bconfhtm.pl v0.3
+bconf2html.pl
Copyright (c) 2006-2011 Robert James Clay
All Rights Reserved. This is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
-Perl script that creates an html page from a file resulting from the BBBS command
-'bbbs bconf' and an HTML template file. Requires the HTML::Template module.
+Perl script that creates an html page from a file resulting from the BBBS
+command 'bbbs bconf' and an HTML template file. Requires the HTML::Template
+module.
-Usage: bconfhtm.pl [-t Template] [-o HTMLDir] [-s StatsFile] [-f HTMLFileName] [-l LogFile] [-x] [-h]
+Usage: bconf2html.pl [-t Template] [-o HTMLDir] [-s StatsFile] [-f HTMLFileName] [-l LogFile] [-x] [-h]
Options:
-t HTML page template file. Defaults to /opt/bbbs/work/bcnfhtml.tpl.
@@ -18,50 +19,60 @@
-x Debug Mode
-h This Help
-It is hosted at the FTN for Perl project at Sourceforge and the current code for it can be browsed at:
-http://ftnpl.svn.sourceforge.net/viewvc/ftnpl/trunk/scripts/BBBS/bconfhtm/
+It is hosted at the FTN for Perl project at Sourceforge and the original code
+for it can be browsed for in the SVN repository at:
+ http://ftnpl.svn.sourceforge.net/viewvc/ftnpl/trunk/scripts/BBBS/bconfhtm/
+The current code for it can be found at the GIT repository at the bbbsdeb
+project at GitHub:
+http://github.com/bbbsdeb/bconfhtm.
-Archives of it can be found in the Project file downloads section. They can also be found on any FTN
-system that carries the BBBSUTIL File Echo, which is distributed via the Filegate (www.filegate.net).
+Archives of it can be found in the Project file downloads section. They can
+also be found on any FTN system that carries the BBBSUTIL File Echo, which is
+distributed via the Filegate (www.filegate.net). Or they can be obtained from
+the downloads section of the bconfhtm repository at GitHub.com/bbbsdeb/bconfhtm.
The ftnpl-user or ftnpl-develop mailing lists are available from the project site;
however, the FTN echo BBBS.ENGLISH is the preferred avenue for support.
-
+
============================================================
Files
----------------
-bconfhtm.pl Perl script that creates an html page from a file resulting
- from the BBBS command 'bbbs bconf'.
+bconf2html.pl Perl script that creates an html page from a file resulting
+ from the BBBS command 'bbbs bconf'.
-bcnfhtml.tpl Example HTML Template file for the page to be created.
+bcnfhtml.tpl Example HTML Template file for the page to be created.
-bconfhtm.sh Example shell script. Uses bconfhtm.pl with parameters to
- create an html page from a file resulting from the BBBS
- command 'bbbs bconf'. The variables should be modified as
- neccessary for your local setup.
+bconfhtm.sh Example shell script. Uses bconf2html.pl with parameters to
+ create an html page from a file resulting from the BBBS
+ command 'bbbs bconf'. The variables should be modified as
+ neccessary for your local setup.
-doc/TODO What needs to be, or is being, worked on
-doc/Changes Changes file
+doc/TODO What needs to be, or is being, worked on
+Changes Changes file
README This file
-FILE_ID.DIZ Description of archive.
+FILE_ID.DIZ Description of archive.
============================================================
Installation
----------------
+
1) Unzip the archive to a temporary directory
+ perl Makefile.PL
+ make
+ make install
2) Move the bcnfthml.tpl to the /opt/bbbs/work directory
-3) Move the bconfhtm.pl & bconfhtm.sh /opt/bbbs/scripts
+3) Move the bconf2html.pl & bconfhtm.sh /opt/bbbs/scripts
4) Make changes as neccessary to the template file
5) Make changes as neccesary to the bconfhtm.sh script
6) Add the running of the bconfhtm.sh script as a daily
event to the BBBS crontab or to another daily script
-
+
==================================
Robert J. Clay, 1:120/546@fidonet
ja...@us..., ja...@ro...
http://ftnpl.sourceforge.net
-
\ No newline at end of file
+http://github.com/bbbsdeb/bconfhtm
Deleted: trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl
===================================================================
--- trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl 2011-08-13 16:03:26 UTC (rev 623)
+++ trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl 2011-08-13 16:03:45 UTC (rev 624)
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
- <head>
- <meta http-equiv="content-type" content="charset=UTF-8" />
- <meta name="Author" content="Robert James Clay" />
- <meta name="Keywords" content="Fidonet, FTN, Statistics" />
- <meta name="Generator" content="bconfhtm.pl v0.3" />
- <meta HTTP-EQUIV="EXPIRES" content="<TMPL_VAR NAME="PAGEEXPIRES">" />
-
- <link rel="stylesheet" type="text/css" href="./bbbs.css" />
- <title>BBBS Conference Stats </title>
-
- </head>
-
- <body>
-
- <h1>example.org</h1>
- <h2>BBBS Conference Statistics</h2>
-
- <pre>
-<TMPL_VAR NAME="BCONFSTATS">
- </pre>
-
- <hr>
-
- • <strong>Updated »</strong> <TMPL_VAR NAME="HOURS">:<TMPL_VAR NAME="MINS"> <TMPL_VAR NAME="MON">/<TMPL_VAR NAME="DAY">/<TMPL_VAR NAME="YEAR">
-
- </body>
-</html>
Deleted: trunk/scripts/BBBS/bconfhtm/bconfhtm.pl
===================================================================
--- trunk/scripts/BBBS/bconfhtm/bconfhtm.pl 2011-08-13 16:03:26 UTC (rev 623)
+++ trunk/scripts/BBBS/bconfhtm/bconfhtm.pl 2011-08-13 16:03:45 UTC (rev 624)
@@ -1,141 +0,0 @@
-#!/usr/bin/perl
-# bconfhtm.pl Copyright (c) 2006-2011 Robert James Clay
-# Used to creat a BBBS Conference Statistics HTML page for a BBBS system.
-# All Rights Reserved. This is free software; you can redistribute
-# it and/or modify it under the same terms as Perl itself.
-
-use warnings;
-use strict;
-
-my $Version = "0.3";
-
-use File::Slurp;
-use HTML::Template;
-use Getopt::Std;
-
-our ($opt_t $opt_o $opt_s $opt_f $opt_l $opt_x $opt_h);
-my ($STATFILE, $TEMPLATE, $WORKDIR, $HTMLFILE, $expires, $expiry, $logfile, $DEBUG);
-
-
-getopts('t:o:f:s:l:xh');
-
-&ParseCommandLine();
-
-# set BBBS base directory
-my $BBBSDIR = "/opt/bbbs";
-
-#get current time as timestamp
-my $timestamp = time();
-# set page expiration time
-$expiry = 86400; # 86400 seconds, equals 1 day
-
-$expires = gmtime($timestamp + $expiry);
-
-# get local time as string
-my ($sec, $min, $hour, $day, $mon, $year, $wday, $yday, $isdst) = localtime($timestamp);
-
-# open & read the file containing the result of the command 'bbbs bconf', which is put in $bconfstats
-my $bconfstats = read_file("$STATFILE");
-
-# open the html template
-my $template = HTML::Template->new(filename => "$TEMPLATE");
-
-# fill in the template parameters
-$template->param(PAGEEXPIRES => $expires);
-
-$template->param(BCONFSTATS => $bconfstats);
-
-$template->param(DAY => $day);
-$template->param(MON => ($mon + 1));
-$template->param(YEAR => ($year + 1900));
-$template->param(HOURS => $hour);
-$template->param(MINS => $min);
-
-# create new version of conference stats html page
-my $newpage="$WORKDIR/$HTMLFILE";
-# open filehandle FH for write
-open(FH, "> $newpage") || die $!;
-
-# use the function to send the new contents to the new version of the file
-$template->output(print_to => *FH);
-
-# close the filehandle
-close(FH);
-
-exit(0);
-
-################################################
-## Subroutines
-##
-############################################
-# ParseCommandLine
-############################################
-sub ParseCommandLine {
-
- if ($opt_h) {
- &DisplayHelp();
- exit(1);
- }
-
- if ($opt_x) {
- $DEBUG = $opt_x; # set debug flag
- undef $opt_x;
- print "\nDebug flag is set ...\n";
- } else {
- $DEBUG = 0;
- }
-
- if ($opt_t) {
- $TEMPLATE=$opt_t; # this needs to be the filename & path
- undef $opt_t;
- } else {
- $TEMPLATE="/opt/bbbs/work/bcnfhtml.tpl"; # default template file
- }
-
- if ($opt_o) {
- $WORKDIR=$opt_o; # this needs to be the filename & path
- undef $opt_o;
- } else {
- $WORKDIR="/opt/bbbs/work"; # default working dir
- }
-
- if ($opt_s) {
- $STATFILE=$opt_s; # this needs to be the filename & path
- undef $opt_s;
- } else {
- $STATFILE="/opt/bbbs/work/bconf.txt"; # default stats file
- }
-
- if ($opt_f) {
- $HTMLFILE=$opt_f; # this needs to be the filename & path
- undef $opt_f;
- } else {
- $HTMLFILE="/opt/bbbs/work/bcnfstat.htm"; # default stats file
- }
-
- if ($opt_l) {
- $logfile=$opt_l; # this needs to be the filename & path for a logfile
- undef $opt_l;
- } else {
- my $logfile="/opt/bbbs/logs/wwwadm.log"; # default log file
- }
-
-}
-############################################
-# Help
-############################################
-sub DisplayHelp {
- print "\nUsage: bconfhtm.pl [-t Template] [-o HTMLDir] [-s StatsFile] / \n";
- print " [-f HTMLFileName] [-l LogFile] [-x] [-h]\n\n";
- print " -t HTML page template file; defaults to /opt/bbbs/work/bcnfhtml.tpl. \n";
- print " -o Directory where the resulting HTML file should be put.\n";
- print " Defaults to /opt/bbbs/work.\n";
- print " -s Path & filename for Stats file generated by the 'BBBS BCONF' \n";
- print " command. Defaults to /opt/bbbs/work/bconf.txt.\n";
- print " -f Filename for HTML file being created. \n";
- print " -l Path & filename of logfile. Defaults to /opt/bbbs/logs/wwwadm.log.\n";
- print " -x Debug Mode\n";
- print " -h This Help\n";
- print "\n";
-}
-
Deleted: trunk/scripts/BBBS/bconfhtm/bconfhtm.sh
===================================================================
--- trunk/scripts/BBBS/bconfhtm/bconfhtm.sh 2011-08-13 16:03:26 UTC (rev 623)
+++ trunk/scripts/BBBS/bconfhtm/bconfhtm.sh 2011-08-13 16:03:45 UTC (rev 624)
@@ -1,25 +0,0 @@
-#!/bin/sh
-# bconfhtm.sh - v0.3
-#
-BBBSDIR=/opt/bbbs
-SCRIPTS=$BBBSDIR/scripts
-WORKDIR=$BBBSDIR/work
-TEMPLATE=$WORKDIR/bcnfhtml.tpl
-HTMLDIR=$BBBSDIR/htdocs
-STATSFILE=$WORKDIR/bcnfstat.txt
-HTMLFILE=bcnfstat.htm
-
-cd $BBBSDIR
-
-# create Conference Statistics file
-$BBBSDIR/bbbs bconf > $STATSFILE
-
-# bconfhtm.pl -t Template -o HTMLDir -s StatsFile [-f HTMLFile] [-l LogFile] [-x] [-h]
-$SCRIPTS/bconfhtm.pl -t $TEMPLATE -o $WORKDIR -s $STATSFILE -f $HTMLFILE
-
-# put new version of file online
-cp $WORKDIR/$HTMLFILE $HTMLDIR/$HTMLFILE
-
-# delete working copy
-rm $WORKDIR/$HTMLFILE
-
Copied: trunk/scripts/BBBS/bconfhtm/bin/bconf2html.pl (from rev 623, trunk/scripts/BBBS/bconfhtm/bconfhtm.pl)
===================================================================
--- trunk/scripts/BBBS/bconfhtm/bin/bconf2html.pl (rev 0)
+++ trunk/scripts/BBBS/bconfhtm/bin/bconf2html.pl 2011-08-13 16:03:45 UTC (rev 624)
@@ -0,0 +1,160 @@
+#!/usr/bin/perl
+# bconf2html.pl Copyright (c) 2006-2011 Robert James Clay
+# Used to create a BBBS Conference Statistics HTML page for a BBBS system.
+# All Rights Reserved. This is free software; you can redistribute
+# it and/or modify it under the same terms as Perl itself.
+
+use warnings;
+use strict;
+
+our $VERSION = '0.3';
+
+use File::Slurp;
+use HTML::Template;
+use Getopt::Std;
+use Carp;
+
+our ($opt_t, $opt_o, $opt_s, $opt_f, $opt_l, $opt_x, $opt_h);
+my ($STATFILE, $TEMPLATE, $WORKDIR, $HTMLFILE, $expires, $expiry, $logfile, $DEBUG);
+
+use Readonly;
+Readonly my $DAYOFSECS => 86_400;
+Readonly my $NINETEENTH => 1900;
+
+getopts('t:o:f:s:l:xh');
+
+parse_command_line();
+
+# set BBBS base directory
+my $BBBSDIR = '/opt/bbbs';
+
+#get current time as timestamp
+my $timestamp = time();
+# set page expiration time
+# 86,400 seconds, equals 1 day
+$expiry = $DAYOFSECS;
+
+$expires = gmtime($timestamp + $expiry);
+
+# get local time as string
+my ($sec, $min, $hour, $day, $mon, $year, $wday, $yday, $isdst) = localtime($timestamp);
+
+# open & read the file containing the result of the command 'bbbs bconf', which is put in $bconfstats
+my $bconfstats = read_file("$STATFILE");
+
+# open the html template
+my $template = HTML::Template->new(filename => "$TEMPLATE");
+
+# fill in the template parameters
+$template->param(PAGEEXPIRES => $expires);
+
+$template->param(BCONFSTATS => $bconfstats);
+
+$template->param(DAY => $day);
+$template->param(MON => ($mon + 1));
+$template->param(YEAR => ($year + $NINETEENTH));
+$template->param(HOURS => $hour);
+$template->param(MINS => $min);
+
+# create new version of conference stats html page
+my $newpage="$WORKDIR/$HTMLFILE";
+# open filehandle FH for write
+open my $fh, q{>}, $newpage || croak $!;
+
+# use the function to send the new contents to the new version of the file
+$template->output(print_to => *$fh);
+
+# close the filehandle
+close($fh) or croak "Unable to close: $!";
+
+exit 0;
+
+################################################
+## Subroutines
+##
+############################################
+# parse_command_line
+############################################
+sub parse_command_line {
+
+ if ($opt_h) {
+ display_help();
+ exit 1;
+ }
+
+ if ($opt_x) {
+ # set debug flag
+ $DEBUG = $opt_x;
+ undef $opt_x;
+ print "\nDebug flag is set ...\n";
+ } else {
+ $DEBUG = 0;
+ }
+
+ if ($opt_t) {
+ $TEMPLATE=$opt_t; # this needs to be the filename & path
+ undef $opt_t;
+ } else {
+ # default template file
+ $TEMPLATE='/opt/bbbs/work/bcnfhtml.tpl';
+ }
+
+ if ($opt_o) {
+ # this needs to be the filename & path
+ $WORKDIR=$opt_o;
+ undef $opt_o;
+ } else {
+ # default working directory
+ $WORKDIR='/opt/bbbs/work';
+ }
+
+ if ($opt_s) {
+ # this needs to be the filename & path
+ $STATFILE=$opt_s;
+ undef $opt_s;
+ } else {
+ # default stats file
+ $STATFILE='/opt/bbbs/work/bconf.txt';
+ }
+
+ if ($opt_f) {
+ # this needs to be the filename & path
+ $HTMLFILE=$opt_f;
+ undef $opt_f;
+ } else {
+ # default stats file
+ $HTMLFILE='/opt/bbbs/work/bcnfstat.htm';
+ }
+
+ if ($opt_l) {
+ # this needs to be the filename & path for a logfile
+ $logfile=$opt_l;
+ undef $opt_l;
+ } else {
+ # default log file
+ $logfile='/opt/bbbs/logs/wwwadm.log';
+ }
+
+ return();
+
+}
+############################################
+# Help
+############################################
+sub display_help {
+ print "\nUsage: bconf2html.pl [-t Template] [-o HTMLDir] [-s StatsFile] / \n";
+ print " [-f HTMLFileName] [-l LogFile] [-x] [-h]\n\n";
+ print " -t HTML page template file; defaults to /opt/bbbs/work/bcnfhtml.tpl. \n";
+ print " -o Directory where the resulting HTML file should be put.\n";
+ print " Defaults to /opt/bbbs/work.\n";
+ print " -s Path & filename for Stats file generated by the 'BBBS BCONF' \n";
+ print " command. Defaults to /opt/bbbs/work/bconf.txt.\n";
+ print " -f Filename for HTML file being created. \n";
+ print " -l Path & filename of logfile. Defaults to /opt/bbbs/logs/wwwadm.log.\n";
+ print " -x Debug Mode\n";
+ print " -h This Help\n";
+ print "\n";
+
+ return();
+}
+
Copied: trunk/scripts/BBBS/bconfhtm/bin/bconfhtm.sh (from rev 623, trunk/scripts/BBBS/bconfhtm/bconfhtm.sh)
===================================================================
--- trunk/scripts/BBBS/bconfhtm/bin/bconfhtm.sh (rev 0)
+++ trunk/scripts/BBBS/bconfhtm/bin/bconfhtm.sh 2011-08-13 16:03:45 UTC (rev 624)
@@ -0,0 +1,25 @@
+#!/bin/sh
+# bconfhtm.sh - v0.3
+#
+BBBSDIR=/opt/bbbs
+SCRIPTS=$BBBSDIR/scripts
+WORKDIR=$BBBSDIR/work
+TEMPLATE=$WORKDIR/bcnfhtml.tpl
+HTMLDIR=$BBBSDIR/htdocs
+STATSFILE=$WORKDIR/bcnfstat.txt
+HTMLFILE=bcnfstat.htm
+
+cd $BBBSDIR
+
+# create Conference Statistics file
+$BBBSDIR/bbbs bconf > $STATSFILE
+
+# bconf2html.pl -t Template -o HTMLDir -s StatsFile [-f HTMLFile] [-l LogFile] [-x] [-h]
+$SCRIPTS/bconf2html.pl -t $TEMPLATE -o $WORKDIR -s $STATSFILE -f $HTMLFILE
+
+# put new version of file online
+cp $WORKDIR/$HTMLFILE $HTMLDIR/$HTMLFILE
+
+# delete working copy
+rm $WORKDIR/$HTMLFILE
+
Deleted: trunk/scripts/BBBS/bconfhtm/doc/Changes
===================================================================
--- trunk/scripts/BBBS/bconfhtm/doc/Changes 2011-08-13 16:03:26 UTC (rev 623)
+++ trunk/scripts/BBBS/bconfhtm/doc/Changes 2011-08-13 16:03:45 UTC (rev 624)
@@ -1,23 +0,0 @@
-Changes
---------
-
-29 Jun 11
- - Bump bconfhtm version to v0.3
- - Update bconfhtm copyright years to include the year 2011.
-
-31 Jul 10
- - Released as v0.2
- - README: Add bconfhtm usage and support information. Correct
- one of the contact email addresses. Minor edits.
- - Reword & edit Help subroutine in bconfhtm.pl.
-
-28 Jul 10
- - Bump bconfhtm version to v0.2
- - Update bconfhtm copyright years to include the year 2010.
- _ Correct declaration of option variables in bconfhtm.pl.
-
-26 Jun 06
- - Released as v0.1
- - Corrections & additions to meta's in bcnfhtml.tpl template file.
- - Initial import of bconfhtm.pl into cvs at ftnpl.sourceforge.net.
-
\ No newline at end of file
Copied: trunk/scripts/BBBS/bconfhtm/doc/FILE_ID.DIZ (from rev 623, trunk/scripts/BBBS/bconfhtm/FILE_ID.DIZ)
===================================================================
--- trunk/scripts/BBBS/bconfhtm/doc/FILE_ID.DIZ (rev 0)
+++ trunk/scripts/BBBS/bconfhtm/doc/FILE_ID.DIZ 2011-08-13 16:03:45 UTC (rev 624)
@@ -0,0 +1,7 @@
+bconf2html.pl v0.x
+Perl script that creates an html page
+from a file resulting from the BBBS
+command 'bbbs bconf'. Requires the
+HTML::Template modulue. See README
+for more information.
+
Modified: trunk/scripts/BBBS/bconfhtm/doc/TODO
===================================================================
--- trunk/scripts/BBBS/bconfhtm/doc/TODO 2011-08-13 16:03:26 UTC (rev 623)
+++ trunk/scripts/BBBS/bconfhtm/doc/TODO 2011-08-13 16:03:45 UTC (rev 624)
@@ -1,5 +1,18 @@
-To do: bconfhtm 7/31/10
+To Do: bconfhtm 8/13/11
+bconf2html.pl
+
+ - Change to using a simple config file, which points to the directories and
+ files needed by the script.
+
+ - Move example shell script into POD documentation in bconfhtm script?
+
+ - Have configurable/optional expiry times, instead of just the default 1 day?
+
+ - Expires meta: per RFC 2068, HTTP timestamps should be in GMT and
+ in RFC 1123 format. (Mon, 22 Jul 2002 11:12:01 GMT) -> check & fix
+
bcnfhtml.tpl
+
- Expires meta: per RFC 2068, HTTP timestamps should be in GMT and
- in RFC 1123 format. (Mon, 22 Jul 2002 11:12:01 GMT) -> check & fix
\ No newline at end of file
+ in RFC 1123 format. (Mon, 22 Jul 2002 11:12:01 GMT) -> check & fix
Copied: trunk/scripts/BBBS/bconfhtm/doc/bcnfhtml.tpl (from rev 623, trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl)
===================================================================
--- trunk/scripts/BBBS/bconfhtm/doc/bcnfhtml.tpl (rev 0)
+++ trunk/scripts/BBBS/bconfhtm/doc/bcnfhtml.tpl 2011-08-13 16:03:45 UTC (rev 624)
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+ <head>
+ <meta http-equiv="content-type" content="charset=UTF-8" />
+ <meta name="Author" content="Robert James Clay" />
+ <meta name="Keywords" content="Fidonet, FTN, Statistics" />
+ <meta name="Generator" content="bconf2html.pl v0.3" />
+ <meta HTTP-EQUIV="EXPIRES" content="<TMPL_VAR NAME="PAGEEXPIRES">" />
+
+ <link rel="stylesheet" type="text/css" href="./bbbs.css" />
+ <title>BBBS Conference Stats </title>
+
+ </head>
+
+ <body>
+
+ <h1>example.org</h1>
+ <h2>BBBS Conference Statistics</h2>
+
+ <pre>
+<TMPL_VAR NAME="BCONFSTATS">
+ </pre>
+
+ <hr>
+
+ • <strong>Updated »</strong> <TMPL_VAR NAME="HOURS">:<TMPL_VAR NAME="MINS"> <TMPL_VAR NAME="MON">/<TMPL_VAR NAME="DAY">/<TMPL_VAR NAME="YEAR">
+
+ </body>
+</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-08-13 16:03:33
|
Revision: 623
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=623&view=rev
Author: jame
Date: 2011-08-13 16:03:26 +0000 (Sat, 13 Aug 2011)
Log Message:
-----------
Use example.org for domain in example bcnfhtml.tpl file.
Modified Paths:
--------------
trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl
Modified: trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl
===================================================================
--- trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl 2011-08-13 16:03:18 UTC (rev 622)
+++ trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl 2011-08-13 16:03:26 UTC (rev 623)
@@ -14,7 +14,7 @@
<body>
- <h1>b4mp.rocasa.org </h1>
+ <h1>example.org</h1>
<h2>BBBS Conference Statistics</h2>
<pre>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-08-13 16:03:25
|
Revision: 622
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=622&view=rev
Author: jame
Date: 2011-08-13 16:03:18 +0000 (Sat, 13 Aug 2011)
Log Message:
-----------
Edit line 6 of bcnfhtml.tpl for spelling, etc.
Modified Paths:
--------------
trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl
Modified: trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl
===================================================================
--- trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl 2011-07-15 17:13:42 UTC (rev 621)
+++ trunk/scripts/BBBS/bconfhtm/bcnfhtml.tpl 2011-08-13 16:03:18 UTC (rev 622)
@@ -3,7 +3,7 @@
<head>
<meta http-equiv="content-type" content="charset=UTF-8" />
<meta name="Author" content="Robert James Clay" />
- <meta name="Keywards" content="fidonet, FTN, Statistics" />
+ <meta name="Keywords" content="Fidonet, FTN, Statistics" />
<meta name="Generator" content="bconfhtm.pl v0.3" />
<meta HTTP-EQUIV="EXPIRES" content="<TMPL_VAR NAME="PAGEEXPIRES">" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-15 17:13:52
|
Revision: 621
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=621&view=rev
Author: jame
Date: 2011-07-15 17:13:42 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
FTN::Packet v0.13
* develop:
Changes for v0.13.
TODO as of 15 July 2011.
Reorganize the documentation in lib/FTN/Packet.pm.
Correct numbers in test scripts.
Bump version to v0.13
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/doc/TODO
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
trunk/modules/FTN/Packet/t/00-load.t
trunk/modules/FTN/Packet/t/boilerplate.t
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:33 UTC (rev 620)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:42 UTC (rev 621)
@@ -1,5 +1,11 @@
Revision history for Perl extension FTN::Packet
+0.13 Fri Jul 15 2011
+ - Correct numbers in test scripts.
+ - Updated the FTN::Packet TODO file.
+ - Reorganize documentation in lib/FTN/Packet.pm: moved the ACKNOWLEDGEMENT
+ section, added a BUGS section, and added to the SUPPORT section.
+
0.12 Mon Jul 11 2011 17:11
- Correct line for TODO file in MANIFEST.
- Correct grep line number 355 in Packet.pm.
Modified: trunk/modules/FTN/Packet/doc/TODO
===================================================================
--- trunk/modules/FTN/Packet/doc/TODO 2011-07-15 17:13:33 UTC (rev 620)
+++ trunk/modules/FTN/Packet/doc/TODO 2011-07-15 17:13:42 UTC (rev 621)
@@ -1,33 +1,39 @@
-To do: FTN:Packet
+To Do: FTN:Packet
+- Run perltidy on Packet.pm
+
+- Move TODO into a .pod file.
+
+- Fix the possible ftsc date related issues in the course of creating and
+ using an ftsc_date function.
+
- Reorganize the functions, so that instead of a read and a write packet
-function; there are functions to open and close the packet file being read or
-written, reading or writing the packet header are separate functions, and then
-reading or writing the messsages to or from a packet file are also separate
-functions?
+ function; there are functions to open and close the packet file being
+ read or written, reading or writing the packet header are separate
+ functions, and then reading or writing the messsages to or from a packet
+ file are also separate functions?
- Also add other functions as neccessary: one for generating a serial number,
-one for generating a name for a standard packet file, one for generating an
-ftsc standard date.
+ one for generating a name for a standard packet file, one for generating an
+ ftsc standard date.
- Add reference to ftsc documentation and/or to the ftsc web site.
write_ftn_packet()
- When doing, for instance, two messages: two messages are making it into
-the packets but they're both the text of the second message.
+ the packets but they're both the text of the second message.
- Also the serial number for the MSGID is coming up as the same for both.
-When code a better way of getting a 8 char serial number to use, add it as a
-function to the module?
+ When code a better way of getting a 8 char serial number to use, add it
+ as a function to the module?
- The write up and variable usages for the packet format per FTS-0001 could
-be rewritten to more closely match the current documentation, esp. the listed
-order.
+ be rewritten to more closely match the current documentation, esp. the listed
+ order.
- Change the name of the appropriate fields in the packet related hashes to
-being named after how they are named in the FTS-0001 documentation.
+ being named after how they are named in the FTS-0001 documentation.
read_ftn_packet()
- Change the name of the appropriate fields in the packet related hashes to
-being named after how they are named in the fts-0001 documentation.
+ being named after how they are named in the fts-0001 documentation.
- The zone number information is not being pulled what is available in the
-packet; needed to set the from_node & to_node variables instead of assuming
-zone 1. It is in the packet header (being skipped in the current code) instead
-of in the message header. Or could use the zone number from the message id if
-available.
-
\ No newline at end of file
+ packet; needed to set the from_node & to_node variables instead of assuming
+ zone 1. It is in the packet header (being skipped in the current code) instead
+ of in the message header. Or could use the zone number from the message id if
+ available.
Modified: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:33 UTC (rev 620)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:42 UTC (rev 621)
@@ -9,11 +9,11 @@
=head1 VERSION
-VERSION 0.11
+VERSION 0.13
=cut
-our $VERSION = '0.11';
+our $VERSION = '0.13';
=head1 DESCRIPTION
@@ -406,6 +406,44 @@
Robert James Clay, ja...@ro...
+=head1 BUGS
+
+Please report any bugs or feature requests via the web interface at
+L<https://github.com/jame/ftn-packet/issues>. 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
+C<bug-ftn-packet at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=FTN-Packet>;
+however, the FTN-Packet Issue tracker is preferred.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc FTN::Packet
+
+You can also look for information at:
+
+=over 4
+
+=item * FTN::Packet issue tracker
+
+L<https://github.com/jame/ftn-packet/issues>
+
+=item * RT: CPAN's request tracker
+
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=FTN-Packet>
+
+=item * Search CPAN
+
+L<http://search.cpan.org/dist/FTN-Packet/>
+
+=back
+
+
+
=head1 ACKNOWLEDGEMENTS
Code for the read_ftn_packet function was initially derived from the newmsgs subroutine
@@ -415,12 +453,6 @@
the write_ftn_packet function was derived from the bbs2pkt.pl of v0.1 of the bbsdbpl
scripts, also at the SourceForge project.
-=head1 SUPPORT
-
-You can find documentation for this module with the perldoc command.
-
- perldoc FTN::Packet
-
=head1 SEE ALSO
L<perl(1)>
Modified: trunk/modules/FTN/Packet/t/00-load.t
===================================================================
--- trunk/modules/FTN/Packet/t/00-load.t 2011-07-15 17:13:33 UTC (rev 620)
+++ trunk/modules/FTN/Packet/t/00-load.t 2011-07-15 17:13:42 UTC (rev 621)
@@ -1,6 +1,6 @@
#!perl -T
-use Test::More tests => 2;
+use Test::More tests => 1;
BEGIN {
use_ok( 'FTN::Packet' );
Modified: trunk/modules/FTN/Packet/t/boilerplate.t
===================================================================
--- trunk/modules/FTN/Packet/t/boilerplate.t 2011-07-15 17:13:33 UTC (rev 620)
+++ trunk/modules/FTN/Packet/t/boilerplate.t 2011-07-15 17:13:42 UTC (rev 621)
@@ -2,7 +2,7 @@
use strict;
use warnings;
-use Test::More tests => 4;
+use Test::More tests => 3;
sub not_in_file_ok {
my ($filename, %regex) = @_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-15 17:13:44
|
Revision: 620
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=620&view=rev
Author: jame
Date: 2011-07-15 17:13:33 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
FTN::Packet v0.12
* develop:
Changes for version v0.12
Correct grep line number 355 in Packet.pm
Set scope for ISA, EXPORT, and EXPORT_OK in Packet.pm
Correct line for TODO file in MANIFEST.
Some cleanup of white space and comments in Packet.pm.
Bump version to v0.12
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/MANIFEST
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:25 UTC (rev 619)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:33 UTC (rev 620)
@@ -1,5 +1,11 @@
Revision history for Perl extension FTN::Packet
+0.12 Mon Jul 11 2011 17:11
+ - Correct line for TODO file in MANIFEST.
+ - Correct grep line number 355 in Packet.pm.
+ - Set scope for ISA, EXPORT, and EXPORT_OK in Packet.pm.
+ - Some cleanup of white space and comments in Packet.pm.
+
0.11 Mon Jul 11 2011 15:26
- Correct POD email links in Packet.pm.
- Rewrite grep at line 356 in Packet.pm.
Modified: trunk/modules/FTN/Packet/MANIFEST
===================================================================
--- trunk/modules/FTN/Packet/MANIFEST 2011-07-15 17:13:25 UTC (rev 619)
+++ trunk/modules/FTN/Packet/MANIFEST 2011-07-15 17:13:33 UTC (rev 620)
@@ -3,7 +3,7 @@
Makefile.PL
lib/FTN/Packet.pm
README
-TODO
+doc/TODO
t/00-load.t
t/pod-coverage.t
t/pod.t
Modified: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:25 UTC (rev 619)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:33 UTC (rev 620)
@@ -31,13 +31,13 @@
=cut
-@ISA = qw(Exporter AutoLoader);
+our @ISA = qw(Exporter AutoLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
-@EXPORT = qw(
+our @EXPORT = qw(
);
-@EXPORT_OK = qw( &read_ftn_packet &write_ftn_packet
+our @EXPORT_OK = qw( &read_ftn_packet &write_ftn_packet
);
=head1 FUNCTIONS
@@ -133,7 +133,7 @@
$area =~ s/.*://;
# Force upper case ???
- $area =~ tr/a-z/A-Z/;
+ $area =~ tr/a-z/A-Z/;
@kludges = ();
@@ -168,8 +168,8 @@
@lines = ("[empty message]");
}
- # get message body
- $message_body = ""; # ensure that it starts empty
+ # get message body, ensuring that it starts empty
+ $message_body = "";
foreach my $s (@lines) {
$s =~ tr/\0-\037/\040-\100/;
@@ -181,14 +181,14 @@
$message_body .= "$mailer\n" if ($mailer);
$message_body .= " * Origin: $origin\n" if ($origin);
- # get control info
- my $control_info = ""; # ensure that it starts empty
+ # get control info, ensuring that it starts empty
+ my $control_info = "";
$control_info .= "$seen_by\n" if ($seen_by);
foreach my $c (@kludges) {
$c =~ s/^\001//;
# If kludge starts with "MSGID:", stick that in a special
- # variable.
+ # variable.
if ( substr($c, 0, 6) eq "MSGID:" ) {
$message_id = substr($c, 7);
}
@@ -321,15 +321,14 @@
# PKT name as per FTS
($seconds, $minutes, $hour, $day, $month, $year) = localtime();
$year += 1900;
- # does the above actually give a two digit year?
- # the original above was 1900 instead of 2000
+
$packet_file = sprintf("%s/%02d%02d%02d%02d.pkt",$OutDir,$day,$hour,$minutes,$seconds);
open( $PKT, q{>}, "$packet_file" ) || die;
binmode($PKT);
- # write packet header
+ # write packet header
$buffer = pack("SSSSSSSSSSSSSa8SSSSSSSSSSL",
${$packet_info}{OrgNode}, ${$packet_info}{DestNode},
$year, $month, $day, $hour, $minutes, $seconds,
@@ -353,7 +352,7 @@
# get text body, translate LFs to CRs
@lines = ${$message_ref}{Body};
- grep { s/\n/\r/ }, @lines;
+ @lines = grep { s/\n/\r/ } @lines;
# kill leading blank lines
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-15 17:13:36
|
Revision: 619
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=619&view=rev
Author: jame
Date: 2011-07-15 17:13:25 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
FTN::Packet v0.11
* develop:
Changes for version v0.11
Update RJC copyright years to include 2011.
Rewrite grep at line 356 in Packet.pm.
Correct where code ends in Packet.pm.
Correct POD email links in Packet.pm.
Explicitly set scope for VERSION, PKT, and nmesgs.
Localize usage of separator value in Packet.pm.
Corrections to EXPORT_OK in Packet.pm.
Correction to EXPORT_OK in Packet.pm.
Bump version to v0.11
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/README
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:19 UTC (rev 618)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:25 UTC (rev 619)
@@ -1,6 +1,15 @@
Revision history for Perl extension FTN::Packet
-0.10 Mon Jul 11 2011
+0.11 Mon Jul 11 2011 15:26
+ - Correct POD email links in Packet.pm.
+ - Rewrite grep at line 356 in Packet.pm.
+ - Corrections for EXPORT_OK in Packet.pm.
+ - Update RJC copyright years to include 2011.
+ - Localize usage of separator value in Packet.pm.
+ - Explicitly set scope for $VERSION, $PKT, and $nmesgs in Packet.pm.
+ - Correct where code ends in Packet.pm by moving the "1;" to line 398.
+
+0.10 Mon Jul 11 2011 12:30
- Explicitly use warnings in Packet.pm.
- Make loop iterators in Packet.pm lexical.
- Correct binmode call at line 332 of Packet.pm
Modified: trunk/modules/FTN/Packet/README
===================================================================
--- trunk/modules/FTN/Packet/README 2011-07-15 17:13:19 UTC (rev 618)
+++ trunk/modules/FTN/Packet/README 2011-07-15 17:13:25 UTC (rev 619)
@@ -1,6 +1,6 @@
FTN::Packet
-Copyright (c) 2001-2010 Robert James Clay. All Rights Reserved.
+Copyright (c) 2001-2011 Robert James Clay. All Rights Reserved.
This is free software; you can redistribute it and/or
mnodify it under the same terms as Perl itself.
Modified: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:19 UTC (rev 618)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:25 UTC (rev 619)
@@ -2,7 +2,6 @@
use strict;
use warnings;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
=head1 NAME
@@ -10,11 +9,11 @@
=head1 VERSION
-VERSION 0.10
+VERSION 0.11
=cut
-$VERSION = '0.10';
+our $VERSION = '0.11';
=head1 DESCRIPTION
@@ -38,8 +37,7 @@
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
);
-@EXPORT_OK = qw( &read_ftn_packet(), &write_ftn_packet()
-
+@EXPORT_OK = qw( &read_ftn_packet &write_ftn_packet
);
=head1 FUNCTIONS
@@ -98,7 +96,7 @@
undef $cost;
$separator = $/;
- $/ = "\0";
+ local $/ = "\0";
$date_time = <$PKT>;
if (length($date_time) > 20) {
@@ -116,7 +114,7 @@
$subject =~ tr/\0-\037/\040-\100/; # mask control characters
$s = <$PKT>;
- $/ = $separator;
+ local $/ = $separator;
$s =~ s/\x8d/\r/g;
@lines = split(/\r/,$s);
@@ -258,7 +256,7 @@
my ($OutDir, $packet_info, $messages) = @_;
- my ($packet_file, @lines, $serialno, $buffer, $i, $k, $message_ref);
+ my ($packet_file, $PKT, @lines, $serialno, $buffer, $nmsgs, $i, $k, $message_ref);
my $EOL = "\n\r";
@@ -355,7 +353,7 @@
# get text body, translate LFs to CRs
@lines = ${$message_ref}{Body};
- grep(s/\n/\r/,@lines);
+ grep { s/\n/\r/ }, @lines;
# kill leading blank lines
@@ -397,6 +395,7 @@
return 0;
}
+1;
__END__
=head1 EXAMPLES
@@ -412,7 +411,7 @@
Code for the read_ftn_packet function was initially derived from the newmsgs subroutine
in the set of scripts for reading FTN packets (pkt2txt.pl, pkt2xml.pl, etc) by
-Russ Johnson L<ai...@us...> and Robert James Clay L<ja...@ro...>
+Russ Johnson L<mailto:ai...@us...> and Robert James Clay L<mailto:ja...@ro...>
available at the L<http://ftnpl.sourceforge.net>] project site. Initial code for
the write_ftn_packet function was derived from the bbs2pkt.pl of v0.1 of the bbsdbpl
scripts, also at the SourceForge project.
@@ -429,7 +428,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2001-2010 Robert James Clay, all rights reserved.
+Copyright 2001-2011 Robert James Clay, all rights reserved.
Copyright 2001-2003 Russ Johnson, all rights reserved.
This program is free software; you can redistribute it and/or modify it
@@ -437,4 +436,3 @@
=cut
-1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-15 17:13:25
|
Revision: 618
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=618&view=rev
Author: jame
Date: 2011-07-15 17:13:19 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
FTN::Packet v0.10
* develop:
Changes for version 0.10
Correct binmode call at line 332 of Packet.pm.
Make loop iterators in Packet.pm lexical.
Use 3 argument version of Open in Packet.pm.
General whitespace cleanup and use warnings in Packet.pm.
Correct year adjust from 2000 to 1900 in Packet.pm.
Correct misspelling of ftnscdate to ftscdate in Packet.pm.
Bump version to v0.10
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:12 UTC (rev 617)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:19 UTC (rev 618)
@@ -1,5 +1,14 @@
Revision history for Perl extension FTN::Packet
+0.10 Mon Jul 11 2011
+ - Explicitly use warnings in Packet.pm.
+ - Make loop iterators in Packet.pm lexical.
+ - Correct binmode call at line 332 of Packet.pm
+ - Use three argument version of open() in Packet.pm.
+ - Some general cleanup of white space in Packet.pm.
+ - Correct misspelling of ftnscdate to ftscdate in Packet.pm.
+ - Correct year number adjustment from 2000 to 1900 in Packet.pm.
+
0.09 Sun Sep 05 2010
- Change to using the TEST modules for testing.
- Change how Author copyright years is listed.
Modified: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:12 UTC (rev 617)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:19 UTC (rev 618)
@@ -1,6 +1,7 @@
package FTN::Packet;
use strict;
+use warnings;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
=head1 NAME
@@ -9,11 +10,11 @@
=head1 VERSION
-VERSION 0.09
+VERSION 0.10
=cut
-$VERSION = '0.09';
+$VERSION = '0.10';
=head1 DESCRIPTION
@@ -52,7 +53,7 @@
$message_ref = pop(@{$messages});
$msg_area = ${$message_ref}->('area');
- $msg_date = ${$message_ref}->('ftnscdate');
+ $msg_date = ${$message_ref}->('ftscdate');
$msg_tonode = ${$message_ref}->('tonode');
$msg_from = ${$message_ref}->('from');
$msg_body = ${$message_ref}->('to');
@@ -75,157 +76,170 @@
my ($packet_version,$origin_node,$destination_node,$origin_net,$destination_net,$attribute,$cost,$buffer);
my ($separator, $s, $date_time, $to, $from, $subject, $area, @lines, @kludges,
- $from_node, $to_node, @messages, $message_body, $message_id, $reply_id, $origin,
- $mailer, $seen_by, $i, $k);
+ $from_node, $to_node, @messages, $message_body, $message_id, $reply_id, $origin,
+ $mailer, $seen_by, $i, $k);
- read($PKT,$buffer,58); # Ignore packet header
+ # Ignore packet header
+ read($PKT,$buffer,58);
while (!eof($PKT)) {
-
- last if (read($PKT, $buffer, 14) != 14);
-
- ($packet_version, $origin_node, $destination_node, $origin_net, $destination_net, $attribute, $cost) = unpack("SSSSSSS",$buffer);
- undef $packet_version; # not used for anything yet - 8/26/01 rjc
- undef $attribute; # not used for anything yet - 8/26/01 rjc
- undef $cost; # not used for anything yet - 12/15/01 rjc
+ last if (read($PKT, $buffer, 14) != 14);
- $separator = $/;
- $/ = "\0";
+ ($packet_version, $origin_node, $destination_node, $origin_net, $destination_net, $attribute, $cost) = unpack("SSSSSSS",$buffer);
- $date_time = <$PKT>;
- if (length($date_time) > 20) {
+ # not used for anything yet - 8/26/01 rjc
+ undef $packet_version;
+
+ # not used for anything yet - 8/26/01 rjc
+ undef $attribute;
+
+ # not used for anything yet - 12/15/01 rjc
+ undef $cost;
+
+ $separator = $/;
+ $/ = "\0";
+
+ $date_time = <$PKT>;
+ if (length($date_time) > 20) {
$to = substr($date_time,20);
- } else {
- $to = <$PKT>;
- }
- $from = <$PKT>;
- $subject = <$PKT>;
+ } else {
+ $to = <$PKT>;
+ }
+ $from = <$PKT>;
+ $subject = <$PKT>;
- $to =~ tr/\200-\377/\0-\177/; # mask hi-bit characters
- $to =~ tr/\0-\037/\040-\100/; # mask control characters
- $from =~ tr/\200-\377/\0-\177/; # mask hi-bit characters
- $from =~ tr/\0-\037/\040-\100/; # mask control characters
- $subject =~ tr/\0-\037/\040-\100/; # mask control characters
+ $to =~ tr/\200-\377/\0-\177/; # mask hi-bit characters
+ $to =~ tr/\0-\037/\040-\100/; # mask control characters
+ $from =~ tr/\200-\377/\0-\177/; # mask hi-bit characters
+ $from =~ tr/\0-\037/\040-\100/; # mask control characters
+ $subject =~ tr/\0-\037/\040-\100/; # mask control characters
- $s = <$PKT>;
- $/ = $separator;
+ $s = <$PKT>;
+ $/ = $separator;
- $s =~ s/\x8d/\r/g;
- @lines = split(/\r/,$s);
+ $s =~ s/\x8d/\r/g;
+ @lines = split(/\r/,$s);
- undef $s;
+ undef $s;
- next if ($#lines < 0);
+ next if ($#lines < 0);
- $area = shift(@lines);
- $_ = $area;
- $area ="NETMAIL" if /\//i; # default netmail area name
- $area =~ s/.*://; # strip "area:"
- $area =~ tr/a-z/A-Z/; # Force upper case ???
-
- @kludges = ();
+ $area = shift(@lines);
+ $_ = $area;
- for ($i = $k = 0; $i <= $#lines; $i++) {
-
- if ($lines[$i] =~ /^\001/) {
- $kludges[$k++] = splice(@lines,$i,1);
- redo;
- }
- }
-
- for (;;) {
- $_ = pop(@lines);
- last if ($_ eq "");
- if (/ \* origin: /i) {
- $origin = substr($_,11);
- last;
- }
- if (/---/) {
- $mailer = $_;
- }
- if (/seen-by/i) {
- $seen_by=$_;
- }
- }
-
- if ( ! $mailer ) {
- $mailer = "---";
- }
+ # default netmail area name
+ $area ="NETMAIL" if /\//i;
- if ($#lines < 0) {
- @lines = ("[empty message]");
- }
-
- # get message body
- $message_body = ""; # ensure that it starts empty
+ # strip "area:"
+ $area =~ s/.*://;
- foreach $s (@lines) {
- $s =~ tr/\0-\037/\040-\100/;
- $s =~ s/\s+$//;
- $s=~tr/^\*/ /;
- $message_body .= "$s\n";
- }
+ # Force upper case ???
+ $area =~ tr/a-z/A-Z/;
- $message_body .= "$mailer\n" if ($mailer);
- $message_body .= " * Origin: $origin\n" if ($origin);
+ @kludges = ();
- # get control info
- my $control_info = ""; # ensure that it starts empty
- $control_info .= "$seen_by\n" if ($seen_by);
- foreach $s (@kludges) {
- $s =~ s/^\001//;
-
- # If kludge starts with "MSGID:", stick that in a special
- # variable.
- if ( substr($s, 0, 6) eq "MSGID:" ) {
- $message_id = substr($s, 7);
- }
-
- $control_info .= "$s\n";
- }
+ for ($i = $k = 0; $i <= $#lines; $i++) {
- if ( ! $message_id) {
- $message_id = "message id not available";
- }
+ if ($lines[$i] =~ /^\001/) {
+ $kludges[$k++] = splice(@lines,$i,1);
+ redo;
+ }
+ }
- # get replyid from kludges? same way as get seenby?
- $reply_id = "reply id not available";
-
- $from_node = "1:$origin_net/$origin_node\n"; # need to pull zone num's from
- $to_node = "1:$destination_net/$destination_node\n"; # pkt instead of defaulting 1
-
- my %message_info = (
+ for (;;) {
+ $_ = pop(@lines);
+ last if ($_ eq "");
+ if (/ \* origin: /i) {
+ $origin = substr($_,11);
+ last;
+ }
+ if (/---/) {
+ $mailer = $_;
+ }
+ if (/seen-by/i) {
+ $seen_by=$_;
+ }
+ }
- area => $area,
-
- ftscdate => $date_time,
+ if ( ! $mailer ) {
+ $mailer = "---";
+ }
- #cost => $cost, # not useing this yet...
+ if ($#lines < 0) {
+ @lines = ("[empty message]");
+ }
- fromnode => $from_node,
- tonode => $to_node,
+ # get message body
+ $message_body = ""; # ensure that it starts empty
- from => $from,
- to => $to,
- subj => $subject,
+ foreach my $s (@lines) {
+ $s =~ tr/\0-\037/\040-\100/;
+ $s =~ s/\s+$//;
+ $s=~tr/^\*/ /;
+ $message_body .= "$s\n";
+ }
- msgid => $message_id,
- replyid => $reply_id,
+ $message_body .= "$mailer\n" if ($mailer);
+ $message_body .= " * Origin: $origin\n" if ($origin);
- body => $message_body,
+ # get control info
+ my $control_info = ""; # ensure that it starts empty
+ $control_info .= "$seen_by\n" if ($seen_by);
+ foreach my $c (@kludges) {
+ $c =~ s/^\001//;
- ctrlinfo => $control_info
+ # If kludge starts with "MSGID:", stick that in a special
+ # variable.
+ if ( substr($c, 0, 6) eq "MSGID:" ) {
+ $message_id = substr($c, 7);
+ }
- );
-
- push(@messages, \%message_info);
-
+ $control_info .= "$s\n";
+ }
+ if ( ! $message_id) {
+ $message_id = "message id not available";
+ }
+
+ # get replyid from kludges? same way as get seenby?
+ $reply_id = "reply id not available";
+
+ # need to pull zone num's from pkt instead of defaulting 1
+ $from_node = "1:$origin_net/$origin_node\n";
+ $to_node = "1:$destination_net/$destination_node\n";
+
+ my %message_info = (
+
+ area => $area,
+
+ ftscdate => $date_time,
+
+ ## not useing this yet...
+ #cost => $cost,
+
+ fromnode => $from_node,
+ tonode => $to_node,
+
+ from => $from,
+ to => $to,
+ subj => $subject,
+
+ msgid => $message_id,
+ replyid => $reply_id,
+
+ body => $message_body,
+
+ ctrlinfo => $control_info
+
+ );
+
+ push(@messages, \%message_info);
+
} # end while
-
+
return \@messages;
-
+
} # end sub read_ftn_packet
@@ -247,53 +261,53 @@
my ($packet_file, @lines, $serialno, $buffer, $i, $k, $message_ref);
my $EOL = "\n\r";
-
+
# This part is a definition of an FTN Packet format per FTS-0001
# PKT Header; initialized variable are constants; last comments are
# in pack() notation
- # ${$packet_info}{OrgNode} # S
- # ${$packet_info}{DestNode} # S
- my ($year, $month, $day, $hour, $minutes, $seconds); # SSSSSS
- my $Baud = 0; # S
- my $packet_version = 2; # S Type 2 packet
- # ${$packet_info}{OrgNet} # S
- # ${$packet_info}{DestNet} # S
- my $ProdCode = 0x100; # S product code: ?
- # ${$packet_info}{PassWord} # a8
- # ${$packet_info}{OrgZone} # S
- # ${$packet_info}{DestZone} # S
- my $AuxNet = ${$packet_info}{OrgNet}; # S
- my $CapWord = 0x100; # S capability word: Type 2+
- my $ProdCode2 = 0; # S ?
- my $CapWord2 = 1; # S byte swapped cap. word
- # ${$packet_info}{OrgZone} # S (repeat)
- # ${$packet_info}{DestZone} # S (repeat)
- # ${$packet_info}{OrgPoint} # S
+ # ${$packet_info}{OrgNode} # S
+ # ${$packet_info}{DestNode} # S
+ my ($year, $month, $day, $hour, $minutes, $seconds); # SSSSSS
+ my $Baud = 0; # S
+ my $packet_version = 2; # S Type 2 packet
+ # ${$packet_info}{OrgNet} # S
+ # ${$packet_info}{DestNet} # S
+ my $ProdCode = 0x100; # S product code: ?
+ # ${$packet_info}{PassWord} # a8
+ # ${$packet_info}{OrgZone} # S
+ # ${$packet_info}{DestZone} # S
+ my $AuxNet = ${$packet_info}{OrgNet}; # S
+ my $CapWord = 0x100; # S capability word: Type 2+
+ my $ProdCode2 = 0; # S ?
+ my $CapWord2 = 1; # S byte swapped cap. word
+ # ${$packet_info}{OrgZone} # S (repeat)
+ # ${$packet_info}{DestZone} # S (repeat)
+ # ${$packet_info}{OrgPoint} # S
# config file for node info?
- # ${$packet_info}{DestPoint} # S
- my $ProdSpec = 0; # L ?
+ # ${$packet_info}{DestPoint} # S
+ my $ProdSpec = 0; # L ?
# MSG Header; duplicated variables are shown as comments to indicate
# the MSG Header structure
- # $packet_version # S (repeat)
- # ${$packet_info}{OrgNode} # S (repeat)
- # ${$packet_info}{DestNode} # S (repeat)
- # ${$packet_info}{OrgNet} # S (repeat)
- # ${$packet_info}{DestNet} # S (repeat)
- my $attribute = 0; # S
- my $Cost = 0; # S
- # ${$message_ref}{DateTime} # a20 (this is a local())
- # ${$message_ref}{To} # a? (36 max)
- # ${$message_ref}{From} # a? (36 max)
- # ${$message_ref}{Subj} # a? (72 max)
+ # $packet_version # S (repeat)
+ # ${$packet_info}{OrgNode} # S (repeat)
+ # ${$packet_info}{DestNode} # S (repeat)
+ # ${$packet_info}{OrgNet} # S (repeat)
+ # ${$packet_info}{DestNet} # S (repeat)
+ my $attribute = 0; # S
+ my $Cost = 0; # S
+ # ${$message_ref}{DateTime} # a20 (this is a local())
+ # ${$message_ref}{To} # a? (36 max)
+ # ${$message_ref}{From} # a? (36 max)
+ # ${$message_ref}{Subj} # a? (72 max)
- #"AREA: " # c6 }
- # ${$packet_info}{Area} # a? (max?) } all this is actually part
- #possible kludges go here. 0x01<TAG>0x0D } of the TEXT postions
- #TEXT goes here. (ends with 2 0x0D's ???) }
+ #"AREA: " # c6 }
+ # ${$packet_info}{Area} # a? (max?) } all this is actually part
+ #possible kludges go here. 0x01<TAG>0x0D } of the TEXT postions
+ #TEXT goes here. (ends with 2 0x0D's ???) }
# ${$packet_info}{TearLine}
my $Origin = " * Origin: ${$packet_info}{Origin} (${$packet_info}{OrgZone}:${$packet_info}{OrgNet}/${$packet_info}{OrgNode}.1)$EOL";
@@ -308,14 +322,14 @@
# PKT name as per FTS
($seconds, $minutes, $hour, $day, $month, $year) = localtime();
- $year += 2000;
+ $year += 1900;
# does the above actually give a two digit year?
# the original above was 1900 instead of 2000
$packet_file = sprintf("%s/%02d%02d%02d%02d.pkt",$OutDir,$day,$hour,$minutes,$seconds);
- open($PKT,">$packet_file") || die;
+ open( $PKT, q{>}, "$packet_file" ) || die;
- binmode{$PKT);
+ binmode($PKT);
# write packet header
$buffer = pack("SSSSSSSSSSSSSa8SSSSSSSSSSL",
@@ -331,55 +345,59 @@
syswrite($PKT,$buffer,58);
# needs to iterate over the array of hashes representing the messages
- foreach $message_ref ( @{$messages} ) {
+ foreach my $message_ref ( @{$messages} ) {
#while ( @{$messages} > 0) {
#while ( @{$messages} ) {
- #$message_ref = pop(@{$messages}); # get next message hash reference
-
- # get text body, translate LFs to CRs
-
- @lines = ${$message_ref}{Body};
- grep(s/\n/\r/,@lines);
-
- # kill leading blank lines
-
- shift(@lines) while ($lines[0] eq "\n");
-
- ++$nmsgs; # informative only
-
- # write message to $PKT file
-
- # Write Message Header
- $buffer = pack("SSSSSSSa20",
- $packet_version,${$packet_info}{OrgNode},${$packet_info}{DestNode},${$packet_info}{OrgNet},
- ${$packet_info}{DestNet},$attribute,$Cost,${$message_ref}{DateTime});
- print $PKT $buffer;
+ ## get next message hash reference
+ #$message_ref = pop(@{$messages});
- print $PKT "${$message_ref}{To}\0";
- print $PKT "${$message_ref}{From}\0";
- print $PKT "${$message_ref}{Subj}\0";
- print $PKT "AREA: ${$packet_info}{Area}$EOL"; # note: CR not nul
-
- $serialno = unpack("%16C*",join('',@lines));
- $serialno = sprintf("%lx",$serialno + time);
- print $PKT "\1MSGID: ${$packet_info}{OrgZone}:${$packet_info}{OrgNet}/${$packet_info}{OrgNode}.${$packet_info}{OrgPoint} $serialno$EOL";
-
- print $PKT @lines;
- print $PKT $EOL,${$packet_info}{TearLine},$Origin,$seen_by,$Path;
-
- @lines = (); # all done with array (frees mem?)
-
+ # get text body, translate LFs to CRs
+
+ @lines = ${$message_ref}{Body};
+ grep(s/\n/\r/,@lines);
+
+ # kill leading blank lines
+
+ shift(@lines) while ($lines[0] eq "\n");
+
+ # informative only
+ ++$nmsgs;
+
+ # write message to $PKT file
+
+ # Write Message Header
+ $buffer = pack("SSSSSSSa20",
+ $packet_version,${$packet_info}{OrgNode},${$packet_info}{DestNode},${$packet_info}{OrgNet},
+ ${$packet_info}{DestNet},$attribute,$Cost,${$message_ref}{DateTime});
+ print $PKT $buffer;
+
+ print $PKT "${$message_ref}{To}\0";
+ print $PKT "${$message_ref}{From}\0";
+ print $PKT "${$message_ref}{Subj}\0";
+ print $PKT "AREA: ${$packet_info}{Area}$EOL"; # note: CR not nul
+
+ $serialno = unpack("%16C*",join('',@lines));
+ $serialno = sprintf("%lx",$serialno + time);
+ print $PKT "\1MSGID: ${$packet_info}{OrgZone}:${$packet_info}{OrgNet}/${$packet_info}{OrgNode}.${$packet_info}{OrgPoint} $serialno$EOL";
+
+ print $PKT @lines;
+ print $PKT $EOL,${$packet_info}{TearLine},$Origin,$seen_by,$Path;
+
+ # all done with array (frees mem?)
+ @lines = ();
+
}
-
- print $PKT "\0\0"; # indicates no more messages
+ # indicates no more messages
+ print $PKT "\0\0";
+
close($PKT);
return 0;
}
-__END__
+__END__
=head1 EXAMPLES
@@ -420,4 +438,3 @@
=cut
1;
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-15 17:13:23
|
Revision: 617
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=617&view=rev
Author: jame
Date: 2011-07-15 17:13:12 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
FTN::Packet v0.09
Merge branch 'develop'
* develop:
Changes for version v0.09
Moved updated TODO file to doc source directory.
Add .gitignore file to source directory.
Moved updated TODO file to doc source directory.
Change how Author copyright years is listed.
Change Author email being used to ja...@ro...
Change to using the TEST modules for testing.
Updated the Makefile.pl file by adding items.
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/MANIFEST
trunk/modules/FTN/Packet/Makefile.PL
trunk/modules/FTN/Packet/README
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
Added Paths:
-----------
trunk/modules/FTN/Packet/.gitignore
trunk/modules/FTN/Packet/doc/
trunk/modules/FTN/Packet/doc/TODO
trunk/modules/FTN/Packet/t/00-load.t
trunk/modules/FTN/Packet/t/boilerplate.t
trunk/modules/FTN/Packet/t/pod-coverage.t
trunk/modules/FTN/Packet/t/pod.t
Removed Paths:
-------------
trunk/modules/FTN/Packet/TODO
trunk/modules/FTN/Packet/t/test.pl
Added: trunk/modules/FTN/Packet/.gitignore
===================================================================
--- trunk/modules/FTN/Packet/.gitignore (rev 0)
+++ trunk/modules/FTN/Packet/.gitignore 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,11 @@
+blib*
+Makefile
+Makefile.old
+Build
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+FTN-Packet-*
+cover_db
+
\ No newline at end of file
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:12 UTC (rev 617)
@@ -1,5 +1,13 @@
Revision history for Perl extension FTN::Packet
+0.09 Sun Sep 05 2010
+ - Change to using the TEST modules for testing.
+ - Change how Author copyright years is listed.
+ - Moved updated TODO file to doc source directory.
+ - Change the Author email being used to ja...@ro....
+ - Updated Makefile.pl; adding items for AUTHOR, ABSTRACT_FROM, LICENSE,
+ dist, & clean.
+
0.08 Sun Dec 21 2008
- Do some clean up of usage and naming of variables, as well as to the
documentation.
Modified: trunk/modules/FTN/Packet/MANIFEST
===================================================================
--- trunk/modules/FTN/Packet/MANIFEST 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/MANIFEST 2011-07-15 17:13:12 UTC (rev 617)
@@ -4,4 +4,6 @@
lib/FTN/Packet.pm
README
TODO
-t/test.pl
+t/00-load.t
+t/pod-coverage.t
+t/pod.t
Modified: trunk/modules/FTN/Packet/Makefile.PL
===================================================================
--- trunk/modules/FTN/Packet/Makefile.PL 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/Makefile.PL 2011-07-15 17:13:12 UTC (rev 617)
@@ -2,6 +2,16 @@
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
- 'NAME' => 'FTN::Packet',
- 'VERSION_FROM' => 'lib/FTN/Packet.pm', # finds $VERSION
+ NAME => 'FTN::Packet',
+ AUTHOR => 'Robert James Clay <ja...@ro...>',
+ VERSION_FROM => 'lib/FTN/Packet.pm',
+ ABSTRACT_FROM => 'lib/FTN/Packet.pm',
+ LICENSE => 'perl',
+ PREREQ_PM => {
+ 'Test::More' => 0,
+ 'Test::Pod' => 1.22,
+ 'Test::Pod::Coverage' => 1.08
+ },
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'FTN-Packet-*' },
);
Modified: trunk/modules/FTN/Packet/README
===================================================================
--- trunk/modules/FTN/Packet/README 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/README 2011-07-15 17:13:12 UTC (rev 617)
@@ -1,6 +1,6 @@
FTN::Packet
-Copyright (c) 2001-2004,2006,2008 Robert James Clay. All Rights Reserved.
+Copyright (c) 2001-2010 Robert James Clay. All Rights Reserved.
This is free software; you can redistribute it and/or
mnodify it under the same terms as Perl itself.
@@ -26,5 +26,5 @@
R.J. Clay ("Jame")
- Robert J. Clay, ja...@us...
+ Robert J. Clay, ja...@ro...
Sysop, 1:120/544, 1:120/545
Deleted: trunk/modules/FTN/Packet/TODO
===================================================================
--- trunk/modules/FTN/Packet/TODO 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/TODO 2011-07-15 17:13:12 UTC (rev 617)
@@ -1,14 +0,0 @@
-To do: FTN:Packet
-
- write_ftn_packet()
-- When doing, for instance, two messages: the two messages are making it into
-the packets but they're both the text of the second message.
-- Also the serial number for the MSGID is coming up as the same for both. When
-code a better way of getting a 8 char serial number to use, add it as a function
-to the module?
-
- read_ftn_packet()
-- Change the name of the appropriate fields in the packet related hashes to being
-named after how they are named in the fts-0001 documentation.
-
-
\ No newline at end of file
Added: trunk/modules/FTN/Packet/doc/TODO
===================================================================
--- trunk/modules/FTN/Packet/doc/TODO (rev 0)
+++ trunk/modules/FTN/Packet/doc/TODO 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,33 @@
+To do: FTN:Packet
+
+- Reorganize the functions, so that instead of a read and a write packet
+function; there are functions to open and close the packet file being read or
+written, reading or writing the packet header are separate functions, and then
+reading or writing the messsages to or from a packet file are also separate
+functions?
+- Also add other functions as neccessary: one for generating a serial number,
+one for generating a name for a standard packet file, one for generating an
+ftsc standard date.
+- Add reference to ftsc documentation and/or to the ftsc web site.
+
+ write_ftn_packet()
+- When doing, for instance, two messages: two messages are making it into
+the packets but they're both the text of the second message.
+- Also the serial number for the MSGID is coming up as the same for both.
+When code a better way of getting a 8 char serial number to use, add it as a
+function to the module?
+- The write up and variable usages for the packet format per FTS-0001 could
+be rewritten to more closely match the current documentation, esp. the listed
+order.
+- Change the name of the appropriate fields in the packet related hashes to
+being named after how they are named in the FTS-0001 documentation.
+
+ read_ftn_packet()
+- Change the name of the appropriate fields in the packet related hashes to
+being named after how they are named in the fts-0001 documentation.
+- The zone number information is not being pulled what is available in the
+packet; needed to set the from_node & to_node variables instead of assuming
+zone 1. It is in the packet header (being skipped in the current code) instead
+of in the message header. Or could use the zone number from the message id if
+available.
+
\ No newline at end of file
Modified: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:12 UTC (rev 617)
@@ -9,11 +9,11 @@
=head1 VERSION
-VERSION 0.08
+VERSION 0.09
=cut
-$VERSION = '0.08';
+$VERSION = '0.09';
=head1 DESCRIPTION
@@ -388,13 +388,13 @@
=head1 AUTHORS
-Robert James Clay, ja...@us...
+Robert James Clay, ja...@ro...
=head1 ACKNOWLEDGEMENTS
Code for the read_ftn_packet function was initially derived from the newmsgs subroutine
in the set of scripts for reading FTN packets (pkt2txt.pl, pkt2xml.pl, etc) by
-Russ Johnson L<ai...@us...> and Robert James Clay L<ja...@us...>
+Russ Johnson L<ai...@us...> and Robert James Clay L<ja...@ro...>
available at the L<http://ftnpl.sourceforge.net>] project site. Initial code for
the write_ftn_packet function was derived from the bbs2pkt.pl of v0.1 of the bbsdbpl
scripts, also at the SourceForge project.
@@ -411,7 +411,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2001-2004,2006,2008 Robert James Clay, all rights reserved.
+Copyright 2001-2010 Robert James Clay, all rights reserved.
Copyright 2001-2003 Russ Johnson, all rights reserved.
This program is free software; you can redistribute it and/or modify it
Added: trunk/modules/FTN/Packet/t/00-load.t
===================================================================
--- trunk/modules/FTN/Packet/t/00-load.t (rev 0)
+++ trunk/modules/FTN/Packet/t/00-load.t 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,9 @@
+#!perl -T
+
+use Test::More tests => 2;
+
+BEGIN {
+ use_ok( 'FTN::Packet' );
+}
+
+diag( "Testing FTN::Packet $FTN::Packet::VERSION, Perl $], $^X" );
Added: trunk/modules/FTN/Packet/t/boilerplate.t
===================================================================
--- trunk/modules/FTN/Packet/t/boilerplate.t (rev 0)
+++ trunk/modules/FTN/Packet/t/boilerplate.t 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,54 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More tests => 4;
+
+sub not_in_file_ok {
+ my ($filename, %regex) = @_;
+ open( my $fh, '<', $filename )
+ or die "couldn't open $filename for reading: $!";
+
+ my %violated;
+
+ while (my $line = <$fh>) {
+ while (my ($desc, $regex) = each %regex) {
+ if ($line =~ $regex) {
+ push @{$violated{$desc}||=[]}, $.;
+ }
+ }
+ }
+
+ if (%violated) {
+ fail("$filename contains boilerplate text");
+ diag "$_ appears on lines @{$violated{$_}}" for keys %violated;
+ } else {
+ pass("$filename contains no boilerplate text");
+ }
+}
+
+sub module_boilerplate_ok {
+ my ($module) = @_;
+ not_in_file_ok($module =>
+ 'the great new $MODULENAME' => qr/ - The great new /,
+ 'boilerplate description' => qr/Quick summary of what the module/,
+ 'stub function definition' => qr/function[12]/,
+ );
+}
+
+TODO: {
+ local $TODO = "Need to replace the boilerplate text";
+
+ not_in_file_ok(README =>
+ "The README is used..." => qr/The README is used/,
+ "'version information here'" => qr/to provide version information/,
+ );
+
+ not_in_file_ok(Changes =>
+ "placeholder date/time" => qr(Date/time)
+ );
+
+ module_boilerplate_ok('lib/FTN/Packet.pm');
+
+}
+
Added: trunk/modules/FTN/Packet/t/pod-coverage.t
===================================================================
--- trunk/modules/FTN/Packet/t/pod-coverage.t (rev 0)
+++ trunk/modules/FTN/Packet/t/pod-coverage.t 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod::Coverage
+my $min_tpc = 1.08;
+eval "use Test::Pod::Coverage $min_tpc";
+plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
+ if $@;
+
+# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
+# but older versions don't recognize some common documentation styles
+my $min_pc = 0.18;
+eval "use Pod::Coverage $min_pc";
+plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
+ if $@;
+
+all_pod_coverage_ok();
Added: trunk/modules/FTN/Packet/t/pod.t
===================================================================
--- trunk/modules/FTN/Packet/t/pod.t (rev 0)
+++ trunk/modules/FTN/Packet/t/pod.t 2011-07-15 17:13:12 UTC (rev 617)
@@ -0,0 +1,12 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod
+my $min_tp = 1.22;
+eval "use Test::Pod $min_tp";
+plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
+
+all_pod_files_ok();
Deleted: trunk/modules/FTN/Packet/t/test.pl
===================================================================
--- trunk/modules/FTN/Packet/t/test.pl 2011-07-15 17:13:00 UTC (rev 616)
+++ trunk/modules/FTN/Packet/t/test.pl 2011-07-15 17:13:12 UTC (rev 617)
@@ -1,20 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl test.pl'
-
-######################### We start with some black magic to print on failure.
-
-# Change 1..1 below to 1..last_test_to_print .
-# (It may become useful if the test is moved to ./t subdirectory.)
-
-BEGIN { $| = 1; print "1..1\n"; }
-END {print "not ok 1\n" unless $loaded;}
-use Packet;
-$loaded = 1;
-print "ok 1\n";
-
-######################### End of black magic.
-
-# Insert your test code below (better if it prints "ok 13"
-# (correspondingly "not ok 13") depending on the success of chunk 13
-# of the test code):
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-15 17:13:10
|
Revision: 616
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=616&view=rev
Author: jame
Date: 2011-07-15 17:13:00 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Do some cleanup of variables and documentation.
Do some cleanup of usage and naming of variables, as well as
to the documentation.
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/README
trunk/modules/FTN/Packet/TODO
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-15 17:12:51 UTC (rev 615)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:13:00 UTC (rev 616)
@@ -1,5 +1,9 @@
Revision history for Perl extension FTN::Packet
+0.08 Sun Dec 21 2008
+ - Do some clean up of usage and naming of variables, as well as to the
+ documentation.
+
0.07 Sat May 13 2006
- Renamed the readpkt function as read_ftn_packet, and renamed the writepkt
function as write_ftn_packet.
Modified: trunk/modules/FTN/Packet/README
===================================================================
--- trunk/modules/FTN/Packet/README 2011-07-15 17:12:51 UTC (rev 615)
+++ trunk/modules/FTN/Packet/README 2011-07-15 17:13:00 UTC (rev 616)
@@ -1,20 +1,18 @@
FTN::Packet
-Copyright (c) 2001-2004,2006 Robert James Clay. All Rights Reserved.
+Copyright (c) 2001-2004,2006,2008 Robert James Clay. All Rights Reserved.
This is free software; you can redistribute it and/or
mnodify it under the same terms as Perl itself.
-Perl module for processing Fidonet/FTN packets.
+Perl module for reading or writing Fidonet/FTN packet files.
- This is a snapshot of what I am currently using and/or testing
-here at rocasa.org, updated daily as neccessary. The archive is
-kept at http://rocasa.org/pub/ftn/pl/ftnplpkt.zip.
+For a more object oriented approach; please see FTN::Pkt, available at
+www.cpan.org.
-
For details, see documentation.
To install:
- Uncomprss the archive, then change to that newly
+ Uncompress the archive, then change to that newly
created directory & do the following:
1) perl Makefile.pl
Modified: trunk/modules/FTN/Packet/TODO
===================================================================
--- trunk/modules/FTN/Packet/TODO 2011-07-15 17:12:51 UTC (rev 615)
+++ trunk/modules/FTN/Packet/TODO 2011-07-15 17:13:00 UTC (rev 616)
@@ -7,4 +7,8 @@
code a better way of getting a 8 char serial number to use, add it as a function
to the module?
+ read_ftn_packet()
+- Change the name of the appropriate fields in the packet related hashes to being
+named after how they are named in the fts-0001 documentation.
+
\ No newline at end of file
Modified: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:12:51 UTC (rev 615)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:13:00 UTC (rev 616)
@@ -9,11 +9,11 @@
=head1 VERSION
-VERSION 0.07
+VERSION 0.08
=cut
-$VERSION = '0.07';
+$VERSION = '0.08';
=head1 DESCRIPTION
@@ -50,17 +50,17 @@
Read a Fidonet/FTN packet. Returns the messages in the packet as a reference
to an array of hash references, which can be read as follows:
- $msg_ref = pop(@{$messages});
- $msg_area = ${$msg_ref}->('area');
- $msg_date = ${$msg_ref}->('ftnscdate');
- $msg_tonode = ${$msg_ref}->('tonode');
- $msg_from = ${$msg_ref}->('from');
- $msg_body = ${$msg_ref}->('to');
- $msg_subj = ${$msg_ref}->('subj');
- $msg_msgid = ${$msg_ref}->('msgid');
- $msg_replyid = ${$msg_ref}->('replyid');
- $msg_body = ${$msg_ref}->('body');
- $msg_ctrl = ${$msg_ref}->('ctrlinfo');
+ $message_ref = pop(@{$messages});
+ $msg_area = ${$message_ref}->('area');
+ $msg_date = ${$message_ref}->('ftnscdate');
+ $msg_tonode = ${$message_ref}->('tonode');
+ $msg_from = ${$message_ref}->('from');
+ $msg_body = ${$message_ref}->('to');
+ $msg_subj = ${$message_ref}->('subj');
+ $msg_msgid = ${$message_ref}->('msgid');
+ $msg_replyid = ${$message_ref}->('replyid');
+ $msg_body = ${$message_ref}->('body');
+ $msg_ctrl = ${$message_ref}->('ctrlinfo');
=cut
@@ -73,43 +73,43 @@
# "$PKT" is a file pointer to the packet file being read
# Returns an array of hash references
- my ($PKTver,$orgnode,$destnode,$orgnet,$destnet,$attrib,$cost,$buf);
- my ($osep, $s, $datetime, $to, $from, $subj, $area, @lines, @kludges,
- $fromnode, $tonode, @messages, $msgbody, $msgid, $replyid, $origin,
- $mailer, $seenby, $i, $k);
+ my ($packet_version,$origin_node,$destination_node,$origin_net,$destination_net,$attribute,$cost,$buffer);
+ my ($separator, $s, $date_time, $to, $from, $subject, $area, @lines, @kludges,
+ $from_node, $to_node, @messages, $message_body, $message_id, $reply_id, $origin,
+ $mailer, $seen_by, $i, $k);
- read($PKT,$buf,58); # Ignore packet header
+ read($PKT,$buffer,58); # Ignore packet header
while (!eof($PKT)) {
- last if (read(PKT, $buf, 14) != 14);
+ last if (read($PKT, $buffer, 14) != 14);
- ($PKTver, $orgnode, $destnode, $orgnet, $destnet, $attrib, $cost) = unpack("SSSSSSS",$buf);
+ ($packet_version, $origin_node, $destination_node, $origin_net, $destination_net, $attribute, $cost) = unpack("SSSSSSS",$buffer);
- undef $PKTver; # not used for anything yet - 8/26/01 rjc
- undef $attrib; # not used for anything yet - 8/26/01 rjc
- undef $cost; # not used for anything yet - 12/15/01 rjc
+ undef $packet_version; # not used for anything yet - 8/26/01 rjc
+ undef $attribute; # not used for anything yet - 8/26/01 rjc
+ undef $cost; # not used for anything yet - 12/15/01 rjc
- $osep = $/;
+ $separator = $/;
$/ = "\0";
- $datetime = <PKT>;
- if (length($datetime) > 20) {
- $to = substr($datetime,20);
+ $date_time = <$PKT>;
+ if (length($date_time) > 20) {
+ $to = substr($date_time,20);
} else {
- $to = <PKT>;
+ $to = <$PKT>;
}
- $from = <PKT>;
- $subj = <PKT>;
+ $from = <$PKT>;
+ $subject = <$PKT>;
$to =~ tr/\200-\377/\0-\177/; # mask hi-bit characters
$to =~ tr/\0-\037/\040-\100/; # mask control characters
$from =~ tr/\200-\377/\0-\177/; # mask hi-bit characters
$from =~ tr/\0-\037/\040-\100/; # mask control characters
- $subj =~ tr/\0-\037/\040-\100/; # mask control characters
+ $subject =~ tr/\0-\037/\040-\100/; # mask control characters
- $s = <PKT>;
- $/ = $osep;
+ $s = <$PKT>;
+ $/ = $separator;
$s =~ s/\x8d/\r/g;
@lines = split(/\r/,$s);
@@ -145,7 +145,7 @@
$mailer = $_;
}
if (/seen-by/i) {
- $seenby=$_;
+ $seen_by=$_;
}
}
@@ -158,191 +158,188 @@
}
# get message body
- $msgbody = ""; # ensure that it starts empty
+ $message_body = ""; # ensure that it starts empty
foreach $s (@lines) {
$s =~ tr/\0-\037/\040-\100/;
$s =~ s/\s+$//;
$s=~tr/^\*/ /;
- $msgbody .= "$s\n";
+ $message_body .= "$s\n";
}
- $msgbody .= "$mailer\n" if ($mailer);
- $msgbody .= " * Origin: $origin\n" if ($origin);
+ $message_body .= "$mailer\n" if ($mailer);
+ $message_body .= " * Origin: $origin\n" if ($origin);
# get control info
- my $ctrlinfo = ""; # ensure that it starts empty
- $ctrlinfo .= "$seenby\n" if ($seenby);
+ my $control_info = ""; # ensure that it starts empty
+ $control_info .= "$seen_by\n" if ($seen_by);
foreach $s (@kludges) {
$s =~ s/^\001//;
# If kludge starts with "MSGID:", stick that in a special
# variable.
if ( substr($s, 0, 6) eq "MSGID:" ) {
- $msgid = substr($s, 7);
+ $message_id = substr($s, 7);
}
- $ctrlinfo .= "$s\n";
+ $control_info .= "$s\n";
}
- if ( ! $msgid) {
- $msged = "msged id not available";
+ if ( ! $message_id) {
+ $message_id = "message id not available";
}
# get replyid from kludges? same way as get seenby?
- $replyid = "reply id not available";
+ $reply_id = "reply id not available";
- $fromnode = "1:$orgnet/$orgnode\n"; # need to pull zone num's from
- $tonode = "1:$destnet/$destnode\n"; # pkt instead of defaulting 1
+ $from_node = "1:$origin_net/$origin_node\n"; # need to pull zone num's from
+ $to_node = "1:$destination_net/$destination_node\n"; # pkt instead of defaulting 1
- my %msg_info = (
+ my %message_info = (
area => $area,
- ftscdate => $datetime,
+ ftscdate => $date_time,
- # removed this: $tz\n"; # not useing this yet
+ #cost => $cost, # not useing this yet...
- #undef $cost; # not useing this yet...
- fromnode => $fromnode,
- tonode => $tonode,
+ fromnode => $from_node,
+ tonode => $to_node,
from => $from,
to => $to,
- subj => $subj,
+ subj => $subject,
- msgid => $msgid,
- replyid => $replyid,
+ msgid => $message_id,
+ replyid => $reply_id,
- body => $msgbody,
+ body => $message_body,
- ctrlinfo => $ctrlinfo
+ ctrlinfo => $control_info
);
- push(@messages, \%msg_info);
+ push(@messages, \%message_info);
} # end while
- return (\@messages);
+ return \@messages;
} # end sub read_ftn_packet
=head2 write_ftn_packet
-Syntax: write_ftn_packet($OutDir, \%PktInfo, \@messages);
+Syntax: write_ftn_packet($OutDir, \%packet_info, \@messages);
Create a Fidonet/FTN packet, where:
$OutDir is the directory where the packet is to be created
- \%PktInfo is a reference to a hash containing the packet header
+ \%packet_info is a reference to a hash containing the packet header
\@messages is reference to an array of references to hashes containing the messages.
=cut
sub write_ftn_packet {
- my ($OutDir,$PktInfo, $messages) = @_;
+ my ($OutDir, $packet_info, $messages) = @_;
- my ($PktFile, @lines, $serialno, $buf, $i, $k, $msg_ref);
+ my ($packet_file, @lines, $serialno, $buffer, $i, $k, $message_ref);
my $EOL = "\n\r";
- # This part is a definition of the PKT format per FTS-0001
+ # This part is a definition of an FTN Packet format per FTS-0001
# PKT Header; initialized variable are constants; last comments are
# in pack() notation
- # ${$PktInfo}{OrgNode} # S
- # ${$PktInfo}{DestNode} # S
- my ($Year, $Mon, $Day, $Hour, $Min, $Sec); # SSSSSS
- my $Baud = 0; # S
- my $PktVer = 2; # S Type 2 packet
- # ${$PktInfo}{OrgNet} # S
- # ${$PktInfo}{DestNet} # S
- my $ProdCode = 0x100; # S product code: ?
- # ${$PktInfo}{PassWord} # a8
- # ${$PktInfo}{OrgZone} # S
- # ${$PktInfo}{DestZone} # S
- my $AuxNet = ${$PktInfo}{OrgNet}; # S
- my $CapWord = 0x100; # S capability word: Type 2+
- my $ProdCode2 = 0; # S ?
- my $CapWord2 = 1; # S byte swapped cap. word
- # ${$PktInfo}{OrgZone} # S (repeat)
- # ${$PktInfo}{DestZone} # S (repeat)
- # ${$PktInfo}{OrgPoint} # S
+ # ${$packet_info}{OrgNode} # S
+ # ${$packet_info}{DestNode} # S
+ my ($year, $month, $day, $hour, $minutes, $seconds); # SSSSSS
+ my $Baud = 0; # S
+ my $packet_version = 2; # S Type 2 packet
+ # ${$packet_info}{OrgNet} # S
+ # ${$packet_info}{DestNet} # S
+ my $ProdCode = 0x100; # S product code: ?
+ # ${$packet_info}{PassWord} # a8
+ # ${$packet_info}{OrgZone} # S
+ # ${$packet_info}{DestZone} # S
+ my $AuxNet = ${$packet_info}{OrgNet}; # S
+ my $CapWord = 0x100; # S capability word: Type 2+
+ my $ProdCode2 = 0; # S ?
+ my $CapWord2 = 1; # S byte swapped cap. word
+ # ${$packet_info}{OrgZone} # S (repeat)
+ # ${$packet_info}{DestZone} # S (repeat)
+ # ${$packet_info}{OrgPoint} # S
# config file for node info?
- # ${$PktInfo}{DestPoint} # S
- my $ProdSpec = 0; # L ?
+ # ${$packet_info}{DestPoint} # S
+ my $ProdSpec = 0; # L ?
# MSG Header; duplicated variables are shown as comments to indicate
# the MSG Header structure
- # $PktVer # S (repeat)
- # ${$PktInfo}{OrgNode} # S (repeat)
- # ${$PktInfo}{DestNode} # S (repeat)
- # ${$PktInfo}{OrgNet} # S (repeat)
- # ${$PktInfo}{DestNet} # S (repeat)
- my $Attrib = 0; # S
- my $Cost = 0; # S
- # ${$msg_ref}{DateTime} # a20 (this is a local())
- # ${$msg_ref}{To} # a? (36 max)
- # ${$msg_ref}{From} # a? (36 max)
- # ${$msg_ref}{Subj} # a? (72 max)
+ # $packet_version # S (repeat)
+ # ${$packet_info}{OrgNode} # S (repeat)
+ # ${$packet_info}{DestNode} # S (repeat)
+ # ${$packet_info}{OrgNet} # S (repeat)
+ # ${$packet_info}{DestNet} # S (repeat)
+ my $attribute = 0; # S
+ my $Cost = 0; # S
+ # ${$message_ref}{DateTime} # a20 (this is a local())
+ # ${$message_ref}{To} # a? (36 max)
+ # ${$message_ref}{From} # a? (36 max)
+ # ${$message_ref}{Subj} # a? (72 max)
- #"AREA: " # c6 }
- # ${$PktInfo}{Area} # a? (max?) } all this is actually part
- #possible kludges go here. 0x01<TAG>0x0D } of the TEXT postions
- #TEXT goes here. (ends with 2 0x0D's ???) }
+ #"AREA: " # c6 }
+ # ${$packet_info}{Area} # a? (max?) } all this is actually part
+ #possible kludges go here. 0x01<TAG>0x0D } of the TEXT postions
+ #TEXT goes here. (ends with 2 0x0D's ???) }
- # ${$PktInfo}{TearLine}
- my $Origin = " * Origin: ${$PktInfo}{Origin} (${$PktInfo}{OrgZone}:${$PktInfo}{OrgNet}/${$PktInfo}{OrgNode}.1)$EOL";
- my $SeenBy = "SEEN-BY: ${$PktInfo}{OrgNet}/${$PktInfo}{OrgNode}$EOL";
- my $Path = "\1PATH: ${$PktInfo}{OrgNet}/${$PktInfo}{OrgNode}$EOL\0"; # note the \0 in $Path
+ # ${$packet_info}{TearLine}
+ my $Origin = " * Origin: ${$packet_info}{Origin} (${$packet_info}{OrgZone}:${$packet_info}{OrgNet}/${$packet_info}{OrgNode}.1)$EOL";
+ my $seen_by = "SEEN-BY: ${$packet_info}{OrgNet}/${$packet_info}{OrgNode}$EOL";
+ my $Path = "\1PATH: ${$packet_info}{OrgNet}/${$packet_info}{OrgNode}$EOL\0"; # note the \0 in $Path
# repeat MSG Headers/TEXT
# null (S) to mark done
- my $nmsgs = 0;
-
# this is where a loop would go if more than one feed
# PKT name as per FTS
- ($Sec, $Min, $Hour, $Day, $Mon, $Year) = localtime();
- $Year += 2000;
+ ($seconds, $minutes, $hour, $day, $month, $year) = localtime();
+ $year += 2000;
# does the above actually give a two digit year?
- # the original above was 1900 instead of 1900
- $PktFile = sprintf("%s/%02d%02d%02d%02d.PKT",$OutDir,$Day,$Hour,$Min,$Sec);
+ # the original above was 1900 instead of 2000
+ $packet_file = sprintf("%s/%02d%02d%02d%02d.pkt",$OutDir,$day,$hour,$minutes,$seconds);
- open(PKT,">$PktFile") || die;
+ open($PKT,">$packet_file") || die;
- binmode(PKT);
+ binmode{$PKT);
# write packet header
- $buf = pack("SSSSSSSSSSSSSa8SSSSSSSSSSL",
- ${$PktInfo}{OrgNode}, ${$PktInfo}{DestNode},
- $Year, $Mon, $Day, $Hour, $Min, $Sec,
- $Baud, $PktVer,
- ${$PktInfo}{OrgNet}, ${$PktInfo}{DestNet},
- $ProdCode, ${$PktInfo}{PassWord},
- ${$PktInfo}{OrgZone}, ${$PktInfo}{DestZone}, $AuxNet,
+ $buffer = pack("SSSSSSSSSSSSSa8SSSSSSSSSSL",
+ ${$packet_info}{OrgNode}, ${$packet_info}{DestNode},
+ $year, $month, $day, $hour, $minutes, $seconds,
+ $Baud, $packet_version,
+ ${$packet_info}{OrgNet}, ${$packet_info}{DestNet},
+ $ProdCode, ${$packet_info}{PassWord},
+ ${$packet_info}{OrgZone}, ${$packet_info}{DestZone}, $AuxNet,
$CapWord, $ProdCode2, $CapWord2,
- ${$PktInfo}{OrgZone}, ${$PktInfo}{DestZone},
- ${$PktInfo}{OrgPoint}, ${$PktInfo}{DestPoint}, $ProdSpec);
- syswrite(PKT,$buf,58);
+ ${$packet_info}{OrgZone}, ${$packet_info}{DestZone},
+ ${$packet_info}{OrgPoint}, ${$packet_info}{DestPoint}, $ProdSpec);
+ syswrite($PKT,$buffer,58);
# needs to iterate over the array of hashes representing the messages
- foreach $msg_ref ( @{$messages} ) {
+ foreach $message_ref ( @{$messages} ) {
#while ( @{$messages} > 0) {
#while ( @{$messages} ) {
- #$msg_ref = pop(@{$messages}); # get next message hash reference
+ #$message_ref = pop(@{$messages}); # get next message hash reference
# get text body, translate LFs to CRs
- @lines = ${$msg_ref}{Body};
+ @lines = ${$message_ref}{Body};
grep(s/\n/\r/,@lines);
# kill leading blank lines
@@ -351,33 +348,33 @@
++$nmsgs; # informative only
- # write message to PKT file
+ # write message to $PKT file
# Write Message Header
- $buf = pack("SSSSSSSa20",
- $PktVer,${$PktInfo}{OrgNode},${$PktInfo}{DestNode},${$PktInfo}{OrgNet},
- ${$PktInfo}{DestNet},$Attrib,$Cost,${$msg_ref}{DateTime});
- print PKT $buf;
+ $buffer = pack("SSSSSSSa20",
+ $packet_version,${$packet_info}{OrgNode},${$packet_info}{DestNode},${$packet_info}{OrgNet},
+ ${$packet_info}{DestNet},$attribute,$Cost,${$message_ref}{DateTime});
+ print $PKT $buffer;
- print PKT "${$msg_ref}{To}\0";
- print PKT "${$msg_ref}{From}\0";
- print PKT "${$msg_ref}{Subj}\0";
- print PKT "AREA: ${$PktInfo}{Area}$EOL"; # note: CR not nul
+ print $PKT "${$message_ref}{To}\0";
+ print $PKT "${$message_ref}{From}\0";
+ print $PKT "${$message_ref}{Subj}\0";
+ print $PKT "AREA: ${$packet_info}{Area}$EOL"; # note: CR not nul
$serialno = unpack("%16C*",join('',@lines));
$serialno = sprintf("%lx",$serialno + time);
- print PKT "\1MSGID: ${$PktInfo}{OrgZone}:${$PktInfo}{OrgNet}/${$PktInfo}{OrgNode}.${$PktInfo}{OrgPoint} $serialno$EOL";
+ print $PKT "\1MSGID: ${$packet_info}{OrgZone}:${$packet_info}{OrgNet}/${$packet_info}{OrgNode}.${$packet_info}{OrgPoint} $serialno$EOL";
- print PKT @lines;
- print PKT $EOL,${$PktInfo}{TearLine},$Origin,$SeenBy,$Path;
+ print $PKT @lines;
+ print $PKT $EOL,${$packet_info}{TearLine},$Origin,$seen_by,$Path;
@lines = (); # all done with array (frees mem?)
}
- print PKT "\0\0"; # indicates no more messages
+ print $PKT "\0\0"; # indicates no more messages
- close(PKT);
+ close($PKT);
return 0;
}
@@ -414,7 +411,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2001-2004,2006 Robert James Clay, all rights reserved.
+Copyright 2001-2004,2006,2008 Robert James Clay, all rights reserved.
Copyright 2001-2003 Russ Johnson, all rights reserved.
This program is free software; you can redistribute it and/or modify it
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-15 17:12:58
|
Revision: 615
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=615&view=rev
Author: jame
Date: 2011-07-15 17:12:51 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Renamed the functions and updated the documentation.
Renamed the readpkt as read_ftn_packet, and renamed the writepkt
function as write_ftn_packet. Corrected the pod documentation for
the read_ftn_packet function.
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/README
trunk/modules/FTN/Packet/TODO
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-15 17:12:43 UTC (rev 614)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:12:51 UTC (rev 615)
@@ -1,5 +1,10 @@
Revision history for Perl extension FTN::Packet
+0.07 Sat May 13 2006
+ - Renamed the readpkt function as read_ftn_packet, and renamed the writepkt
+ function as write_ftn_packet.
+ - Corrected the pod documentation for the read_ftn_packet function.
+
0.06 Sat Mar 27 2004
- Created the lib/FTN source directory and moved Packet.pm to it.
- Imported and created initial versions of readpkt & writepkt functions.
Modified: trunk/modules/FTN/Packet/README
===================================================================
--- trunk/modules/FTN/Packet/README 2011-07-15 17:12:43 UTC (rev 614)
+++ trunk/modules/FTN/Packet/README 2011-07-15 17:12:51 UTC (rev 615)
@@ -1,6 +1,6 @@
FTN::Packet
-Copyright (c) 2001-2004 Robert James Clay. All Rights Reserved.
+Copyright (c) 2001-2004,2006 Robert James Clay. All Rights Reserved.
This is free software; you can redistribute it and/or
mnodify it under the same terms as Perl itself.
Modified: trunk/modules/FTN/Packet/TODO
===================================================================
--- trunk/modules/FTN/Packet/TODO 2011-07-15 17:12:43 UTC (rev 614)
+++ trunk/modules/FTN/Packet/TODO 2011-07-15 17:12:51 UTC (rev 615)
@@ -1,6 +1,6 @@
To do: FTN:Packet
- writepkt()
+ write_ftn_packet()
- When doing, for instance, two messages: the two messages are making it into
the packets but they're both the text of the second message.
- Also the serial number for the MSGID is coming up as the same for both. When
Modified: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:12:43 UTC (rev 614)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:12:51 UTC (rev 615)
@@ -9,11 +9,11 @@
=head1 VERSION
-VERSION 0.06
+VERSION 0.07
=cut
-$VERSION = '0.06';
+$VERSION = '0.07';
=head1 DESCRIPTION
@@ -26,7 +26,8 @@
=head1 EXPORT
-The following functions are available in this module: readpkt(), writepkt().
+The following functions are available in this module: read_ftn_packet(),
+write_ftn_packet().
=cut
@@ -36,18 +37,19 @@
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
);
-@EXPORT_OK = qw( &readpkt(), &writepkt()
+@EXPORT_OK = qw( &read_ftn_packet(), &write_ftn_packet()
);
=head1 FUNCTIONS
-=head2 readpkt
+=head2 read_ftn_packet
-Syntax: @messages = readpkt(*PKT);
+Syntax: $messages = read_ftn_packet(*PKT);
-Read a Fidonet/FTN packet. Returns the messages in the packet as an array of
-hash references, which can be read as follows:
+Read a Fidonet/FTN packet. Returns the messages in the packet as a reference
+to an array of hash references, which can be read as follows:
+
$msg_ref = pop(@{$messages});
$msg_area = ${$msg_ref}->('area');
$msg_date = ${$msg_ref}->('ftnscdate');
@@ -65,7 +67,7 @@
###############################################
# Read Messages from FTN packet
###############################################
-sub readpkt {
+sub read_ftn_packet {
my ($PKT) = @_;
# "$PKT" is a file pointer to the packet file being read
@@ -225,12 +227,12 @@
return (\@messages);
-} # end sub readpkt
+} # end sub read_ftn_packet
-=head2 writepkt
+=head2 write_ftn_packet
-Syntax: writepkt($OutDir, \%PktInfo, \@messages);
+Syntax: write_ftn_packet($OutDir, \%PktInfo, \@messages);
Create a Fidonet/FTN packet, where:
$OutDir is the directory where the packet is to be created
@@ -239,7 +241,7 @@
=cut
-sub writepkt {
+sub write_ftn_packet {
my ($OutDir,$PktInfo, $messages) = @_;
@@ -393,11 +395,11 @@
=head1 ACKNOWLEDGEMENTS
-Code for the readpkt function was initially derived from the newmsgs subroutine
+Code for the read_ftn_packet function was initially derived from the newmsgs subroutine
in the set of scripts for reading FTN packets (pkt2txt.pl, pkt2xml.pl, etc) by
Russ Johnson L<ai...@us...> and Robert James Clay L<ja...@us...>
available at the L<http://ftnpl.sourceforge.net>] project site. Initial code for
-the writepkt function was derived from the bbs2pkt.pl of v0.1 of the bbsdbpl
+the write_ftn_packet function was derived from the bbs2pkt.pl of v0.1 of the bbsdbpl
scripts, also at the SourceForge project.
=head1 SUPPORT
@@ -412,7 +414,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2001-2004 Robert James Clay, all rights reserved.
+Copyright 2001-2004,2006 Robert James Clay, all rights reserved.
Copyright 2001-2003 Russ Johnson, all rights reserved.
This program is free software; you can redistribute it and/or modify it
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-15 17:12:55
|
Revision: 614
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=614&view=rev
Author: jame
Date: 2011-07-15 17:12:43 +0000 (Fri, 15 Jul 2011)
Log Message:
-----------
Created initial versions of the FTN::Packet functions.
Imported and created the initial versions of the readpkt and writepkt
functions; deriving the code for readpkt from the newmsgs subroutine
in the set of scripts for reading FTN packets (like pkt2tst.pl) and
the code for writepkt from the bbs2pkt.pl script of v0.1 of the
bbsdbpl scripts, both available at the ftnpl.sourceforge.net site.
Modified Paths:
--------------
trunk/modules/FTN/Packet/Changes
trunk/modules/FTN/Packet/MANIFEST
trunk/modules/FTN/Packet/Makefile.PL
trunk/modules/FTN/Packet/TODO
Added Paths:
-----------
trunk/modules/FTN/Packet/lib/
trunk/modules/FTN/Packet/lib/FTN/
trunk/modules/FTN/Packet/lib/FTN/Packet.pm
Removed Paths:
-------------
trunk/modules/FTN/Packet/Packet.pm
Modified: trunk/modules/FTN/Packet/Changes
===================================================================
--- trunk/modules/FTN/Packet/Changes 2011-07-13 20:48:53 UTC (rev 613)
+++ trunk/modules/FTN/Packet/Changes 2011-07-15 17:12:43 UTC (rev 614)
@@ -1,17 +1,25 @@
Revision history for Perl extension FTN::Packet
-0.01 Wed Jan 01 2003
+0.06 Sat Mar 27 2004
+ - Created the lib/FTN source directory and moved Packet.pm to it.
+ - Imported and created initial versions of readpkt & writepkt functions.
+ - Corrected version numbers in Changes file and Packet.pm to reflect
+ the actual changes.
+
+0.05 Mon Nov 10 2003
+ - Updated Copyright date
+
+0.04 Wed Jan 01 2003
- Corrected year numbers to 2003.
-0.01 Wed Dec 26 2001
+0.03 Wed Dec 26 2001
- in README; added installation info & included '2002' in copyright
- statement.
+ statement.
-0.01 Sun Dec 16 2001
+0.02 Sun Dec 16 2001
- Corrected NAME reference in MakeFile.PL.
- Added EXPORT_OK reference in Packet.pm
- removed unnecessary reference to t directory
0.01 Sat Jun 9 2001
- - original version; created by R.J. Clay
-
+ - original version; created by R.J. Clay
Modified: trunk/modules/FTN/Packet/MANIFEST
===================================================================
--- trunk/modules/FTN/Packet/MANIFEST 2011-07-13 20:48:53 UTC (rev 613)
+++ trunk/modules/FTN/Packet/MANIFEST 2011-07-15 17:12:43 UTC (rev 614)
@@ -1,7 +1,7 @@
Changes
MANIFEST
Makefile.PL
-Packet.pm
+lib/FTN/Packet.pm
README
TODO
t/test.pl
Modified: trunk/modules/FTN/Packet/Makefile.PL
===================================================================
--- trunk/modules/FTN/Packet/Makefile.PL 2011-07-13 20:48:53 UTC (rev 613)
+++ trunk/modules/FTN/Packet/Makefile.PL 2011-07-15 17:12:43 UTC (rev 614)
@@ -3,5 +3,5 @@
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'FTN::Packet',
- 'VERSION_FROM' => 'Packet.pm', # finds $VERSION
+ 'VERSION_FROM' => 'lib/FTN/Packet.pm', # finds $VERSION
);
Deleted: trunk/modules/FTN/Packet/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/Packet.pm 2011-07-13 20:48:53 UTC (rev 613)
+++ trunk/modules/FTN/Packet/Packet.pm 2011-07-15 17:12:43 UTC (rev 614)
@@ -1,53 +0,0 @@
-package FTN::Packet;
-
-use strict;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-
-require Exporter;
-require AutoLoader;
-
-@ISA = qw(Exporter AutoLoader);
-# Items to export into callers namespace by default. Note: do not export
-# names by default without a very good reason. Use EXPORT_OK instead.
-# Do not simply export all your public functions/methods/constants.
-@EXPORT = qw(
-);
-@EXPORT_OK = qw(
-
-);
-$VERSION = '0.01';
-
-
-# Preloaded methods go here.
-
-# Autoload methods go after =cut, and are processed by the autosplit program.
-
-1;
-__END__
-# Below is the documentation for this module.
-
-=head1 NAME
-
-FTN::Packet - Perl extension for Fidonet Technology Networks Packet files
-
-=head1 SYNOPSIS
-
- use FTN:Packet;
- To be added...
-
-=head1 DESCRIPTION
-
-Stub documentation for FTN::Packet was created initially. I will add to this
-as I have something working.
-
-To be added.
-
-=head1 AUTHOR
-
-Robert James Clay (R.J. Clay), ja...@us...
-
-=head1 SEE ALSO
-
-perl(1).
-
-=cut
Modified: trunk/modules/FTN/Packet/TODO
===================================================================
--- trunk/modules/FTN/Packet/TODO 2011-07-13 20:48:53 UTC (rev 613)
+++ trunk/modules/FTN/Packet/TODO 2011-07-15 17:12:43 UTC (rev 614)
@@ -1,3 +1,10 @@
To do: FTN:Packet
+ writepkt()
+- When doing, for instance, two messages: the two messages are making it into
+the packets but they're both the text of the second message.
+- Also the serial number for the MSGID is coming up as the same for both. When
+code a better way of getting a 8 char serial number to use, add it as a function
+to the module?
+
\ No newline at end of file
Added: trunk/modules/FTN/Packet/lib/FTN/Packet.pm
===================================================================
--- trunk/modules/FTN/Packet/lib/FTN/Packet.pm (rev 0)
+++ trunk/modules/FTN/Packet/lib/FTN/Packet.pm 2011-07-15 17:12:43 UTC (rev 614)
@@ -0,0 +1,424 @@
+package FTN::Packet;
+
+use strict;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
+
+=head1 NAME
+
+FTN::Packet - Reading or writing Fidonet Technology Networks (FTN) packets.
+
+=head1 VERSION
+
+VERSION 0.06
+
+=cut
+
+$VERSION = '0.06';
+
+=head1 DESCRIPTION
+
+FTN::Packet is a Perl extension for reading or writing Fidonet Technology Networks (FTN) packets.
+
+=cut
+
+require Exporter;
+require AutoLoader;
+
+=head1 EXPORT
+
+The following functions are available in this module: readpkt(), writepkt().
+
+=cut
+
+@ISA = qw(Exporter AutoLoader);
+# Items to export into callers namespace by default. Note: do not export
+# names by default without a very good reason. Use EXPORT_OK instead.
+# Do not simply export all your public functions/methods/constants.
+@EXPORT = qw(
+);
+@EXPORT_OK = qw( &readpkt(), &writepkt()
+
+);
+
+=head1 FUNCTIONS
+
+=head2 readpkt
+
+Syntax: @messages = readpkt(*PKT);
+
+Read a Fidonet/FTN packet. Returns the messages in the packet as an array of
+hash references, which can be read as follows:
+ $msg_ref = pop(@{$messages});
+ $msg_area = ${$msg_ref}->('area');
+ $msg_date = ${$msg_ref}->('ftnscdate');
+ $msg_tonode = ${$msg_ref}->('tonode');
+ $msg_from = ${$msg_ref}->('from');
+ $msg_body = ${$msg_ref}->('to');
+ $msg_subj = ${$msg_ref}->('subj');
+ $msg_msgid = ${$msg_ref}->('msgid');
+ $msg_replyid = ${$msg_ref}->('replyid');
+ $msg_body = ${$msg_ref}->('body');
+ $msg_ctrl = ${$msg_ref}->('ctrlinfo');
+
+=cut
+
+###############################################
+# Read Messages from FTN packet
+###############################################
+sub readpkt {
+
+ my ($PKT) = @_;
+ # "$PKT" is a file pointer to the packet file being read
+ # Returns an array of hash references
+
+ my ($PKTver,$orgnode,$destnode,$orgnet,$destnet,$attrib,$cost,$buf);
+ my ($osep, $s, $datetime, $to, $from, $subj, $area, @lines, @kludges,
+ $fromnode, $tonode, @messages, $msgbody, $msgid, $replyid, $origin,
+ $mailer, $seenby, $i, $k);
+
+ read($PKT,$buf,58); # Ignore packet header
+
+ while (!eof($PKT)) {
+
+ last if (read(PKT, $buf, 14) != 14);
+
+ ($PKTver, $orgnode, $destnode, $orgnet, $destnet, $attrib, $cost) = unpack("SSSSSSS",$buf);
+
+ undef $PKTver; # not used for anything yet - 8/26/01 rjc
+ undef $attrib; # not used for anything yet - 8/26/01 rjc
+ undef $cost; # not used for anything yet - 12/15/01 rjc
+
+ $osep = $/;
+ $/ = "\0";
+
+ $datetime = <PKT>;
+ if (length($datetime) > 20) {
+ $to = substr($datetime,20);
+ } else {
+ $to = <PKT>;
+ }
+ $from = <PKT>;
+ $subj = <PKT>;
+
+ $to =~ tr/\200-\377/\0-\177/; # mask hi-bit characters
+ $to =~ tr/\0-\037/\040-\100/; # mask control characters
+ $from =~ tr/\200-\377/\0-\177/; # mask hi-bit characters
+ $from =~ tr/\0-\037/\040-\100/; # mask control characters
+ $subj =~ tr/\0-\037/\040-\100/; # mask control characters
+
+ $s = <PKT>;
+ $/ = $osep;
+
+ $s =~ s/\x8d/\r/g;
+ @lines = split(/\r/,$s);
+
+ undef $s;
+
+ next if ($#lines < 0);
+
+ $area = shift(@lines);
+ $_ = $area;
+ $area ="NETMAIL" if /\//i; # default netmail area name
+ $area =~ s/.*://; # strip "area:"
+ $area =~ tr/a-z/A-Z/; # Force upper case ???
+
+ @kludges = ();
+
+ for ($i = $k = 0; $i <= $#lines; $i++) {
+
+ if ($lines[$i] =~ /^\001/) {
+ $kludges[$k++] = splice(@lines,$i,1);
+ redo;
+ }
+ }
+
+ for (;;) {
+ $_ = pop(@lines);
+ last if ($_ eq "");
+ if (/ \* origin: /i) {
+ $origin = substr($_,11);
+ last;
+ }
+ if (/---/) {
+ $mailer = $_;
+ }
+ if (/seen-by/i) {
+ $seenby=$_;
+ }
+ }
+
+ if ( ! $mailer ) {
+ $mailer = "---";
+ }
+
+ if ($#lines < 0) {
+ @lines = ("[empty message]");
+ }
+
+ # get message body
+ $msgbody = ""; # ensure that it starts empty
+
+ foreach $s (@lines) {
+ $s =~ tr/\0-\037/\040-\100/;
+ $s =~ s/\s+$//;
+ $s=~tr/^\*/ /;
+ $msgbody .= "$s\n";
+ }
+
+ $msgbody .= "$mailer\n" if ($mailer);
+ $msgbody .= " * Origin: $origin\n" if ($origin);
+
+ # get control info
+ my $ctrlinfo = ""; # ensure that it starts empty
+ $ctrlinfo .= "$seenby\n" if ($seenby);
+ foreach $s (@kludges) {
+ $s =~ s/^\001//;
+
+ # If kludge starts with "MSGID:", stick that in a special
+ # variable.
+ if ( substr($s, 0, 6) eq "MSGID:" ) {
+ $msgid = substr($s, 7);
+ }
+
+ $ctrlinfo .= "$s\n";
+ }
+
+ if ( ! $msgid) {
+ $msged = "msged id not available";
+ }
+
+ # get replyid from kludges? same way as get seenby?
+ $replyid = "reply id not available";
+
+ $fromnode = "1:$orgnet/$orgnode\n"; # need to pull zone num's from
+ $tonode = "1:$destnet/$destnode\n"; # pkt instead of defaulting 1
+
+ my %msg_info = (
+
+ area => $area,
+
+ ftscdate => $datetime,
+
+ # removed this: $tz\n"; # not useing this yet
+
+ #undef $cost; # not useing this yet...
+ fromnode => $fromnode,
+ tonode => $tonode,
+
+ from => $from,
+ to => $to,
+ subj => $subj,
+
+ msgid => $msgid,
+ replyid => $replyid,
+
+ body => $msgbody,
+
+ ctrlinfo => $ctrlinfo
+
+ );
+
+ push(@messages, \%msg_info);
+
+
+ } # end while
+
+ return (\@messages);
+
+} # end sub readpkt
+
+
+=head2 writepkt
+
+Syntax: writepkt($OutDir, \%PktInfo, \@messages);
+
+Create a Fidonet/FTN packet, where:
+ $OutDir is the directory where the packet is to be created
+ \%PktInfo is a reference to a hash containing the packet header
+ \@messages is reference to an array of references to hashes containing the messages.
+
+=cut
+
+sub writepkt {
+
+ my ($OutDir,$PktInfo, $messages) = @_;
+
+ my ($PktFile, @lines, $serialno, $buf, $i, $k, $msg_ref);
+
+ my $EOL = "\n\r";
+
+ # This part is a definition of the PKT format per FTS-0001
+
+ # PKT Header; initialized variable are constants; last comments are
+ # in pack() notation
+
+ # ${$PktInfo}{OrgNode} # S
+ # ${$PktInfo}{DestNode} # S
+ my ($Year, $Mon, $Day, $Hour, $Min, $Sec); # SSSSSS
+ my $Baud = 0; # S
+ my $PktVer = 2; # S Type 2 packet
+ # ${$PktInfo}{OrgNet} # S
+ # ${$PktInfo}{DestNet} # S
+ my $ProdCode = 0x100; # S product code: ?
+ # ${$PktInfo}{PassWord} # a8
+ # ${$PktInfo}{OrgZone} # S
+ # ${$PktInfo}{DestZone} # S
+ my $AuxNet = ${$PktInfo}{OrgNet}; # S
+ my $CapWord = 0x100; # S capability word: Type 2+
+ my $ProdCode2 = 0; # S ?
+ my $CapWord2 = 1; # S byte swapped cap. word
+ # ${$PktInfo}{OrgZone} # S (repeat)
+ # ${$PktInfo}{DestZone} # S (repeat)
+ # ${$PktInfo}{OrgPoint} # S
+ # config file for node info?
+ # ${$PktInfo}{DestPoint} # S
+ my $ProdSpec = 0; # L ?
+
+ # MSG Header; duplicated variables are shown as comments to indicate
+ # the MSG Header structure
+
+ # $PktVer # S (repeat)
+ # ${$PktInfo}{OrgNode} # S (repeat)
+ # ${$PktInfo}{DestNode} # S (repeat)
+ # ${$PktInfo}{OrgNet} # S (repeat)
+ # ${$PktInfo}{DestNet} # S (repeat)
+ my $Attrib = 0; # S
+ my $Cost = 0; # S
+ # ${$msg_ref}{DateTime} # a20 (this is a local())
+ # ${$msg_ref}{To} # a? (36 max)
+ # ${$msg_ref}{From} # a? (36 max)
+ # ${$msg_ref}{Subj} # a? (72 max)
+
+ #"AREA: " # c6 }
+ # ${$PktInfo}{Area} # a? (max?) } all this is actually part
+ #possible kludges go here. 0x01<TAG>0x0D } of the TEXT postions
+ #TEXT goes here. (ends with 2 0x0D's ???) }
+
+ # ${$PktInfo}{TearLine}
+ my $Origin = " * Origin: ${$PktInfo}{Origin} (${$PktInfo}{OrgZone}:${$PktInfo}{OrgNet}/${$PktInfo}{OrgNode}.1)$EOL";
+ my $SeenBy = "SEEN-BY: ${$PktInfo}{OrgNet}/${$PktInfo}{OrgNode}$EOL";
+ my $Path = "\1PATH: ${$PktInfo}{OrgNet}/${$PktInfo}{OrgNode}$EOL\0"; # note the \0 in $Path
+
+ # repeat MSG Headers/TEXT
+
+ # null (S) to mark done
+
+ my $nmsgs = 0;
+
+ # this is where a loop would go if more than one feed
+
+ # PKT name as per FTS
+ ($Sec, $Min, $Hour, $Day, $Mon, $Year) = localtime();
+ $Year += 2000;
+ # does the above actually give a two digit year?
+ # the original above was 1900 instead of 1900
+ $PktFile = sprintf("%s/%02d%02d%02d%02d.PKT",$OutDir,$Day,$Hour,$Min,$Sec);
+
+ open(PKT,">$PktFile") || die;
+
+ binmode(PKT);
+
+ # write packet header
+ $buf = pack("SSSSSSSSSSSSSa8SSSSSSSSSSL",
+ ${$PktInfo}{OrgNode}, ${$PktInfo}{DestNode},
+ $Year, $Mon, $Day, $Hour, $Min, $Sec,
+ $Baud, $PktVer,
+ ${$PktInfo}{OrgNet}, ${$PktInfo}{DestNet},
+ $ProdCode, ${$PktInfo}{PassWord},
+ ${$PktInfo}{OrgZone}, ${$PktInfo}{DestZone}, $AuxNet,
+ $CapWord, $ProdCode2, $CapWord2,
+ ${$PktInfo}{OrgZone}, ${$PktInfo}{DestZone},
+ ${$PktInfo}{OrgPoint}, ${$PktInfo}{DestPoint}, $ProdSpec);
+ syswrite(PKT,$buf,58);
+
+ # needs to iterate over the array of hashes representing the messages
+ foreach $msg_ref ( @{$messages} ) {
+ #while ( @{$messages} > 0) {
+ #while ( @{$messages} ) {
+
+ #$msg_ref = pop(@{$messages}); # get next message hash reference
+
+ # get text body, translate LFs to CRs
+
+ @lines = ${$msg_ref}{Body};
+ grep(s/\n/\r/,@lines);
+
+ # kill leading blank lines
+
+ shift(@lines) while ($lines[0] eq "\n");
+
+ ++$nmsgs; # informative only
+
+ # write message to PKT file
+
+ # Write Message Header
+ $buf = pack("SSSSSSSa20",
+ $PktVer,${$PktInfo}{OrgNode},${$PktInfo}{DestNode},${$PktInfo}{OrgNet},
+ ${$PktInfo}{DestNet},$Attrib,$Cost,${$msg_ref}{DateTime});
+ print PKT $buf;
+
+ print PKT "${$msg_ref}{To}\0";
+ print PKT "${$msg_ref}{From}\0";
+ print PKT "${$msg_ref}{Subj}\0";
+ print PKT "AREA: ${$PktInfo}{Area}$EOL"; # note: CR not nul
+
+ $serialno = unpack("%16C*",join('',@lines));
+ $serialno = sprintf("%lx",$serialno + time);
+ print PKT "\1MSGID: ${$PktInfo}{OrgZone}:${$PktInfo}{OrgNet}/${$PktInfo}{OrgNode}.${$PktInfo}{OrgPoint} $serialno$EOL";
+
+ print PKT @lines;
+ print PKT $EOL,${$PktInfo}{TearLine},$Origin,$SeenBy,$Path;
+
+ @lines = (); # all done with array (frees mem?)
+
+ }
+
+ print PKT "\0\0"; # indicates no more messages
+
+ close(PKT);
+
+ return 0;
+}
+
+__END__
+
+=head1 EXAMPLES
+
+ use FTN:Packet;
+ To be added...
+
+=head1 AUTHORS
+
+Robert James Clay, ja...@us...
+
+=head1 ACKNOWLEDGEMENTS
+
+Code for the readpkt function was initially derived from the newmsgs subroutine
+in the set of scripts for reading FTN packets (pkt2txt.pl, pkt2xml.pl, etc) by
+Russ Johnson L<ai...@us...> and Robert James Clay L<ja...@us...>
+available at the L<http://ftnpl.sourceforge.net>] project site. Initial code for
+the writepkt function was derived from the bbs2pkt.pl of v0.1 of the bbsdbpl
+scripts, also at the SourceForge project.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc FTN::Packet
+
+=head1 SEE ALSO
+
+ L<perl(1)>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2001-2004 Robert James Clay, all rights reserved.
+Copyright 2001-2003 Russ Johnson, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+1;
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 20:49:04
|
Revision: 613
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=613&view=rev
Author: jame
Date: 2011-07-13 20:48:53 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Version v1.3 of mrtgbbbs.pl released.
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/Changes
Modified: trunk/scripts/BBBS/mrtgbbbs/Changes
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/Changes 2011-07-13 20:48:47 UTC (rev 612)
+++ trunk/scripts/BBBS/mrtgbbbs/Changes 2011-07-13 20:48:53 UTC (rev 613)
@@ -1,47 +1,57 @@
-12 Jul 2011
- - Bump mrtgbbbs version to 1.3
+Revision history for mrtgbbbs
-14 Jul 2010
+13 July 2011
+ - Release mrtgbbbs.pl version v1.3.
+ - Update copyright information for files.
+ - Use example.org for example domain names.
+ - TODO file for mrtgbbbs as of 13 July 2011.
+ - Reorganized project for CPAN compatibility.
+ - Explicitly set scope of variables in mrtgbbbs.pl.
+ - Use full names of months for dates in Changes file.
+ - Rewrite README, also adding information regarding the GIT repository
+ and information about support.
+
+14 July 2010
- Released as version v1.2
- mrtgbbbs.pl: Add explicitly using strictures & warnings. Move
version number in comment line to $VERSION variable. Clean up
- formatting, layout, and readibility of the script.
+ formatting, layout, and readibility of the script.
- README: Removed specific Debian version. Removed the phone number
reference. Corrected the node number reference. Corrected the name
and email address. Added homepage, code repository, and the files
availability information.
-
-13 Jul 2010
+
+13 July 2010
- Created & included this Changes file
- Update mrtgbbbs copyright years to 2010
- - Bump mrtgbbbs version to 1.2
-
-22 Mar 2004
+ - Bump mrtgbbbs version to 1.2
+
+22 March 2004
- Released v1.1
- Remove beta references for mrtgbbbs v1.1.
- Explicitly note license & copyright in mrtgbbbs.pl script.
- Reworded cron information in README file.
- Version info not neccessary in TODO file; removed it.
- Changed paths for files in example mrtgbbbs.cfg
-
- 4 Jan 2004
+
+ 4 January 2004
- Updated copyright dates in files as neccessary
-21 Jun 2003
+21 June 2003
- corrected hostname in example mrtgbbbs.cfg
- corrected mrtg version in example mrtgbbbs.cfg
- Corrected Directory entry in example mrtgbbbs.cfg
- corrections to hostnames & work directory in example mrtgbbbs.cfg
- Corrected version number to 1.1
-
- 2 Jan 2003
+
+ 2 January 2003
- Corrected year numbers to 2003
-
-30 Dec 2001
+
+30 December 2001
- Updated file.
- Added 2002 to copyright statement.
-
-25 Aug 2001
+
+25 August 2001
- Released v1.0
- Changed path for mrtg config file
- Changed WorkDir path.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 20:48:59
|
Revision: 612
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=612&view=rev
Author: jame
Date: 2011-07-13 20:48:47 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
TODO as of 13 July 2011.
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/TODO
Modified: trunk/scripts/BBBS/mrtgbbbs/TODO
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/TODO 2011-07-13 19:57:16 UTC (rev 611)
+++ trunk/scripts/BBBS/mrtgbbbs/TODO 2011-07-13 20:48:47 UTC (rev 612)
@@ -1,24 +1,38 @@
mrtgbbbs ToDo
--------------
+- Add an explicit License file, so as to apply it to all files and not
+ just in files where it already explicitly noted?
+
+- Add information about installing at least the mrtgbbbs.pl script itself
+ into a non standard directory, like for BBBS in /opt/bbbs/scripts?
+
mrtgbbbs.pl
-- Change to useing Getopt module for command line parameters.
-- Add debug parameter & debugging code
+- Change to using the BBBS::MRTG module for accessing the BBBS MRTG
+ port information.
+- Add error checking for at least the type variable, which should be
+ either "io" or "user".
+- Add option to define the port to use; if option not defined, then
+ default to the standard port, 16425. Perhaps use an optional 3rd
+ positional parameter? (First two being required.)
+- Put the display of the usage information into a subroutine, so it
+ can be used in more than one place in the script.
+- Change to using Getopt module for the command line parameters?
+- Add debug parameter & debugging code?
- Add code to allow for blank return values, such as when BBBS is not
- running or is blocked from responding.
-- Use POD to add documentation to script?
+ running or is blocked from responding.
+- Use POD to add documentation to script: Add better note about the
+ information it is getting from BBBS. Also refer to the actual section
+ in the BBBS documentation where it is discussed. And just what MRTG is?
+- Move example documenation files into a pod file.
README
-- Add better note about the info it is getting from bbbs? Also refer
- to the actual section in the BBBS documentation where it is discussed.
- And just what MRTG is?
-- Add a note where discussions about the script can take place, like the
- BBBBS_ENGLISH echo?
+- Move the mrtgbbbs operational documentation into the documenation
+ in the script itself.
-mrtgbbbs.cfg
-- n/a
+Makefile.PL
+- After adding POD to mrtgbbbs.pl script, update Makefile.PL to instead get
+ the abstract from there.
+- Create a zip archive instead of a tar.gz archive for 'make dist' or have
+ two targets; one for zip & one for tar.gz, and one of those as default.
-
-
-- Add an explicit License file?
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 19:57:22
|
Revision: 611
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=611&view=rev
Author: jame
Date: 2011-07-13 19:57:16 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
t/00-load.t not needed until BBBS::MRTG available.
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/MANIFEST
Removed Paths:
-------------
trunk/scripts/BBBS/mrtgbbbs/t/00-load.t
Modified: trunk/scripts/BBBS/mrtgbbbs/MANIFEST
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/MANIFEST 2011-07-13 19:57:09 UTC (rev 610)
+++ trunk/scripts/BBBS/mrtgbbbs/MANIFEST 2011-07-13 19:57:16 UTC (rev 611)
@@ -6,7 +6,6 @@
doc/mrtgbbbs.cfg
doc/mrtg.cron
doc/stats.html
-t/00-load.t
t/manifest.t
t/pod-coverage.t
t/pod.t
Deleted: trunk/scripts/BBBS/mrtgbbbs/t/00-load.t
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/t/00-load.t 2011-07-13 19:57:09 UTC (rev 610)
+++ trunk/scripts/BBBS/mrtgbbbs/t/00-load.t 2011-07-13 19:57:16 UTC (rev 611)
@@ -1,10 +0,0 @@
-#!perl -T
-
-use Test::More tests => 1;
-
-BEGIN {
- use_ok( 'BBBS::MRTG' ) || print "Bail out!
-";
-}
-
-diag( "Testing mrtgbbbs $mrtgbbbs::VERSION, Perl $], $^X" );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 19:57:15
|
Revision: 610
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=610&view=rev
Author: jame
Date: 2011-07-13 19:57:09 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Add test directory (t/) to project.
Added Paths:
-----------
trunk/scripts/BBBS/mrtgbbbs/t/
trunk/scripts/BBBS/mrtgbbbs/t/00-load.t
trunk/scripts/BBBS/mrtgbbbs/t/manifest.t
trunk/scripts/BBBS/mrtgbbbs/t/pod-coverage.t
trunk/scripts/BBBS/mrtgbbbs/t/pod.t
Added: trunk/scripts/BBBS/mrtgbbbs/t/00-load.t
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/t/00-load.t (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/t/00-load.t 2011-07-13 19:57:09 UTC (rev 610)
@@ -0,0 +1,10 @@
+#!perl -T
+
+use Test::More tests => 1;
+
+BEGIN {
+ use_ok( 'BBBS::MRTG' ) || print "Bail out!
+";
+}
+
+diag( "Testing mrtgbbbs $mrtgbbbs::VERSION, Perl $], $^X" );
Added: trunk/scripts/BBBS/mrtgbbbs/t/manifest.t
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/t/manifest.t (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/t/manifest.t 2011-07-13 19:57:09 UTC (rev 610)
@@ -0,0 +1,13 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More;
+
+unless ( $ENV{RELEASE_TESTING} ) {
+ plan( skip_all => "Author tests not required for installation" );
+}
+
+eval "use Test::CheckManifest 0.9";
+plan skip_all => "Test::CheckManifest 0.9 required" if $@;
+ok_manifest();
Added: trunk/scripts/BBBS/mrtgbbbs/t/pod-coverage.t
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/t/pod-coverage.t (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/t/pod-coverage.t 2011-07-13 19:57:09 UTC (rev 610)
@@ -0,0 +1,18 @@
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod::Coverage
+my $min_tpc = 1.08;
+eval "use Test::Pod::Coverage $min_tpc";
+plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
+ if $@;
+
+# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
+# but older versions don't recognize some common documentation styles
+my $min_pc = 0.18;
+eval "use Pod::Coverage $min_pc";
+plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
+ if $@;
+
+all_pod_coverage_ok();
Added: trunk/scripts/BBBS/mrtgbbbs/t/pod.t
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/t/pod.t (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/t/pod.t 2011-07-13 19:57:09 UTC (rev 610)
@@ -0,0 +1,12 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod
+my $min_tp = 1.22;
+eval "use Test::Pod $min_tp";
+plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
+
+all_pod_files_ok();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 19:28:29
|
Revision: 609
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=609&view=rev
Author: jame
Date: 2011-07-13 19:28:18 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Cannot yet get ABSTRACT from mrtgbbbs script.
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/Makefile.PL
Modified: trunk/scripts/BBBS/mrtgbbbs/Makefile.PL
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/Makefile.PL 2011-07-13 18:53:33 UTC (rev 608)
+++ trunk/scripts/BBBS/mrtgbbbs/Makefile.PL 2011-07-13 19:28:18 UTC (rev 609)
@@ -6,7 +6,7 @@
NAME => 'mrtgbbbs',
AUTHOR => q{Robert James Clay <ja...@ro...>},
VERSION_FROM => 'bin/mrtgbbbs.pl',
- ABSTRACT_FROM => 'bin/mrtgbbbs.pl',
+ ABSTRACT => 'Perl script for reading the MRTG information from the BBBS standard port.',
($ExtUtils::MakeMaker::VERSION >= 6.3002
? ('LICENSE'=> 'perl')
: ()),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 18:53:46
|
Revision: 608
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=608&view=rev
Author: jame
Date: 2011-07-13 18:53:33 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Finish adding files for CPAN compatibility.
Added Paths:
-----------
trunk/scripts/BBBS/mrtgbbbs/.gitignore
trunk/scripts/BBBS/mrtgbbbs/MANIFEST
trunk/scripts/BBBS/mrtgbbbs/Makefile.PL
trunk/scripts/BBBS/mrtgbbbs/doc/ignore.txt
Added: trunk/scripts/BBBS/mrtgbbbs/.gitignore
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/.gitignore (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/.gitignore 2011-07-13 18:53:33 UTC (rev 608)
@@ -0,0 +1,12 @@
+blib*
+Makefile
+Makefile.old
+Build
+Build.bat
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+cover_db
+pod2htm*.tmp
+mrtgbbbs-*
Added: trunk/scripts/BBBS/mrtgbbbs/MANIFEST
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/MANIFEST (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/MANIFEST 2011-07-13 18:53:33 UTC (rev 608)
@@ -0,0 +1,14 @@
+Changes
+MANIFEST
+Makefile.PL
+README
+bin/mrtgbbbs.pl
+doc/mrtgbbbs.cfg
+doc/mrtg.cron
+doc/stats.html
+t/00-load.t
+t/manifest.t
+t/pod-coverage.t
+t/pod.t
+TODO
+
Added: trunk/scripts/BBBS/mrtgbbbs/Makefile.PL
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/Makefile.PL (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/Makefile.PL 2011-07-13 18:53:33 UTC (rev 608)
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
+
+WriteMakefile(
+ NAME => 'mrtgbbbs',
+ AUTHOR => q{Robert James Clay <ja...@ro...>},
+ VERSION_FROM => 'bin/mrtgbbbs.pl',
+ ABSTRACT_FROM => 'bin/mrtgbbbs.pl',
+ ($ExtUtils::MakeMaker::VERSION >= 6.3002
+ ? ('LICENSE'=> 'perl')
+ : ()),
+ EXE_FILES => [ qw( bin/mrtgbbbs.pl ) ],
+ PL_FILES => {},
+ PREREQ_PM => {
+ 'Test::More' => 0,
+ },
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'mrtgbbbs-*' },
+);
Added: trunk/scripts/BBBS/mrtgbbbs/doc/ignore.txt
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/doc/ignore.txt (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/doc/ignore.txt 2011-07-13 18:53:33 UTC (rev 608)
@@ -0,0 +1,12 @@
+blib*
+Makefile
+Makefile.old
+Build
+Build.bat
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+cover_db
+pod2htm*.tmp
+mrtgbbbs-*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 18:47:01
|
Revision: 607
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=607&view=rev
Author: jame
Date: 2011-07-13 18:46:49 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Move documention files to the doc/ directory.
Added Paths:
-----------
trunk/scripts/BBBS/mrtgbbbs/doc/
trunk/scripts/BBBS/mrtgbbbs/doc/file_id.diz
trunk/scripts/BBBS/mrtgbbbs/doc/mrtg.cron
trunk/scripts/BBBS/mrtgbbbs/doc/mrtgbbbs.cfg
trunk/scripts/BBBS/mrtgbbbs/doc/stats.html
Removed Paths:
-------------
trunk/scripts/BBBS/mrtgbbbs/file_id.diz
trunk/scripts/BBBS/mrtgbbbs/mrtg.cron
trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.cfg
trunk/scripts/BBBS/mrtgbbbs/stats.html
Copied: trunk/scripts/BBBS/mrtgbbbs/doc/file_id.diz (from rev 606, trunk/scripts/BBBS/mrtgbbbs/file_id.diz)
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/doc/file_id.diz (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/doc/file_id.diz 2011-07-13 18:46:49 UTC (rev 607)
@@ -0,0 +1,4 @@
+mrtgbbbs.pl v1.3
+Perl script for reading the mrtg info
+from the BBBS standard port.
+See README for more info.
Copied: trunk/scripts/BBBS/mrtgbbbs/doc/mrtg.cron (from rev 606, trunk/scripts/BBBS/mrtgbbbs/mrtg.cron)
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/doc/mrtg.cron (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/doc/mrtg.cron 2011-07-13 18:46:49 UTC (rev 607)
@@ -0,0 +1,3 @@
+10,40 * * * * root if [ -x /usr/bin/mrtg ]; then /usr/bin/mrtg /opt/ftn/mrtgbbbs.cfg; fi
+
+10,40 * * * * /usr/bin/mrtg --user bbbs --group www-data --lock-file mrtgbbbs.lck /opt/bbbs/work/mrtgbbbs.cfg >> /opt/bbbs/logs/mrtgbbbs.log 2>&1
Copied: trunk/scripts/BBBS/mrtgbbbs/doc/mrtgbbbs.cfg (from rev 606, trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.cfg)
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/doc/mrtgbbbs.cfg (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/doc/mrtgbbbs.cfg 2011-07-13 18:46:49 UTC (rev 607)
@@ -0,0 +1,51 @@
+######################################################################
+# Multi Router Traffic Grapher -- for bbs.example.org
+######################################################################
+# This file is used with mrtg-2.9.8
+
+# Global configuration
+
+WorkDir: /opt/bbbs/htdocs/stats/mrtg
+Interval: 30
+#Refresh: 600
+WriteExpires: Yes
+
+#Title[^]: Traffic Analysis for
+
+
+# mrtgbbbs.cfg io
+Target[bbbs-io]: `/opt/bbbs/scripts/mrtgbbbs.pl 192.168.1.132 io`
+#Directory[bbbs-io]: mrtg
+MaxBytes[bbbs-io]: 1250000
+Title[bbbs-io]: Example BBS I/O
+PageTop[bbbs-io]: <H1>Example BBS (bbs.example.org): I/O</H1>
+AbsMax[bbbs-io]: 125000000
+Options[bbbs-io]: gauge
+#Suppress[bbbs-io]: wmy
+# YLegend[bbbs-io]: Bits per Second
+# ShortLegend[bbbs-io]: b/s
+# Legend1[bbbs-io]: Incoming Traffic in Bits per Second
+# Legend2[bbbs-io]: Outgoing Traffic in Bits per Second
+# Legend3[bbbs-io]: Maximal 5 Minute Incoming Traffic
+# Legend4[bbbs-io]: Maximal 5 Minute Outgoing Traffic
+#LegendI[bbbs-io]: & cpu:
+#LegendO[bbbs-io]: & mem:
+
+# mrtgbbbs.cfg user
+Target[bbbs-user]: `/opt/bbbs/scripts/mrtgbbbs.pl 192.168.1.132 user`
+#Directory[bbbs-user]: mrtg
+MaxBytes[bbbs-user]: 1250000
+Title[bbbs-user]: Example BBS Users
+PageTop[bbbs-user]: <H1>Example BBS (bbs.example.org): Users</H1>
+AbsMax[bbbs-user]: 125000000
+Options[bbbs-user]: gauge
+#Suppress[bbbs-user]: my
+# YLegend[bbbs-user]: Bits per Second
+# ShortLegend[bbbs-user]: b/s
+Legend1[bbbs-user]: Active Connections
+Legend2[bbbs-user]: New Connections
+# Legend3[bbbs-user]: Maximal 5 Minute Incoming Traffic
+# Legend4[bbbs-user]: Maximal 5 Minute Outgoing Traffic
+LegendI[bbbs-user]: & active:
+LegendO[bbbs-user]: & new:
+
Copied: trunk/scripts/BBBS/mrtgbbbs/doc/stats.html (from rev 606, trunk/scripts/BBBS/mrtgbbbs/stats.html)
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/doc/stats.html (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/doc/stats.html 2011-07-13 18:46:49 UTC (rev 607)
@@ -0,0 +1,51 @@
+<HTML>
+<HEAD>
+ <TITLE>BBBS Stats Index</TITLE>
+ <META NAME="author" content="Robert James Clay">
+ <META NAME="keywords" CONTENT="BBS, Fidonet, Files, Echos, Conferences">
+ <META NAME="description" CONTENT="BBBS Statistics.">
+</HEAD>
+<BODY BGCOLOR="#F0E68C" LINK="#0000FF" VLINK="#FF0000">
+<HR>
+<H1>BBBS Statistics Index</H1>
+
+<HR WIDTH=60%>
+<A NAME="bbbsstats"><H2>BBBS traffic Stats</H2></A>
+
+<P> This is an example index page with links to the BBBS related html
+pages generated by MRTG.<p>
+
+<UL>
+
+<LI><DL>
+ <DT>Traffic Stats for BBBS
+ <DD>Overall traffic Stats, user <a href="bbbs-user.html"> User </a>.
+ <DD>Overall traffic Stats, io <a href="bbbs-io.html"> I/O </a>.
+ </DL>
+
+</UL>
+
+
+
+<HR WIDTH="50%">
+<P ALIGN="CENTER">
+ [<A HREF ="#top">Top</A>]
+ [<A HREF ="index.html">BBS</A>]
+ [<A HREF ="../index.html">Home</A>]
+</P>
+<HR>
+
+
+<P ALIGN=CENTER>
+Any comments, suggestions, questions, etc.<BR>
+about this or any other page at this site;<BR>
+please feel free to <A HREF="../contact.html">contact </A>me.<BR>
+<P ALIGN=CENTER><FONT SIZE="-2">Copyright \xA92011 Robert J. Clay
+<!--
+This is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself.
+-->
+</FONT>
+<HR>
+</BODY>
+</HTML>
Deleted: trunk/scripts/BBBS/mrtgbbbs/file_id.diz
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/file_id.diz 2011-07-13 17:58:13 UTC (rev 606)
+++ trunk/scripts/BBBS/mrtgbbbs/file_id.diz 2011-07-13 18:46:49 UTC (rev 607)
@@ -1,4 +0,0 @@
-mrtgbbbs.pl v1.3
-Perl script for reading the mrtg info
-from the BBBS standard port.
-See README for more info.
Deleted: trunk/scripts/BBBS/mrtgbbbs/mrtg.cron
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/mrtg.cron 2011-07-13 17:58:13 UTC (rev 606)
+++ trunk/scripts/BBBS/mrtgbbbs/mrtg.cron 2011-07-13 18:46:49 UTC (rev 607)
@@ -1,3 +0,0 @@
-10,40 * * * * root if [ -x /usr/bin/mrtg ]; then /usr/bin/mrtg /opt/ftn/mrtgbbbs.cfg; fi
-
-10,40 * * * * /usr/bin/mrtg --user bbbs --group www-data --lock-file mrtgbbbs.lck /opt/bbbs/work/mrtgbbbs.cfg >> /opt/bbbs/logs/mrtgbbbs.log 2>&1
Deleted: trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.cfg
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.cfg 2011-07-13 17:58:13 UTC (rev 606)
+++ trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.cfg 2011-07-13 18:46:49 UTC (rev 607)
@@ -1,51 +0,0 @@
-######################################################################
-# Multi Router Traffic Grapher -- for bbs.example.org
-######################################################################
-# This file is used with mrtg-2.9.8
-
-# Global configuration
-
-WorkDir: /opt/bbbs/htdocs/stats/mrtg
-Interval: 30
-#Refresh: 600
-WriteExpires: Yes
-
-#Title[^]: Traffic Analysis for
-
-
-# mrtgbbbs.cfg io
-Target[bbbs-io]: `/opt/bbbs/scripts/mrtgbbbs.pl 192.168.1.132 io`
-#Directory[bbbs-io]: mrtg
-MaxBytes[bbbs-io]: 1250000
-Title[bbbs-io]: Example BBS I/O
-PageTop[bbbs-io]: <H1>Example BBS (bbs.example.org): I/O</H1>
-AbsMax[bbbs-io]: 125000000
-Options[bbbs-io]: gauge
-#Suppress[bbbs-io]: wmy
-# YLegend[bbbs-io]: Bits per Second
-# ShortLegend[bbbs-io]: b/s
-# Legend1[bbbs-io]: Incoming Traffic in Bits per Second
-# Legend2[bbbs-io]: Outgoing Traffic in Bits per Second
-# Legend3[bbbs-io]: Maximal 5 Minute Incoming Traffic
-# Legend4[bbbs-io]: Maximal 5 Minute Outgoing Traffic
-#LegendI[bbbs-io]: & cpu:
-#LegendO[bbbs-io]: & mem:
-
-# mrtgbbbs.cfg user
-Target[bbbs-user]: `/opt/bbbs/scripts/mrtgbbbs.pl 192.168.1.132 user`
-#Directory[bbbs-user]: mrtg
-MaxBytes[bbbs-user]: 1250000
-Title[bbbs-user]: Example BBS Users
-PageTop[bbbs-user]: <H1>Example BBS (bbs.example.org): Users</H1>
-AbsMax[bbbs-user]: 125000000
-Options[bbbs-user]: gauge
-#Suppress[bbbs-user]: my
-# YLegend[bbbs-user]: Bits per Second
-# ShortLegend[bbbs-user]: b/s
-Legend1[bbbs-user]: Active Connections
-Legend2[bbbs-user]: New Connections
-# Legend3[bbbs-user]: Maximal 5 Minute Incoming Traffic
-# Legend4[bbbs-user]: Maximal 5 Minute Outgoing Traffic
-LegendI[bbbs-user]: & active:
-LegendO[bbbs-user]: & new:
-
Deleted: trunk/scripts/BBBS/mrtgbbbs/stats.html
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/stats.html 2011-07-13 17:58:13 UTC (rev 606)
+++ trunk/scripts/BBBS/mrtgbbbs/stats.html 2011-07-13 18:46:49 UTC (rev 607)
@@ -1,51 +0,0 @@
-<HTML>
-<HEAD>
- <TITLE>BBBS Stats Index</TITLE>
- <META NAME="author" content="Robert James Clay">
- <META NAME="keywords" CONTENT="BBS, Fidonet, Files, Echos, Conferences">
- <META NAME="description" CONTENT="BBBS Statistics.">
-</HEAD>
-<BODY BGCOLOR="#F0E68C" LINK="#0000FF" VLINK="#FF0000">
-<HR>
-<H1>BBBS Statistics Index</H1>
-
-<HR WIDTH=60%>
-<A NAME="bbbsstats"><H2>BBBS traffic Stats</H2></A>
-
-<P> This is an example index page with links to the BBBS related html
-pages generated by MRTG.<p>
-
-<UL>
-
-<LI><DL>
- <DT>Traffic Stats for BBBS
- <DD>Overall traffic Stats, user <a href="bbbs-user.html"> User </a>.
- <DD>Overall traffic Stats, io <a href="bbbs-io.html"> I/O </a>.
- </DL>
-
-</UL>
-
-
-
-<HR WIDTH="50%">
-<P ALIGN="CENTER">
- [<A HREF ="#top">Top</A>]
- [<A HREF ="index.html">BBS</A>]
- [<A HREF ="../index.html">Home</A>]
-</P>
-<HR>
-
-
-<P ALIGN=CENTER>
-Any comments, suggestions, questions, etc.<BR>
-about this or any other page at this site;<BR>
-please feel free to <A HREF="../contact.html">contact </A>me.<BR>
-<P ALIGN=CENTER><FONT SIZE="-2">Copyright \xA92011 Robert J. Clay
-<!--
-This is free software; you can redistribute it and/or
-modify it under the same terms as Perl itself.
--->
-</FONT>
-<HR>
-</BODY>
-</HTML>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 17:58:19
|
Revision: 606
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=606&view=rev
Author: jame
Date: 2011-07-13 17:58:13 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Move mrtgbbbs.pl to bin/ directory.
Added Paths:
-----------
trunk/scripts/BBBS/mrtgbbbs/bin/
trunk/scripts/BBBS/mrtgbbbs/bin/mrtgbbbs.pl
Removed Paths:
-------------
trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.pl
Copied: trunk/scripts/BBBS/mrtgbbbs/bin/mrtgbbbs.pl (from rev 605, trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.pl)
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/bin/mrtgbbbs.pl (rev 0)
+++ trunk/scripts/BBBS/mrtgbbbs/bin/mrtgbbbs.pl 2011-07-13 17:58:13 UTC (rev 606)
@@ -0,0 +1,50 @@
+#!/usr/bin/perl
+
+# mrtgbbbs.pl
+#
+# Copyright (c) 2000-2011 Robert James Clay. All Rights Reserved.
+# This is free software; you can redistribute it and/or
+# modify it under the same terms as Perl itself.
+
+use warnings;
+use strict;
+use IO::Socket;
+
+our $VERSION = 1.3;
+
+my ($host, $type, $socket, $first, $second, $time );
+
+#my $DEBUG = 0;
+
+if ( $ARGV[0] ) {
+ $host = $ARGV[0];
+ $type = $ARGV[1];
+}
+else {
+ print {*STDERR} "Usage: $0 <hostname> <io|user>\n";
+ exit 1;
+}
+
+#
+$socket = IO::Socket::INET->new(
+ PeerAddr => $host,
+ PeerPort => 16_425, # standard BBBS port
+ Proto => 'tcp',
+ Type => SOCK_STREAM
+) or die "Could not open port.\n";
+
+print {$socket} "$type\n";
+
+$first = <$socket>;
+$second = <$socket>;
+$time = <$socket>;
+
+close $socket or die "Unable to close socket.\n";
+
+print "$first";
+print "$second";
+print "$time\n";
+
+print q{};
+
+exit; # We're done!
Deleted: trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.pl
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.pl 2011-07-13 16:14:05 UTC (rev 605)
+++ trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.pl 2011-07-13 17:58:13 UTC (rev 606)
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-
-# mrtgbbbs.pl
-#
-# Copyright (c) 2000-2011 Robert James Clay. All Rights Reserved.
-# This is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-use warnings;
-use strict;
-use IO::Socket;
-
-our $VERSION = 1.3;
-
-my ($host, $type, $socket, $first, $second, $time );
-
-#my $DEBUG = 0;
-
-if ( $ARGV[0] ) {
- $host = $ARGV[0];
- $type = $ARGV[1];
-}
-else {
- print {*STDERR} "Usage: $0 <hostname> <io|user>\n";
- exit 1;
-}
-
-#
-$socket = IO::Socket::INET->new(
- PeerAddr => $host,
- PeerPort => 16_425, # standard BBBS port
- Proto => 'tcp',
- Type => SOCK_STREAM
-) or die "Could not open port.\n";
-
-print {$socket} "$type\n";
-
-$first = <$socket>;
-$second = <$socket>;
-$time = <$socket>;
-
-close $socket or die "Unable to close socket.\n";
-
-print "$first";
-print "$second";
-print "$time\n";
-
-print q{};
-
-exit; # We're done!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 16:14:11
|
Revision: 605
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=605&view=rev
Author: jame
Date: 2011-07-13 16:14:05 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Add Support information to README file.
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/README
Modified: trunk/scripts/BBBS/mrtgbbbs/README
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/README 2011-07-13 14:37:02 UTC (rev 604)
+++ trunk/scripts/BBBS/mrtgbbbs/README 2011-07-13 16:14:05 UTC (rev 605)
@@ -11,9 +11,13 @@
It is hosted at the 'Perl for Fidonet (FTN) Systems' project at SourceForge,
http://ftnpl.sourceforge.net. The main code repository for it is browsable at
http://ftnpl.svn.sourceforge.net/viewvc/ftnpl/trunk/scripts/BBBS/mrtgbbbs/. A
-GIT mirror of the mrtgbbbs trunk in SVN is available at the following
-site: https://github.com/bbbsdeb/mrtgbbbs.
+GIT mirror of the mrtgbbbs trunk in SVN is available at the following site:
+https://github.com/bbbsdeb/mrtgbbbs.
+Although support for it can be discussed in the ftnpl-develop mailing list at
+Sourceforge, and it can also be discussed in the BBBS.ENGLISH echo; support
+for it is best done at the http://github.com/bbbsdeb/mrtgbbbs/issues site.
+
Archives of it can be found in the Project file downloads section. They can
also be found on any FTN system that carries the BBBSUTIL File Echo, which is
distributed via the Filegate (www.filegate.net).
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 14:37:15
|
Revision: 604
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=604&view=rev
Author: jame
Date: 2011-07-13 14:37:02 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Revert "Release mrtgbbbs.pl version v1.3."
This reverts commit 8f3c403434f82fe2f5aa3af226d2de4fdc0852dc: the
version is not yet quite ready to release."
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/Changes
Modified: trunk/scripts/BBBS/mrtgbbbs/Changes
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/Changes 2011-07-13 14:14:31 UTC (rev 603)
+++ trunk/scripts/BBBS/mrtgbbbs/Changes 2011-07-13 14:37:02 UTC (rev 604)
@@ -1,26 +1,21 @@
12 Jul 2011
- - Release mrtgbbbs.pl version v1.3.
- - TODO file as of 12 July 2011.
- - Update files copyright information.
- - Use example.org for example domain names.
- - Explicitly set scope of variables in mrtgbbbs.pl.
- - Rewrite README, also adding note about GIT repository.
+ - Bump mrtgbbbs version to 1.3
14 Jul 2010
- Released as version v1.2
- mrtgbbbs.pl: Add explicitly using strictures & warnings. Move
version number in comment line to $VERSION variable. Clean up
- formatting, layout, and readibility of the script.
+ formatting, layout, and readibility of the script.
- README: Removed specific Debian version. Removed the phone number
reference. Corrected the node number reference. Corrected the name
and email address. Added homepage, code repository, and the files
availability information.
-
+
13 Jul 2010
- Created & included this Changes file
- Update mrtgbbbs copyright years to 2010
- - Bump mrtgbbbs version to 1.2
-
+ - Bump mrtgbbbs version to 1.2
+
22 Mar 2004
- Released v1.1
- Remove beta references for mrtgbbbs v1.1.
@@ -28,7 +23,7 @@
- Reworded cron information in README file.
- Version info not neccessary in TODO file; removed it.
- Changed paths for files in example mrtgbbbs.cfg
-
+
4 Jan 2004
- Updated copyright dates in files as neccessary
@@ -38,14 +33,14 @@
- Corrected Directory entry in example mrtgbbbs.cfg
- corrections to hostnames & work directory in example mrtgbbbs.cfg
- Corrected version number to 1.1
-
+
2 Jan 2003
- Corrected year numbers to 2003
-
+
30 Dec 2001
- Updated file.
- Added 2002 to copyright statement.
-
+
25 Aug 2001
- Released v1.0
- Changed path for mrtg config file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-13 14:14:42
|
Revision: 603
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=603&view=rev
Author: jame
Date: 2011-07-13 14:14:31 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
v1.3 is not a beta.
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/file_id.diz
Modified: trunk/scripts/BBBS/mrtgbbbs/file_id.diz
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/file_id.diz 2011-07-12 21:34:27 UTC (rev 602)
+++ trunk/scripts/BBBS/mrtgbbbs/file_id.diz 2011-07-13 14:14:31 UTC (rev 603)
@@ -1,4 +1,4 @@
-mrtgbbbs.pl v1.3 beta
+mrtgbbbs.pl v1.3
Perl script for reading the mrtg info
from the BBBS standard port.
See README for more info.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-12 21:34:38
|
Revision: 602
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=602&view=rev
Author: jame
Date: 2011-07-12 21:34:27 +0000 (Tue, 12 Jul 2011)
Log Message:
-----------
Release mrtgbbbs.pl version v1.3.
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/Changes
Modified: trunk/scripts/BBBS/mrtgbbbs/Changes
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/Changes 2011-07-12 21:30:28 UTC (rev 601)
+++ trunk/scripts/BBBS/mrtgbbbs/Changes 2011-07-12 21:34:27 UTC (rev 602)
@@ -1,21 +1,26 @@
12 Jul 2011
- - Bump mrtgbbbs version to 1.3
+ - Release mrtgbbbs.pl version v1.3.
+ - TODO file as of 12 July 2011.
+ - Update files copyright information.
+ - Use example.org for example domain names.
+ - Explicitly set scope of variables in mrtgbbbs.pl.
+ - Rewrite README, also adding note about GIT repository.
14 Jul 2010
- Released as version v1.2
- mrtgbbbs.pl: Add explicitly using strictures & warnings. Move
version number in comment line to $VERSION variable. Clean up
- formatting, layout, and readibility of the script.
+ formatting, layout, and readibility of the script.
- README: Removed specific Debian version. Removed the phone number
reference. Corrected the node number reference. Corrected the name
and email address. Added homepage, code repository, and the files
availability information.
-
+
13 Jul 2010
- Created & included this Changes file
- Update mrtgbbbs copyright years to 2010
- - Bump mrtgbbbs version to 1.2
-
+ - Bump mrtgbbbs version to 1.2
+
22 Mar 2004
- Released v1.1
- Remove beta references for mrtgbbbs v1.1.
@@ -23,7 +28,7 @@
- Reworded cron information in README file.
- Version info not neccessary in TODO file; removed it.
- Changed paths for files in example mrtgbbbs.cfg
-
+
4 Jan 2004
- Updated copyright dates in files as neccessary
@@ -33,14 +38,14 @@
- Corrected Directory entry in example mrtgbbbs.cfg
- corrections to hostnames & work directory in example mrtgbbbs.cfg
- Corrected version number to 1.1
-
+
2 Jan 2003
- Corrected year numbers to 2003
-
+
30 Dec 2001
- Updated file.
- Added 2002 to copyright statement.
-
+
25 Aug 2001
- Released v1.0
- Changed path for mrtg config file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-12 21:30:39
|
Revision: 601
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=601&view=rev
Author: jame
Date: 2011-07-12 21:30:28 +0000 (Tue, 12 Jul 2011)
Log Message:
-----------
TODO as of 12 July 2011.
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/TODO
Modified: trunk/scripts/BBBS/mrtgbbbs/TODO
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/TODO 2011-07-12 21:22:09 UTC (rev 600)
+++ trunk/scripts/BBBS/mrtgbbbs/TODO 2011-07-12 21:30:28 UTC (rev 601)
@@ -1,4 +1,4 @@
-mrtgbbbs ToDo
+mrtgbbbs ToDo
--------------
mrtgbbbs.pl
@@ -11,15 +11,14 @@
README
- Add better note about the info it is getting from bbbs? Also refer
to the actual section in the BBBS documentation where it is discussed.
- And just what mrtg is?
+ And just what MRTG is?
- Add a note where discussions about the script can take place, like the
- BBBBS_ENGLISH echo.
-- If/when make Git repository public; add note about where that is, &
- how it is tied to the SVN repository.
+ BBBBS_ENGLISH echo?
mrtgbbbs.cfg
-- Anywhere being used; change rocasa.org to rocasa.us
+- n/a
+
- Add an explicit License file?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ja...@us...> - 2011-07-12 21:22:20
|
Revision: 600
http://ftnpl.svn.sourceforge.net/ftnpl/?rev=600&view=rev
Author: jame
Date: 2011-07-12 21:22:09 +0000 (Tue, 12 Jul 2011)
Log Message:
-----------
Explicitly set scope of variables in mrtgbbbs.pl
Modified Paths:
--------------
trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.pl
Modified: trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.pl
===================================================================
--- trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.pl 2011-07-12 20:30:18 UTC (rev 599)
+++ trunk/scripts/BBBS/mrtgbbbs/mrtgbbbs.pl 2011-07-12 21:22:09 UTC (rev 600)
@@ -12,8 +12,10 @@
our $VERSION = 1.3;
-#$DEBUG = 0;
+my ($host, $type, $socket, $first, $second, $time );
+#my $DEBUG = 0;
+
if ( $ARGV[0] ) {
$host = $ARGV[0];
$type = $ARGV[1];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|