lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lynx-dev] HTML table position text injector?


From: Dan Jacobson
Subject: [Lynx-dev] HTML table position text injector?
Date: Thu, 17 Mar 2005 07:02:30 +0800

The following message is a courtesy copy of an article
that has been posted to comp.lang.perl.misc,comp.infosystems.www.authoring.html 
as well.

Gentlemen, often HTML tables meant for regular monitors become hard to
keep one's place reading when viewed on small handheld devices. So
let's insert visual clues -- letters or numbers indicating what column
we are looking at -- right into the text of the table, so the user is
sure to know what column an item was in, no matter how jumbled the
table ends up.

Let's put a,b,c,d before each bus departure time:
aNurdsburg      bTurdsburg     cNorflewitz     dBlahsville
eSoftstools       fBoogerworth     gSnitsville
 a16:20       b16:50       c17:15           d
e18:50        f19:20        g22:00
(Blahsville to boring to stop in these days.)

One might further deal with e.g., COLSPAN="3": a-c or abc.
Multi-dimensional tables: a3, c7b etc.

HTML::TableExtract, HTML::Parser is way over my head.
Anyway perhaps somebody has already made a table position text injector?

(What I did:)
$ wget -O - http://www.fybus.com.tw/bus8.htm| #[1.6MB Big5]
tr -d \\n|perl -pwe 's/<t[dhr]/\n$&/ig'|
perl -pwe '$c=ord q{a}if/<tr/i;
s/<t[dh][^>]*>(<[^t\/][^>]*>|\&nbsp\;|\s)*/$&.chr $c++/ige'
... plucker-build ... pilot-xfer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]