help2html - README ------------------ WHAT IT IS: help2html is a fairly complex perl script which converts a set of help files from just about any EW-too style talker into a pre-formatted webpage. It was written for PG+ 1.0.11, but will work on all previous versions of PG+, as well as PG96, Summink, etc. As long as the help files are in the same format, it will work on just about anything! WHAT YOU GET: After running the script, you'll end up with 3 html files. One is a copy of the help files, formatted for the web. By formatted, I mean that dynatext is converted to a hard-coded string, color codes are webified, and any < and > signs are converted so that HTML doesn't mistake them for tags. (Note, if you don't have color or dynatext in your help files, the perl script will simply skip over them.) The second is a table of contents, which is a list of all the commands in the help file(s). Each word in this list is a link to the specific section on the first html file. The third is just a simple page that puts the first two into frames. You can have all 3 of these pages set to whatever color scheme you want, as well as the talker name, email address, etc. BEFORE YOU CONTINUE... As of late, I've been churning out a lot of code for PG+ talkers. In every bit of code I produce, I put some sort of disclaimer saying I'm not responsible if it breaks something, and that I won't help people who don't have serious bugs or whatever in something I've written. And still, I get people coming to me all the time saying, "Hey, I tried to install your <whatever> code, and it didn't work. Can you login to my shell and fix it for me?". I've been as polite and as helpful as I can, but there comes a point when it gets to be too much. So, if you have the intention of asking me this question, or any similar to it, don't be surprised in the least when I reply with "No. Get lost.". If you're going to ask me for help, then at least have some sort of idea what the hell you're talking about; tell me what you did, what the software did (or didn't) do, and include any error messages you got. Even then, don't expect me to help, unless you're willing to compensate me with money or sex. =) A QUICK NOTE TO PERL GURUS: This is only my second script. ;) If things are done a bit strangely, or verbosely, that's why. And I first learned C, which explains the indenting. If anyone has a faster/better way to do it, please let me know, and I'll be happy to credit you with the changes. Speaking of which, thanks to Ben Charlton for the advice on opendir. HOW TO RUN IT: Step 1: Copy the script to your top directory. Simply put, type: cp help2html.pl ~ Step 2: Edit the script. Open it using whatever text editor you prefer, and right away you'll notice a section marked off with lines which look like this: #**!**!**!**!**!**!**!**!**! Check the variables in between the lines, to see if they need to be changed. Some of them are optional, others are not. For $HELPDIR and $HTMLDIR, make sure you have the / on the end. It's important. On line 59, there's another chunk of variables that need to be edited. Change these, exit the text editor, and you're ready to go! Step 3: Make sure the file is executable by typing: chmod +x help2html.pl Step 4: Run the script by typing either: help2html.pl or ./help2html.pl, depending on your system. Step 5: CHECK EVERYTHING! Here are a couple of problems I've found so far: - If you do something like this: ^R^Kthis text should be red and blinking^N (perfectly legal) It will turn out like this: <font color="FF0000"><b>this text... </b> (causes color bleed) - in the TOC, the link for < sometimes shows up as <</a>. Easily fixed - manually take out the </a>. That's not good practice, but it will work. And that's that. Good luck! Will Fischer - stratocaster@notnet.co.uk September 9th, 2001