Article View: comp.lang.perl.misc
Article #321Web page greeking tool - has anyone done this?
From: Mark
Date: Sun, 19 Oct 1997 00:00
Date: Sun, 19 Oct 1997 00:00
39 lines
2435 bytes
2435 bytes
I need to greek (replace real text with nonsense words) a few of my Web sites, so I can display examples of my work without releasing clients' proprietary information. I was thinking of using perl, since it does wonderfully with find/replace. However, I am a complete perl beginner, and thus would love to get input from some experienced folks before I re-invent the wheel or write something absolutely stupid. I need the tool to execute two major actions, I think - one for machine-coded HTML (ie docs translated from MSWord, etc) and one for hand-coded HTML (the assumption being that the formatting apporach won't alway sbe standard. For the machine-translated HTML where formtting should be standard, I need the tool to find "<p>" and "</p>" marks and change every word there to some random word from a Latin text, skipping HTML tags (anything between "<" and ">" as well as JavaScript (anything between "<script" and "</script>", the line-break sequence "<p> </p>" and (unfortunately...) anything between Cold Fusion Tags (a whole library of <CFIF></CFIF>,<CFQuery></CFQuery> and so on). For hand-coded HTML where code might use the old "<br>" instead of the "<p></p>", I'd need the tool to simple change everything to random Latin words that wasn't HTML, JavaScript, "<p> </p>", or between Cold Fusion tags. It seems like such script must be relatively easy to write, if you truly know what you are doing (which, clearly I don't) - and perhaps, considering all the Web designers out there, it's already been done. Any feedback would be greatly appreciated! Cheers, Mark
Technical Details
Message-ID:
<B06FA1F5966835ADE5@mg-20425422-56.ricochet.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1133f4,99fe3c9e07991a82,start X-Google-Attributes: gid1133f4,public X-Google-Thread: f72c1,99fe3c9e07991a82,start X-Google-Attributes: gidf72c1,public X-Google-Thread: 112333,99fe3c9e07991a82,start X-Google-Attributes: gid112333,public X-Google-Thread: 10f591,99fe3c9e07991a82,start X-Google-Attributes: gid10f591,public X-Google-Thread: fa0ae,99fe3c9e07991a82,start X-Google-Attributes: gidfa0ae,public From: Junge@supernews.com (Mark) Subject: Web page greeking tool - has anyone done this? Date: 1997/10/19 Message-ID: <B06FA1F5966835ADE5@mg-20425422-56.ricochet.net> X-Deja-AN: 282473264 Organization: . Newsgroups: comp.lang.perl.misc,comp.lang.perl.modules,comp.lang.perl.tk,de.comp.lang.perl,fr.comp.lang.perl