Mailing List Archive

Support open source code!


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

tlug: HTML beautifier



I'm trying to find a shortcut to take the way some people's HTML looks
and transmogrify it to how I want it to look.  Specifically, they use
lowercase in all their tags, and oddly, sometimes make the attributes
uppercase.  Accordingly, this shortcut needs to:

1) Convert all alphabetic characters following a < to uppercase, until a
space or = sign is encountered.  It should not be spooked by double-byte
characters, and of course, ignore all characters other than alphabetic
ones, the = sign, or a space.

2) Convert all alphabetic characters between a set of quotation marks to
lowercase.  Again, it should not be spooked by double-byte characters,
and it should ignore all non-alphabetic characters in the string to be
converted.

3) Do the whole document in one fell swoop.

A standalone batch utility for this would be great, but if anybody knows
of an Xemacs macro that does this, that would be OK too.

If there's no such beast, I'll try to figure out how to write one
myself, and pass it along if it works.

TIA,

Jonathan Byrne
Media and Content Section
3Web - Your Internet Solution! <URL:http://www.threeweb.ad.jp/index.en.html>
3Web Channel <URL: http://www.3web.co.jp/>

--------------------------------------------------------------
Next Meeting: 8 August, Tokyo Station Yaesu central gate 12:30
featuring Linux on multiple platforms:
i386, Sparc, PA-Risc, Amiga, SGI, Alpha, PalmPilot, ...
Next Nomikai: September, 19:30 Tengu TokyoEkiMae 03-3275-3691
--------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links