From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13693 invoked by alias); 3 Apr 2008 22:29:37 -0000 Received: (qmail 13684 invoked by uid 22791); 3 Apr 2008 22:29:37 -0000 X-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_33,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 03 Apr 2008 22:29:19 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m33MTG18026188; Thu, 3 Apr 2008 18:29:16 -0400 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m33MTFnr028504; Thu, 3 Apr 2008 18:29:15 -0400 Received: from hridell.englab.brq.redhat.com (hridell.englab.brq.redhat.com [10.34.32.30]) by pobox.stuttgart.redhat.com (8.13.1/8.13.1) with ESMTP id m33MTEtP002100; Thu, 3 Apr 2008 18:29:14 -0400 Date: Fri, 04 Apr 2008 08:32:00 -0000 From: Petr Machata To: Mark Wielaard Cc: Andrew Cagney , frysk Subject: Re: Put refpurposes one line for easy manpage generation. Message-ID: <20080403222914.GA25866@hridell.englab.brq.redhat.com> References: <1207230707.4284.11.camel@localhost.localdomain> <47F4E516.4070000@redhat.com> <1207232684.4284.24.camel@localhost.localdomain> <47F4EC2C.7000707@redhat.com> <1207256480.3545.14.camel@cc1341701-a.deven1.ov.home.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline In-Reply-To: <1207256480.3545.14.camel@cc1341701-a.deven1.ov.home.nl> User-Agent: Mutt/1.5.17 (2007-11-01) X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Virus-Checked: Checked by ClamAV on sourceware.org X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2008-q2/txt/msg00023.txt.bz2 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 893 On Thu, Apr 03, 2008 at 11:01:20PM +0200, Mark Wielaard wrote: > Hi Andrew, >=20 > On Thu, 2008-04-03 at 10:39 -0400, Andrew Cagney wrote: > > I'm not fluent in XML either, however I still managed to hack up the=20 > > attached (from htdocs/bugzilla). Can we do something with that? >=20 > Yes, you probably could. Note that all the rest of the manpage index > generation is done with sed. You might need to replace all of that. But > I wouldn't put too much work into it unless you really want to. It does > work pretty well as is now. While I agree xslt is the proper way, I also immediately know the sed syntax. So here goes: //{ :loop /<\/refpurpose>/b break N b loop :break s,^.*,, s,.*$,, s,\(^[[:space:]]*\|[[:space:]]*$\),,g s,[[:space:]]\+, ,g p q } Save to file and use like this: $ sed -n -f foo.sed < foo.xml --82I3+IH0IqGh5yIs Content-Type: application/pgp-signature Content-Disposition: inline Content-length: 189 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFH9Vo6T6tJy0SVQPIRAnouAJ0WVPW5xnndVn1t8B1xn1Mfz5Y5cACcDJ72 KEk8CPLJCA6f+anNHzpJ8js= =tZXl -----END PGP SIGNATURE----- --82I3+IH0IqGh5yIs--