Re: FAQ formatting

---------

Pablo Sanchez (pablo@mew.corp.sgi.com)
Mon, 27 Jan 1997 13:38:19 -0700


On Jan 27, 11:59am, FAQ Maintainers wrote:
On Jan 27, 10:34am, eijkhout@math.ucla.edu wrote:
>
> My solution so far: I keep the FAQ (for rec.arts.dance; check out
>
> [ html stuff snipped ]
>
>
I took an approach of maintaining a "source" and a "compiled" version
of my FAQ (comp.databases.sybase). My "source" is in html and can be
found at:

http://reality.sgi.com/pablo/Sybase_FAQ

I have a "make" file that "compiles" my "source" into a "text" version
(the object). My "compiler" is "lynx -dump" By taking this approach
I can use standard Unix tools like "make()" to "compile" my text
version after revving the html source.
-------------------
#!smake

#
# When adding new files, run a make src_list, followed by make
# FAQ.txt
#
# NOTE: Deletion of text files must be done manually.
#

SHELL = /bin/sh
HTML2TXT = lynx -dump

SRCDIR = ../personal/Sybase_FAQ

VPATH = $(SRCDIR)

HTML_TAR = FAQ_html.tar.Z

### Include FAQ_SOURCE
include SRC_List
###

.SUFFIXES: .html .txt

# check if a <table> directive is being used, if so, skip it...
.html.txt:
@if fgrep -isl '<table' $< ; then \
echo `basename $<`: Not converting due to table directive ;
\
echo `basename $<` >> NOT_CONVERTED ; \
else \
echo $(HTML2TXT) ../`basename $*` \> `basename $*`.txt ; \
$(HTML2TXT) $< > `basename $*`.txt ; \
fi

FAQ.compile: $(FAQ_SOURCE)
@echo "Creating $(HTML_TAR)" ; \
( cd $(SRCDIR) ; tar -cf - . ) | compress -c > $(HTML_TAR) ; \
touch $@

src_list:
@echo "FAQ_SOURCE = \\" > SRC_List ; \
for i in $(SRCDIR)/index.html $(SRCDIR)/Q*.html ; do \
echo \\t`basename $$i .html`.txt \\ >> SRC_List ; done

-- 
Pablo Sanchez              | Ph # (415) 933.3812        Fax # (415) 933.2821
pablo@sgi.com              | Pg # (800) 930.5635  -or-  pablo_p@pager.sgi.com
===============================================================================
I am accountable for my actions.   http://reality.sgi.com/pablo/Sybase_FAQ


[ 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