[prev in list] [next in list] [prev in thread] [next in thread] 

List:       debian-devel
Subject:    Re: Bug#203498: ITP: decss -- utility for stripping CSS tags from
From:       Christoph Berg <cb () df7cb ! de>
Date:       2003-07-30 16:55:38
[Download RAW message or body]

Re: Re: Bug#203498: ITP: decss -- utility for stripping CSS tags from [Brian Nelson \
<pyro@debian.org>, Wed, Jul 30, 2003 at 09:07:19AM -0700, \
<87r848vw08.fsf@scabbers.bignachos.com>]
> "I wrote a small utility called "DeCSS" that strips Cascading Style
> Sheet tags from an HTML document. Yes, agreed, that's pretty much
> USELESS, but what the fuck. Maybe somebody wants to do that."
> 
> Why the hell should this be packaged for Debian?

If you have an HTML page generated by M$ Word and want to extract only
the HTML part, you can either remove tons of useless CSS by hand or use
such a utility... However:

It is essentially a Perl-5-liner with glue code:
    $content =~ s%<link.*?rel=\"stylesheet\".*?>%%mg; # Strip stylesheet links
    $content =~ s%<style>.*?</style>%%mg; # Strip <style> blocks
    $content =~ s%style=\".*?\"%%mg; # Strip style attributes
    $content =~ s%class=\".*?\"%%mg; # Strip class attributes
    $content =~ s%id=\".*?\"%%mg; # Strip id attributes

Doesn't this remove strings looking like CSS from ordinary text, too?

Christoph
-- 
Christoph Berg <cb@df7cb.de>, http://www.df7cb.de
Wohnheim D, 2405, Universität des Saarlandes, 0681/9657944


[Attachment #3 (application/pgp-signature)]
-- 
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic