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

Re: html2wml



Jan Ulrich Hasecke <juh@pironet.de> writes:

Hi Jan,

the following Perl-Script removes the <head>-area. As I don't know the
syntax of the description and keywords tags I didn't implement that
part of your request. But this should give you another motivation for
learning Perl  ...  ;-)

Cheers,
Fritz


---- cut below this line ----
#! /usr/bin/env perl

undef $/;		 # undef line separator (one read gets the whole file)

$_ = <>;		 # read file specified on command line or from stdin
s|<head>.*</head>||sig;  # remove all <head>-areas (case insensitive)
print;			 # print out what's left	
exit 0;			 # done
---- cut above this line ----

The #!-line should work on most Unix systems. Alternatively, you can
specify the path to your perl interpreter. I don't know how to do this
on non-Unix systems.



> Hello,
> 
> a very tedious work is the reorganization of old sites into
> a wml-generated.
> 
> Is there a skript which converts html-files into wml-files? It
> should cut away all inside the <head>-area leaving the body
> untouched and should convert the <keywords> and <description> tags
> either into a <keywords "foo, bar"> - construction, 
> or directly into an info-tag. 
> 
> Ciao!
> juh
> 
> -- 
> juh's Sudelbuch
> Literatur und Satire per E-Mail
> http://www.sudelbuch.de
> 
> 
> ______________________________________________________________________
> Website META Language (WML)                www.engelschall.com/sw/wml/
> Official Support Mailing List                   sw-wml@engelschall.com
> Automated List Manager                       majordomo@engelschall.com
> 

-- 
Dr. Fritz Zaucker, Head IT Support Group
Department of Electrical Engineering,  Federal Institute of Technology
ETZ J97, Gloriastrasse 35, 8092 Zurich, Switzerland
Tel.: +41-1-632-5241 Fax: +41-1-632-1194 http://ee-staff.ethz.ch/~zaucker/
E-mail: zaucker@ee.ethz.ch (see home page for PGP key)
______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com