Re: Plain text file on web server, questions please...
- From: Mark <mtaylor*@*lrim.com>
- Date: Sun, 17 Jun 2007 09:35:30 -0500
Ohmster <ohmster@xxxxxxxxxxx> wrote in
news:slrnf7af4r.cv0.ohmster@xxxxxxxxxxx:
I run a Fedora Core 6 machine 24/7 to host a few FQDNs from my homeit
cable connection and the Linux machine also acts as a firewall and
router for the home LAN. I really like this arrangement as it allows me
to access my home machine from abroad with Putty, FTP, or even Usermin
to get at my files.
I use cron and newspost to post a newsgroup FAQ twice a week to a
certain newsgroup. I like to keep a single copy of this FAQ and then
link to it where necessary, rather than have multiple copies of it
floating around that need individual attention. This FAQ is also
available 24/7 online through apache, I keep the main file in my
$HOME/scripts directory and put a symbolic link to it in my www root
directory. All of this works very well, the FAQ gets posted twice a
week and the FAQ is online all the time.
The problem is (OR at least what issue I would like to improve.) that
there are several hyperlinks in the FAQ and when reading it in any
decent newsreader, the link can be followed by a mouse click or with
simple keystrokes. Since the online FAQ is really a text document,
foobar.txt, it has no HTML tags in it to designate URL links and one
would have to copy and paste the links into a browser address bar in
order to check them out, cumbersome at best. Some people will not get
and simply ignore the links, which are pretty important.there
Since I do not want to have two copies of the FAQ (More chance for
errors and also more work to maintain.), is there any way in Linux to
automate making an HTML wrapper to throw around this text document,
strictly for online viewing that would add the HTML tags to the online
version such as <body></body>, and especially the link tags like this:
<A href="http://www.foobar.com/foobarFAQ.txt">FAQ</A>
I have been using Linux for over ten years but some of the really in
depth stuff I really am not familiar with (Just ask me what "awk" is, I
will probably tell you that it is a sound that birds make. <g>) Is
a utility that would do this or can it be done with a shell script
perhaps? All links in the text document would begin with http:// and
that is something identifiable to search for if one were to try and
script it.
Since the main text document gets posted twice weekly, I really do not
want to mess with it or mess it up, I only make changes to it when
necessary and reflect the changes in a version increase, a minor one if
all I did was to reduce the URL size to the online document as such:
Version 1.3.2 - June 17th, 2007
Version went from 1.3.1 to 1.3.2 because the URL to the file was
shortened by using a symbolic link in my web root, rather than forcing
the viewer to delve down into my public_html user directory.
Could cron be used to copy the document over prior to adding the HTML
tags right before posting and then when posting again, do the same
thing, this way that if anything changed in the FAQ, it would also be
changed in the online version as well?
Thank you all for your help, I am a bit over my head on this one.
The easiest way I see to do this, and do it correctly without any manual
work each time, is to create a script that reads the text version of the
FAQ and converts carriage returns to <BR> and wraps the hyperlinks with
the appropriate tags. Put the script as the index in your html root for
the faq. Any changes to the text file would be immediate.
It shouldn't be too hard to write that, but someone might come up with a
much easier way.
--
----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.
- Follow-Ups:
- Re: Plain text file on web server, questions please...
- From: Ohmster
- Re: Plain text file on web server, questions please...
- Prev by Date: Re: Plain text file on web server, questions please...
- Next by Date: Re: Buffer Overflow Protection.
- 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
|