Re: Plain text file on web server, questions please...



Bit Twister <BitTwister@xxxxxxxxxxxxxxxx> wrote in
news:slrnf7ah3m.ukj.BitTwister@xxxxxxxxxxxxxxx:

Hello Bit Twister, nice to see you again my friend,


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
there
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.

Just for fun, create fyi.txt, head.html and tail.html files.

Wow, this looks really interesting, this is kind of like logwatch. I have
been getting plain text versions of logwatch in my email every day for
years then found out that you can get html versions too, if you like. My
version of logwatch did not have the headers for html, I had to search
out some rpm files to get the right one that had the html headers and now
I get html logwatch files in my email and it works really good. You aim
to do something of the same is what I gather. Maybe I could examine those
logwatch html header files to see how it was done for logwatch. Let's see
where those files are, shall we?

[root@ohmster ~]# locate logwatch |grep htm
/usr/share/doc/selinux-policy-2.4.6/html/admin_logwatch.html
/usr/share/logwatch/default.conf/html
/usr/share/logwatch/default.conf/html/footer.html
/usr/share/logwatch/default.conf/html/header.html
[root@ohmster ~]#

Awwww, maybe not too helpful as the only links in the logwatch file are
anchors to different sections of it and then "back to top" anchors.
Still, it is something to consider.

head.html has
<HTML>
<BODY BGCOLOR="#99CCCC" LINK="#0000FF" VLINK="#FF0000"
ALINK="#FF0000" TEXT="#000000">

<pre>

I got it, but what does the <pre> tag mean or do? I've never heard of it.


tail.html has

</pre>
</BODY>
</HTML>


That's about rigth, but this time you close the </pre> tag. What is that
<pre> tag? Did you make that up or is it a real html tag, Bit?


faq.txt has

Today's tip
For extra points, read http://tldp.org/LDP/abs/html/index.html



Right, right, go on.

Now run the command
cat head.html faq.txt tail.html > aa.html

To test, put aa.html in your browser and see if it works.

Ahhhh, yes, I see. I will try this and get back to you. Not sure about
this though as I think I would need <A href= tags. How could a header and
a footer insert such tags into a decent sized text document? I will try
it and get back to you real soon though.


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?

Well, your script just does the commands you would do by hand. You
have to figure out how to compute any variables.

I have a humor/fyi email list kinda like you do.
Instead of version I used date.
[snip]

I saved the rest but it adds to the confusion right now on how to get <a
href= tags into a text document at this moment. Will try the head, txt,
tail idea and then get back to you with the results. Thanks for your
input Bit Twister.

--
~Ohmster
ohmster at ohmster dot com
Put "messageforohmster" in message body
(That is Message Body, not Subject!)
to pass my spam filter.
.



Relevant Pages

  • Re: word webpages
    ... The ther are som tags with no closing tags DreamWeaver would remove what ever was causing these problems. ... Just create a simple document and save as HTML Make sure it has some type of formatting. ... XML all versions ...
    (microsoft.public.mac.office.word)
  • Re: macro and cl-who help
    ... Lisp, but... ... you back into the "walking forms as HTML data" mode, ... This would have been extensible with user-defined tags, ... HTML tags are macros can be functions: ...
    (comp.lang.lisp)
  • Re: html scraping
    ... Not for parsing HTML! ... DOM and SimpleXML are the right tools here. ... parser that can deal with missing end tags. ... -- If a close tag is seen, push it on the stack. ...
    (comp.lang.php)
  • Re: Volunteer work:)- new Kona Coffee Farmers site
    ... SEO is search engine optimization, which concerns itself with how well your page is indexed by Google or the other search engines. ... Good SEO involves many aspects of the page design, including well-structured HTML documents, appropriate HTML tags and tags, semantic HTML, keyword-optimized URLs, a good domain name, and copious, keyword-dense content. ...
    (alt.coffee)
  • Re: A new JavaScript tutorial(Beta)
    ... >> from HTML. ... >> two tags very well - they have awesome powers. ... >> alliance with CSS are currently posing a great threat to the other ... which is block level and to which any CSS styling can be applied. ...
    (comp.lang.javascript)