Re: Plain text file on web server, questions please...
- From: "s. keeling" <keeling@xxxxxxxxxxx>
- Date: Sun, 17 Jun 2007 22:55:48 GMT
Ohmster <nowayin@xxxxxxxx>:
kwan <kwan.jingx@xxxxxxxxx> wrote in news:1182097711.976586.225310
@p77g2000hsh.googlegroups.com:
You can write Perl script to generate the hyperlink from text file to
whatever you want, even the html that display on the browser.
Oh boy, perl scripting is nothing I know about, at all, but would like to
know.
In case you were serious about this, take a look at:
<http://www.spots.ab.ca/~keeling/urls.pl>
It's a very short, simple, and heavily commented perl program that I
wrote to save URLs that I find into a web page. Study the
instructions at the end of file as to its usage, then start banging
your head on the code. It takes something like:
http://someurl.com some_url
pasted at the command line and transforms it into:
<ul>
<li> Sun Jun 17 16:43:54 MDT 2007<br>
<a href="http://someurl.com">some_url</a>
</li>
otherwise known as an itemized list. The next time you run it, it'll
stick the new entry after the last one. It can handle multiple lines
as long as you only grab up to the last character on the last line:
http://someurl.com some_url
http://someurl.com some_url
http://someurl.com some_url
giving:
<li> Sun Jun 17 16:51:37 MDT 2007<br>
<a href="http://someurl.com">some_url</a><br>
<a href="http://someurl.com">some_url</a><br>
<a href="http://someurl.com">some_url</a>
</li>
It should give you a basic introduction to perl's text processing
abilities. I'll warn you though, perl's powerful, but deep. Nobody
learns it in a day.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
.
- Follow-Ups:
- Re: Plain text file on web server, questions please...
- From: Ohmster
- Re: Plain text file on web server, questions please...
- References:
- Prev by Date: Re: Plain text file on web server, questions please...
- Next by Date: Re: Plain text file on web server, questions please...
- Previous by thread: Re: Plain text file on web server, questions please...
- Next by thread: Re: Plain text file on web server, questions please...
- Index(es):
Relevant Pages
|