Converting a FAQ to HTML

---------

Frederic Albrecht (fred@calvacom.fr)
Wed, 24 May 1995 09:01:46 +0200 (MET DST)


There was a short thread here last week about converting a file to HTML.
Since I want my file to be available on the Web, I took a look at
what was available but could find nothing that really suited my needs so
I wrote a small Perl script to handle the conversion.

Since my needs where specific it does a bit more than a simple
conversion. The format it starts with is the Emacs outline format (Which
defines section titles with a "*" at the beginning of the line,
subsections with "**" and so on...). The outline format lets me sort the
sections alphabetically and I wanted something that could handle the
section numbering.

Given an outline file, it creates 4 files with the following extensions :
.faq A textfile with the *'s removed and all the sections numbered
.toc An idented table of contents that can then be pasted in the .faq
file (I found no way of automating this)
.html A HTML version of the text file with each URL transformed into a link
Each section title is tagged for hypertext access from the table of
contents.
.html.toc A HTML version of the table of contents with links to access
each section title. This file has to be inserted in the .html
file (there again I found no way of automating this)

I don't know if this thing can be of use to someone else... but if it is
I can post it here.

Fred.
-----------------------------------------------------------------------------
This text is entirely made of the freshest hand picked electrons
I speak for no one except me and my cat.
---------------------------------- Linux ------------------------------------



[ Usenet Hypertext FAQ Archive | Search Mail Archive | Authors | Usenet ]
[ 1993 | 1994 | 1995 | 1996 | 1997 ]

---------

faq-admin@landfield.com

© Copyright The Landfield Group, 1997
All rights reserved