Re: HTML processing

"Ger Hobbelt" <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
On Thu, May 22, 2008 at 10:08 PM, Trever L. Adams
<[email protected]> wrote:
> I am using a UNIX-like system (Linux). I thought I had seen an example that
> talked TCP/IP in crm114. I guess I was wrong. I just went and looked back,
> it was pipes. I guess that is what I get for relying on my memory of crm
> from about a year ago.

Wellll, the pipes business is _inside_ crm114 when it does as
'syscall' itself (i.e. execute a 'syscall' statement in a CRM script).
Otherwise, crm114 is just a nice little AWK on steroids. :-)


> Is it possible to have CRM do mailreaver.cm like functionality in a loop or
> will it only do one such thing per invocation? I ask this because I have an
> idea on how to make CRM act like a daemon if it does. (Loop over reading
> data from a program that does the TCP/IP for it... maybe the constant
> scheduling is more expensive than doing pipes directly with the program that
> would have been the TCP/IP sending.)

Phui! <scratches head like baboon>

Don't know for sure. There's nothing requiring crm114 ever quits
executing it's script, so you might try to daemonize it that way from
the inside out (maybe using crm script syscalls to get it to wait for
input - but that's a thought just now and it worries me already I
thought of it like that...). Of course, long-running scripts should
use 'syscall /sleep/' alike somethings to keep the OS happy as you'd
otherwise achieve 100% load, but it's doable, sure.


Regarding mailreaver though: it expects its feed in stdin at the start
of the script, so you'll need to apply a bit of extra work there then.
I have a changed mailreaver here which eats from a file too, but
that's not ready for service yet.

Mind if I take a cloth and put it over my head and cover? I'd rather
wait for the big brass (Bill & Paolo & ...) to provide an answer to
this question of yours.


> That is what I was hoping for, sub expressions.

Well, seems to me Bill already did that part of the job for you already :-)
Just a bit of testing with some nasty javascript/AJAX feeds, rotten
HTML without sufficient close tags + 'compressed' formatting and a bit
of XHTML and we'll know if it'll withstand the downpour.


-- 
Met vriendelijke groeten / Best regards,

Ger Hobbelt

--------------------------------------------------
web: http://www.hobbelt.com/
 http://www.hebbut.net/
mail: [email protected]
mobile: +31-6-11 120 978
--------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.