[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: crawler update

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-11-25 19:58:53 CET

Damn. Did you unplug your modem partway through your mail upload?

:-)

On Sat, Nov 25, 2000 at 01:49:18PM +0100, RADICS Peter wrote:
> On Fri, Nov 17, 2000 at 05:05:40PM -0600, Ben Collins-Sussman wrote:
> [SNIP]
> > (Side note: when I run `svn commit`, I get an XML file produced by
> > Greg H's xml-output-editor. However, it's pretty hard for me to
> > eyeball the results. I always end up passing this XML file to the
> > deltaparse-test program for readable output. Perhaps we *should* put
> > indentation into Greg's editor. :) )
>
> maybe the attached sed script can help a bit :) It's not perfect, but
> it's in sed :)
>
> ps: for nicer results: sed -f xmlindent.sed file.xml |sed 's/^I/ /'
>
> cheers,
> mitch
>
> --
> // RADICS Peter <mitch_at_lbcons.net> (http://lbcons.net)
> //
> // "If human beings don't keep exercising their lips,
> // their brains start working." -- Ford Prefect

> :a;/>/!N;s/\n/ /;ta
> s/ / /g;s/^ *//;s/ */ /g
> /^<!--/{:e;/-->/!N;s/\n//;te;s/-->/\n/;D;}
> /^<\/[^>]*>/{H;x;s/\n//;s/>.*$/>/;s/^ //;p;bb;}
> /^<[^>]*\/>/{H;x;s/\n//;s/>.*$/>/;p;bb;}
> /^<[^>]*[^\/]>/{H;x;s/\n//;s/>.*$/>/;p;s/^/ /;bb;}
> /</!ba;{H;x;s/\n//;s/ *<.*$//;p;s/[^ ].*$//;x;s/^[^<]*//;ba;}
> :b {s/[^ ].*$//;x;s/^<[^>]*>//;ba;}

> :a
> />/!N;s/\n/ /;ta
> s/ / /g;s/^ *//;s/ */ /g
> /^<!--/{
> :e
> /-->/!N;s/\n//;te
> s/-->/\n/;D;
> }
> /^<\/[^>]*>/{
> H;x;s/\n//;s/>.*$/>/;s/^ //;p;bb
> }
> /^<[^>]*\/>/{
> H;x;s/\n//;s/>.*$/>/;p;bb
> }
> /^<[^>]*[^\/]>/{
> H;x;s/\n//;s/>.*$/>/;p;s/^/ /;bb
> }
> /</!ba
> {
> H;x;s/\n//;s/ *<.*$//;p;s/[^ ].*$//;x;s/^[^<]*//;ba
> }
> :b
> {
> s/[^ ].*$//;x;s/^<[^>]*>//;ba
> }

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:15 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.