Subj : Re: code example
To : Finnigann
From : Digital Man
Date : Mon Aug 21 2006 04:44 pm
Re: Re: code example
By: Finnigann to Digital Man on Fri Aug 18 2006 11:26 pm
> -=> With regards to the social ramifications;
> Digital Man wrote to Finnigann <=-
>
> DM> Re: Re: code example
> DM> By: Finnigann to Digital Man on Fri Aug 18 2006 10:13 pm
>
> > -=> With regards to the social ramifications;
> > Digital Man wrote to Finnigann <=-
> >
> > DM> Re: Re: code example
> > DM> By: Finnigann to Digital Man on Fri Aug 18 2006 07:42 pm
> >
> > > -=> With regards to the social ramifications;
> > > Digital Man wrote to Finnigann <=-
> > >
> > > DM> Re: code example
> > > DM> By: Finnigann to All on Fri Aug 18 2006 05:12 pm
> > >
> > > > Can anyone post some baja code for extracting messages from the me
> > > > data base. sort of the opposite of smbutl (i cmd)
> > >
> > > DM> smbutil can be used to extra messages from the message base. Baja
> > > DM> doesn't have any functions for directly accessing the message dat
> > > DM> files.
> > >
> > > Well that was my first impulse. But after studying the help/opt list.
> > > am stumped as to which switches would define the message(s) to extrac
> >
> > DM> I suppose I mispoke: you can *read* messages (interactively) with
> > DM> smbutil (using the 'r' command), but can't really "extract" message
> > DM> (programatically). This could be done with small JS module however.
> >
> > DM> If I knew more about exactly what you're trying to accomplish, I mig
> > DM> be able to help more.
> >
> > If you recall Jazzman's sports... game? I was wondering how syncdata
> > might be useful for tying other BBS' together.
> >
> > SMBUTIL can be made to upload game data. getting it out is another
> > item.
> >
> > But if a javascript segment can be called to cull out messages for the
> > door (making large assumptions) or added functionality to smbutil,
> > would be great.
>
> DM> Even if smbutil could extract a specific message, how would you know
> DM> *which* message to extract?
>
> Well I was thinking that switches would tell what values to look for in
> a message.
>
> Let me just make up some for demonstration puposes.
>
> usage: smbutil [-opts] cmd <filespec.shd>
>
> cmd:
> l[n] = list msgs starting at number n
> r[n] = read msgs starting at number n
> v[n] = view msg headers starting at number n
> i[f] = import msg from text file f (or use stdin)
> e[f] = import e-mail from text file f (or use stdin)
> n[f] = import netmail from text file f (or use stdin)
> /m = export message from message base
> /t = set 'To' to sort for
> /s = set 'subject' to sort for
> h = dump hash file
> s = display msg base status
> c = change msg base status
> d = delete all msgs
> m = maintain msg base - delete old msgs and msgs over max
> p[k] = pack msg base (k specifies minimum packable Kbytes)
> opts:
> f<s> = set 'from' user name for imported message
> e<s> = set 'from' user number for imported message
>
> smbutil /m /tdoorgame /sweeknumber \sbbs\xtrn\doorgame\input.dat
Okay, so /m would would always extract a single message? If so, wouldn't it
just keep extracting the same message over and over?
> > Of course you know I'm not a programmer, but is this function in the
> > SDK? I would think someone else would have sought out syncdata to
> > transport data before now.
>
> DM> A JS module would be the way to go. I'm not sure which SDK you're
> DM> referring to. The XSDK does not include any message base functionality.
> DM> The SMBLIB is available as a separate library for message base access,
> DM> but a JS module would be much easier.
>
> Well could something highly configurable be written in baja/javascript?
In JavaScript, absolutely. See the NewsLink and ListServers modules as
examples.
> // Pulls text from syncdata message base
> // $Id: syncdata.js,v .12 2006/08/19 rswindell Exp $
> // @format.tab-size 8, @format.use-tabs true
>
> load("sbbsdefs.js");
>
> // Available Command-line options:
> //
> // m indicates extraction
> // t sets 'To' field value
> // s sets 'Subject' field value
> // syncdata is the default message base
> //
> // syncdata.js /m /tdoorgame /sweeknumber \sbbs\xtrn\doorgame\input.dat
>
> P_OPENCLOSE
Huh?
digital man
Snapple "Real Fact" #53:
The average women consumes 6lbs of lipstick in her lifetime.
Norco, CA WX: 93.9�F, 31% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs
---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net