Re: How to convert documentation into html



Am 07.07.2011 09:50, schrieb Andrej Znidarsic:
> Hello!
> 
> I was wondering if it's possible to convert gnome documentation from
> .page files to html. We would like to use gnome documentation as a sort
> of FAQ on local user group website, since it adresses most common issues
> in clear manner.
> 
Quite simple. Put the attached Makefile into the folder where the *.page
files reside, and run "make".

Anyway, you have almost all manuals in the GNOME Documentation Library
[1]. Why do you need to convert them manually? Just link to the
library's website.

[1] http://library.gnome.org/

Cheers,
Mario
pages=$(wildcard *.page)
htmls=$(patsubst %.page,%.html,$(pages))

all: $(htmls) index.cache

index.cache : $(pages)
	echo '<cache xmlns="http://projectmallard.org/1.0/";>' > $@.in
	for page in $(pages); do \
	  echo "<page href='$$page'/>" >> $@.in; \
	done
	echo '</cache>' >> $@.in
	xsltproc `pkg-config --variable xsltdir gnome-doc-utils`/mallard/utils/mal2cache.xsl $@.in | xmllint --format - > $@
	rm $@.in

$(htmls) : index.cache
$(htmls) : %.html : %.page
	xsltproc \
	  --stringparam mal.cache.file `pwd`/index.cache \
	  --param mal.chunk.chunk_top 1 \
	  `pkg-config --variable mal2html gnome-doc-utils` $<

.PHONY: clean
clean:
	rm index.cache *.html


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]