TIP: Click on subject to list as thread! ANSI
echo: batpower
to: Paul Quinn
from: Richard Webb
date: 2008-12-18 12:58:16
subject: how would you approach this?

HI Paul,

On Thu 2036-Dec-18 13:11, Paul Quinn (3:640/384) wrote to Richard Webb:

 RW> DAta in this case is information on vessels offshore.

PQ> This is the sort of application I had thought you intended the
PQ> process to support, all along.  Some sort of 'status' report.

Yep, radio operators take positions and other info from
cruisers offshore.  From the web form where they enter it it goes a couple
of places.  ME for a couple of applications,
weather data collected to national weather service, i.e.
local conditions at their location.

 RW> The system receives the information, when found the batch
 RW> invoked uses sed to grab all data and none of the header
 RW> stuff to the current file.

PQ> Cool.  So, you've got some sort of working gateway software between
PQ> emailfidonet (that is, both ways?).  What sort of message area
PQ> do have for your netmail area?  (I'm guessing *.msg?)

GOt access to a good gateway.  MEssage area for netmail
area is squish format, but netmgr searches mails when tossed into the area,
and exports it to a file.

NEtmgr exports the file, invokes a batch from within itself
that does the sed processing, places the output from sed in
a temporary file. NEtmgr also touches a couple of semaphores which will
trigger later additional processing.

 RW> NExt scheduled event, new current file, of course.  Purge
 RW> the file with data over 48 hours old.

PQ> Uh huh, 4x 12-hour updates triggered by a new incoming 5th 12-hour
PQ> update email post.

Almost.  THey're scheduled.  midnight and noon universal
time .

 RW> WHen another user requests this info by email, or I want to
 RW> have a look at it, all files are combined into one text
 RW> file.

PQ> Okay.  This is the tricky bit.  I'd be building the current 'status'
PQ> file -and- retaining the 4x 12-hour data files, still, and dumping
PQ> the oldest. 

Just what we're doing.  AT this midnight and noon event,
current.lst is renamed to two digit for month day hour and
minute.  i.e. 12181305.txt ...
oldest of five is purged.  NExt data comes in goes to current.lst.

 RW> Any thought after a bit more description?

PQ> Are you kidding!?!  I've spent most of the morning researching it. 
PQ> :) 

HEck of a job.  I was looking at lots of ways to deal with
it, but all looked rather intensive on the code.

NOw my next bit of fun, and just a matter o of parsing all
this.  AS sent as email fields are one per line, no field
names transmitted.
iF a vessel gives some weather data and not other data
points those lines are left blank.  I can pull lines
individually out of received file with sed and stuff in
field names, which I may do, but I"m debating on just
discarding the weather data altogether to make it easier,
since our main interest is who and where, etc.  IF they
provide weather data at all a keyword on a line by itself is present, so I
can use fgrep386 to search on that keyword,
branch appropriately I guess .
Just gotta do all that writing, make sure I have the line
numbers right for sed to process, and we're in business .

Again, thanks for the pointer in the right direction.  YOur
solution was much easier than the one that was getting most
of my attention here which was quite kludgy .

Regards,
           Richard
--- timEd 1.10.y2k+
* Origin: Radio REscue net operations BBS (1:116/901)
SEEN-BY: 10/1 3 34/999 90/1 120/228 123/500 140/1 222/2 226/0 249/303 250/306
SEEN-BY: 261/20 38 100 1404 1406 1410 1418 266/1413 280/1027 320/119 393/68
SEEN-BY: 396/45 633/104 260 267 285 640/954 690/682 734 712/0 104 313 848
SEEN-BY: 800/432 801/161 189 2222/700 2320/100 105 200 2905/0
@PATH: 116/901 3634/12 123/500 261/38 633/260 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.