From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on finch.gentoo.org X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=DATE_IN_PAST_06_12,DMARC_NONE, INVALID_DATE,MAILING_LIST_MULTI autolearn=no autolearn_force=no version=4.0.0 Received: from one.fidnet.com ([205.216.200.51] helo=mail.fidnet.com) by cvs.gentoo.org with smtp (Exim 3.30 #1) id 15LM1I-0000KF-00 for gentoo-dev@cvs.gentoo.org; Sat, 14 Jul 2001 03:47:28 -0600 Received: (qmail 29010 invoked from network); 14 Jul 2001 09:46:28 -0000 Received: from unknown (HELO fidnet.com) (216.229.82.48) by 0 with SMTP; 14 Jul 2001 09:46:28 -0000 Message-ID: <3B5015AE.317771B9@fidnet.com> From: "Tod M. Neidt" X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.4-ac5 i686) X-Accept-Language: en MIME-Version: 1.0 To: "gentoo-dev@cvs.gentoo.org" Content-Type: multipart/mixed; boundary="------------BC2D2B99A04439B45D865728" Subject: [gentoo-dev] RFC: dohtml script Sender: gentoo-dev-admin@cvs.gentoo.org Errors-To: gentoo-dev-admin@cvs.gentoo.org X-BeenThere: gentoo-dev@cvs.gentoo.org X-Mailman-Version: 2.0 Precedence: bulk Reply-To: gentoo-dev@cvs.gentoo.org List-Help: List-Post: List-Subscribe: , List-Id: Gentoo Linux development list List-Unsubscribe: , List-Archive: Date: Sat Jul 14 03:48:01 2001 X-Original-Date: Sat, 14 Jul 2001 04:49:34 -0500 X-Archives-Salt: e7af5395-7dd0-4c22-bd1d-3dfb283f280d X-Archives-Hash: a3c9e318fa780f0c3af8efb70d72650e This is a multi-part message in MIME format. --------------BC2D2B99A04439B45D865728 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! I've been playing around with documentation ebuilds and noticed two different ways that html documentation is being merged. 1) using the dodoc script (example: gimp-1.2.1-r1.ebuild, the libgimp docs) pro: gzipped to take up less disk space con: can't follow local links 2) a straight cp (example: gimp-user-manual-2.0.ebuild) pro: can follow local links between pages con: uncompressed docs use more disk space The attached script, dohtml, is a quick and dirty implementation to gzip html docs and have your linkage too. It is a modification of the dodoc script which seds the html files and and changes the relative links from href="foo.html" to href="foo.html.gz" prior to gzipping and installation. I have only tested it on the gimp-1.2.1-r1.ebuild. The merge is fine. And it is actually functional. You can browse the local gzipped libgimpdocs. There is some mangling of the text,extra .gz's scattered about...hey I said it was quick and dirty ;), but it illustrates the concept. Is this something that would be of interest to Gentoo? If you want to give it a try change the line dodoc devel-docs/libgimp/html/*.html to dohtml devel-docs/libgimp/html/*.html in the gimp-1.2.1-r1.ebuild and copy the dohtml script to /usr/lib/portage/bin Criticism is appreciated. tod --------------BC2D2B99A04439B45D865728 Content-Type: text/plain; charset=us-ascii; name="dohtml" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dohtml" #!/bin/bash #modified from dodoc by Tod Neidt for x in "$@" do if [ -e ${x} ] then cp ${x} ${x}.orig #Edit URI html links in Anchor tags to append .gz #then go back through and undo nonlocal links #How do you icorporate a negate in first substitute :( sed -e 's/\([(HREF|href)].*[(html|htm)]\)/\1.gz/g' \ -e 's/\([(HREF|href)].*http.*[(html|htm)]\)\.gz/\1/g' \ ${x}.orig > ${x} if [ ! -d ${D}usr/share/doc/${PF} ] then install -d ${D}usr/share/doc/${PF} fi if [ -z ${DOCDESTTREE} ] then install -m0644 ${x} ${D}usr/share/doc/${PF} gzip -f -9 ${D}usr/share/doc/${PF}/${x##*/} else install -m0644 ${x} ${D}usr/share/doc/${PF}/${DOCDESTTREE} gzip -f -9 ${D}usr/share/doc/${PF}/${DOCDESTTREE}/${x##*/} fi else echo "${0}: ${x} does not exist." fi done --------------BC2D2B99A04439B45D865728--