WWWOFFLE tools

My WWWOFFLE tools. They at least work with WWWOFFLE Version 2.8.

Debian etc. users should export wwwoffle_cache=/var/cache/wwwoffle in .bash_profile.

Which of these are more debugged? The ones with higher Update Counts.

Link colors

I have won the battle of the link colors over pages that set <font>.

My wwwoffle.conf:

ModifyHTML
{
 enable-modify-html=yes
 add-cache-info=yes
 anchor-not-cached-begin=<span class="jnoc">
 anchor-requested-begin=<span class="jreq">
 anchor-cached-begin=<span class="jcac">
 anchor-not-cached-end=</span>
<?php if (isset($p)){ ?>
 anchor-requested-end=|R</span>
 anchor-cached-end=|C</span>
<?php }else{ ?>
 anchor-requested-end=</span>
 anchor-cached-end=</span>
<?php } ?>
}

(The PHP directives allow me to toggle injecting letters to show caching states for viewing on a monochrome PDA.)

My Firefox "house of cards" userContent.css (which I placed in the same deeply buried directory I found Firefox's userContent-example.css in):

a font { color: inherit !important; background: inherit !important; }
font { color: inherit !important }
a:hover { font-weight: inherit !important; }
span.jreq { color: fuchsia; text-decoration: underline; }
span.jnoc { color: red; text-decoration: underline; }
span.jcac { color: green; text-decoration: underline; }
a { background-color:white; }
/* Wikipedia: */
a.new  { background-color: silver; }
a.stub { background-color: grey; }

No I didn't try any Firefox "profiles" stuff. Yes I had WWWOFFLE reread its configuration file and restarted Firefox. If Firefox is really reading you new userContent.css then you will notice the above colors right away.

Failed POST insurance

In the script I use to call up my ISP, I have the following real life saver, as currently WWWOFFLE offers no built in protection for when your carefully typed in POST encounters a down server, etc. One merely has to move the failed O* and U* pair of files back into outgoing, and hope the server will be up next time you call. Repeat the process until one day they are back up.

set -eu #WWWOFFLE failed POSTs recourse insurance:
d=~jidanni/tmp/wwwoffle-outgoing-backup
test -d $d
find $d -type f -mtime +22 -exec mv {} /var/tmp \; #like rm
cd ${wwwoffle_cache-/var/spool/wwwoffle}/outgoing
set -- `wwwoffle-ls outgoing|
  awk '/POST/{m=$1;sub(/^O/,"U",$1);print m, $1}'`
test "$*"
cp -p $@ $d

We can also dig text out of a failed www-form-urlencoded POST with e.g.,

$ perl -MURI::Escape -pwe 'tr/+/ /; $_=uri_unescape($_); tr/\r//d'

Dan Jacobson

Last modified: 2007-02-20 23:00:50 +0800