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

List:       privoxy-developers
Subject:    [privoxy-devel] sed script to adapt templates to non CSS capable
From:       Martin Steigerwald <Martin () lichtvoll ! de>
Date:       2007-04-20 19:00:42
Message-ID: 200704202100.47027.Martin () lichtvoll ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Please CC to my as I am not subscribed to the mailing list...


Hi!

I am currently writing an Amiga-Magazin (http://www.amiga-magazin.de) 
article about Privoxy and found an easy way to adapt the CSS based 
templates for Privoxy to be enjoyable on non CSS based browsers.

See for yourself the original templates versus the adapted ones.

http://martin-steigerwald.de/privoxy-templates/IBrowse2.4-original-templates.png

http://martin-steigerwald.de/privoxy-templates/IBrowse2.4-adapted-templates.png

Basically the adaption is done by running a simple sed script over them

---------------------------------------------------------------------
s/<body/<body bgcolor="#ffffff"/g
s/<td class="title"/<td class="title" bgcolor="#dddddd"/g
s/<td class="box"/<td class="box" bgcolor="#eeeeee"/g
s/<td class="info"/<td class="info" bgcolor="#ccccff"/g
s/<td class="warning"/<td class="warning" bgcolor="#ffdddd"/g
s/<td class="status"/<td class="status" bgcolor="#ffaaaa" fontsize="+2"/g
s/<div class="title"/<div class="title" bgcolor="#dddddd"/g
s/<div class="box"/<div class="box" bgcolor="#eeeeee"/g
s/<div class="info"/<div class="info" bgcolor="#ccccff"/g
s/<div class="warning"/<div class="warning" bgcolor="#ffdddd"/g
s/<div class="status"/<div class="status" bgcolor="#ffaaaa" 
fontsize="+2"/g
---------------------------------------------------------------------

Like this:

sed -f sed-script -i templates/*

Here you can find the script:
http://martin-steigerwald.de/privoxy-templates/

I do not propose to change the common templates to work without CSS 
browsers... but maybe this simple sed script could be included with a 
little documentation on how to use it.

It can even be run within AmigaOS itself using an Amiga port of "sed":

http://aminet.net/search?query=sed-4.1.4

(I tried the 68k version for an E-UAE hosted AmigaOS 3.9 installation ;-)

For now the div's do not seem to be used in the templates and I know once 
you use div's except tables for the layout, non CSS capable browsers are 
basically out of the game. But upto then above sed script adds quite some 
convenience for Amiga users. ;-)

So what do you think?

Regards,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

[Attachment #5 (application/pgp-signature)]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Ijbswa-developers mailing list
Ijbswa-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ijbswa-developers


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

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