I looked everywhere for code that would take multiple text files and do a
simple conversion on them and add them to a webpage. I ended up writing one
myself.
The premise is simple, I needed a way for the monkeys hitting the keys to
easily add to the company webpage news section. Writing HTML was DEFINATELY
out, so I have them create simple text file in windows notepad and save it to a
share drive.
The code looks at the share drive, gets the filenames, reads each file and
formats the text - All on the fly.
NEATO FEATURES:
-Totally self-maintaining: Instantly reads new news on the fly and when the
monkeys want it off the news section, they just delete the text file.
-By using the ls command with -t, it automatically puts the newest news item
first, without a ton of extra code. Also, ls allows you to look at multiple
extensions and directories at the same time.
-It can read from any mounted drive: works with Novell, Samba, NFS, Apple..
text file format (I used):
DEPARTMENT
(space)
TITLE
(space)
NEWS (multiple lines are fine)