Author: mysqlpp
Date: Fri Jan 11 10:21:54 2008
New Revision: 2118

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2118&view=rev
Log:
Created tool for userman PDF creation step to automatically find an
XSL-FO formatter instead of making you edit doc/userman/Makefile
if you're not using our default.  Currently it doesn't look anywhere
other than the defaults we previously had, but it could be so extended.

Added:
    trunk/doc/userman/fo2pdf   (with props)
Modified:
    trunk/doc/userman/Makefile
    trunk/doc/userman/README.txt

Modified: trunk/doc/userman/Makefile
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/doc/userman/Makefile?rev=2118&r1=2117&r2=2118&view=diff
==============================================================================
--- trunk/doc/userman/Makefile (original)
+++ trunk/doc/userman/Makefile Fri Jan 11 10:21:54 2008
@@ -1,15 +1,3 @@
-## ------------------------
-## Things you may need to diddle for your local system
-## ------------------------
-
-# If you've installed one of these three XSL-FO formatters but it's in a
-# different location, change this as needed.  Only one should be
-# uncommented for proper performance; by default, this is FOP.
-#AHCMD=/usr/XSLFormatterV42/run.sh
-FOPCMD=/usr/local/fop/fop
-#XEPCMD=/usr/local/xep/xep
-
-
 ## ------------------------
 ## Input files
 ## ------------------------
@@ -59,9 +47,7 @@
 
 $(PDFFILE): $(DOCFILE) $(FO_SS) $(COMMON_SS)
        xsltproc --xinclude $(FO_SS) $(DOCFILE) > $(FOFILE)
-       @if [ -n "$(FOPCMD)" ] ; then $(FOPCMD) -q -fo $(FOFILE) $(PDFFILE) ; fi
-       @if [ -n "$(AHCMD)" ] ; then $(AHCMD) -silent -d $(FOFILE) -o 
$(PDFFILE) ; fi
-       @if [ -n "$(XEPCMD)" ] ; then $(XEPCMD) -quiet $(FOFILE) ; fi
+       ./fo2pdf $(FOFILE) $(PDFFILE)
        cp $(PDFFILE) ../pdf
 
 $(HTML_DIR)/index.html: $(DOCFILE) $(EX_TXT) $(HTML_SS) $(COMMON_SS)

Modified: trunk/doc/userman/README.txt
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/doc/userman/README.txt?rev=2118&r1=2117&r2=2118&view=diff
==============================================================================
--- trunk/doc/userman/README.txt (original)
+++ trunk/doc/userman/README.txt Fri Jan 11 10:21:54 2008
@@ -38,22 +38,39 @@
     creating binary formats like PDF.
 
     The second replaceable piece in the diagram above is an XSL-FO
-    processor, which converts XSL-FO to a more directly useful
-    page layout format, like PDF.  We've chosen FOP from the Apache
-    Project (http://xml.apache.org/fop/), because it's the best of
-    the free-as-in-freedom XSL-FO processors.
+    processor, which converts XSL-FO to a more directly useful page
+    layout format, like PDF.  The user manual's build system supports
+    several alternatives.
 
-    If you'd like to try an alternative to FOP I recommend you first
-    look at RenderX's XEP, as there is a free version for non-commercial
-    use.  (http://renderx.com/download/personal.html)  If you're in a
-    commercial environment, RenderX also offers a crippled demo version
-    that's usable enough to test with.  The single-user version ($300)
-    is quite capable of formatting this manual.  Antenna House offers a
-    similar product, XSL Formatter (http://antennahouse.com/), with
-    pretty much the same price and demo restrictions as XEP.  A cheaper
-    alternative that I haven't tried (owing to the fact that it hasn't
-    been updated in a few years) is Lunasil's Xinc (lunasil.com), which
-    is available in a personal-use edition for under $100.
+    The build system relies on a simple script in this directory --
+    fo2pdf -- to find an XSL-FO formatter and run it.  It looks first
+    for RenderX's XEP, which comes in a free-as-in-beer version for
+    personal use.  (http://renderx.com/download/personal.html)  If
+    you're in a commercial environment, RenderX wants you to use their
+    commercial trial version which will format this manual without
+    complaint, but it puts watermarks and blank pages into the output.
+    They want $300 for the single-user to get clean output.  It's the
+    same as the free personal version, just with a different license.
+    You don't need the higher-end versions of XEP; they don't do
+    anything we need here.
+
+    If fo2pdf can't find XEP, it then looks for Antenna House's XSL
+    Formatter (http://antennahouse.com/).  It's pretty much the same
+    deal as XEP: crippled demo version for testing, and a single-user
+    version for $300.  There is no free version for personal use,
+    however.
+
+    Failing all that, fo2pdf falls back to the only free-as-in-speech
+    XSL-FO formmatter, Apache FOP (http://xmlgraphics.apache.org/fop/).
+    You might be wondering why this isn't the default.  It's just that
+    it's a good bet that if there's a commercial processor on the
+    system, it was put there quite purposefully by someone who paid (or
+    caused money to be paid) for it, and so wants it to be used.  The
+    commercial vendors can still get money for their products because
+    FOP hasn't caught up with them in several important areas.  That
+    said, don't feel that you need to go and buy an XSL-FO processor
+    just to build the manuals.  We try to always keep the manual in a
+    state where FOP can generate adequate output.
 
 The third replaceable piece above is the DocBook XSL stylesheet set.
 The stylesheets are the XSLT processor's rules, controlling how

Added: trunk/doc/userman/fo2pdf
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/doc/userman/fo2pdf?rev=2118&view=auto
==============================================================================
--- trunk/doc/userman/fo2pdf (added)
+++ trunk/doc/userman/fo2pdf Fri Jan 11 10:21:54 2008
@@ -1,0 +1,39 @@
+#!/bin/sh
+AHCMD=/usr/XSLFormatterV42/run.sh
+FOPCMD=/usr/local/fop/fop
+XEPCMD=/usr/local/xep/xep
+
+FOFILE=$1
+PDFFILE=$2
+if [ -n "$FOFILE" -a -r "$FOFILE" -a -n "$PDFFILE" ]
+then
+       if [ -x "$XEPCMD" ]
+       then
+               echo Rendering $FOFILE to $PDFFILE with RenderX XEP...
+               $XEPCMD -quiet -fo $FOFILE -pdf $PDFFILE
+       elif [ -x "$AHCMD" ]
+       then
+               echo Rendering $FOFILE to $PDFFILE with Antenna House XSL 
Formatter...
+               $AHCMD -silent -d $FOFILE -o $PDFFILE
+       elif [ -x "$FOPCMD" ]
+       then
+               echo Rendering $FOFILE to $PDFFILE with Apache FOP...
+               $FOPCMD -q -fo $FOFILE $PDFFILE
+       else
+               echo 'Cannot find a working XSL-FO processor on your system!  
See'
+               echo 'doc/usrman/README.txt for instructions on installing one.'
+               echo
+               exit 1
+       fi
+else
+       if [ -n "$FOFILE" ]
+       then
+               echo "XSL-FO file $FOFILE does not exist."
+               echo
+       fi
+       echo "usage: $0 fofile pdffile"
+       echo
+       echo '    Translates XSL-FO in fofile to PDF output in pdffile.'
+       echo
+       exit 1
+fi

Propchange: trunk/doc/userman/fo2pdf
------------------------------------------------------------------------------
    svn:executable = *


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to