From 0e9d7534f25777c978844c5779ecfce76700004f Mon Sep 17 00:00:00 2001 From: Tim Gerundt Date: Wed, 20 Jul 2005 21:13:29 +0000 Subject: [PATCH] PATCH: [ 1238450 ] Build script for manual at SF.net --- Docs/Developers/readme-manual.html | 24 +++++++++++++ Docs/Developers/readme.txt | 4 +++ Docs/Users/Manual/build/build.sh | 69 ++++++++++++++++++++++++++++++++++++++ Docs/Users/Manual/readme.txt | 4 +++ 4 files changed, 101 insertions(+) create mode 100644 Docs/Users/Manual/build/build.sh diff --git a/Docs/Developers/readme-manual.html b/Docs/Developers/readme-manual.html index 22b668f2b..8b55f7f51 100644 --- a/Docs/Developers/readme-manual.html +++ b/Docs/Developers/readme-manual.html @@ -11,6 +11,11 @@ border-left: 4px solid #FFCC00; border-bottom: 1px solid #FFCC00; } + h4 { + padding: 2px; + border-left: 8px solid #FF9933; + border-bottom: 1px solid #FF9933; + } pre { margin-left: 25px; margin-right: 25px; @@ -131,5 +136,24 @@ local path. Replace url in second line "http://www.oasis-open.org/docbook/ with valid path. At the moment it is:

"/usr/share/sgml/docbook/sgml-dtd-4.2-1.0-24/docbook.dtd"
+ +

Own build script

+

We have an own build script, which replace the docbook.dtd url automatically and do some other works too.

+ +

The build.sh script file is located at the build subdirectory at the Manual directory. +But before you can use it at the shell server, you must give execute rights to the file:

+
chmod +x build.sh
+ +

Now you can call the script file (from the build directory):

+
+
./build.sh html
+
Creates the HTML files under the html subdirectory at the build directory.
+
./build.sh pdf
+
Creates the PDF file under the pdf subdirectory at the build directory.
+
./build.sh txt
+
Creates the TXT file under the txt subdirectory at the build directory.
+
./build.sh
+
Is the same like ./build.sh html.
+
\ No newline at end of file diff --git a/Docs/Developers/readme.txt b/Docs/Developers/readme.txt index 6719c5be4..7688ea109 100644 --- a/Docs/Developers/readme.txt +++ b/Docs/Developers/readme.txt @@ -1,3 +1,7 @@ +2005-07-20 Tim + PATCH: [ 1238450 ] Build script for manual at SF.net + Developers: readme-manual.html + 2005-06-02 Tim RFE: [ 1017179 ] Plugin readme's as HTML? Developers: new file Plugins.html diff --git a/Docs/Users/Manual/build/build.sh b/Docs/Users/Manual/build/build.sh new file mode 100644 index 000000000..a52370ae8 --- /dev/null +++ b/Docs/Users/Manual/build/build.sh @@ -0,0 +1,69 @@ +#!/bin/sh + +html_stylesheet=../Manual-html.dsl +html_inputfile=../WinMerge_help.xml +html_outputdir=html + +pdf_stylesheet=../Manual-html.dsl +pdf_inputfile=../WinMerge_help.xml +pdf_outputdir=pdf + +txt_stylesheet=../Manual-html.dsl +txt_inputfile=../WinMerge_help.xml +txt_outputdir=txt + +function patch_inputfile { + sed -e 's/http:\/\/www\.oasis-open\.org\/docbook\/xml\/4\.2\/docbookx\.dtd/\/usr\/share\/sgml\/docbook\/sgml-dtd-4\.2-1\.0-24\/docbook\.dtd/g' "$1" > "$1.tmp" + mv "$1.tmp" "$1" +} + +function create_dir { + if ! [ -d "$1" ]; then + mkdir "$1" + fi +} + +if [ "$1" = "html" ] || [ "$1" = "" ]; then #HTML files... + create_dir $html_outputdir + + echo "Patch inputfile..." + patch_inputfile $html_inputfile + + echo "Copy images..." + create_dir $html_outputdir/images + cp ../images/*.gif $html_outputdir/images/. + + echo "Copy screenshots..." + create_dir $html_outputdir/screenshots + cp ../screenshots/*.* $html_outputdir/screenshots/. + + echo "Create HTML files..." + docbook2html -d "$html_stylesheet" -o "$html_outputdir" "$html_inputfile" + + echo "Finished!" + +elif [ "$1" = "pdf" ]; then #PDF file... + create_dir $pdf_outputdir + + echo "Patch inputfile..." + patch_inputfile $pdf_inputfile + + echo "Create PDF file..." + docbook2pdf -d "$pdf_stylesheet" -o "$pdf_outputdir" "$pdf_inputfile" + + echo "Finished!" + +elif [ "$1" = "txt" ]; then #TXT file... + create_dir $txt_outputdir + + echo "Patch inputfile..." + patch_inputfile $txt_inputfile + + echo "Create TXT file..." + docbook2txt -d "$txt_stylesheet" -o "$txt_outputdir" "$txt_inputfile" + + echo "Finished!" + +else + echo "Syntax: build [html|pdf|txt]" +fi \ No newline at end of file diff --git a/Docs/Users/Manual/readme.txt b/Docs/Users/Manual/readme.txt index 12df2ca37..d090ca707 100644 --- a/Docs/Users/Manual/readme.txt +++ b/Docs/Users/Manual/readme.txt @@ -1,3 +1,7 @@ +2005-07-20 Tim + PATCH: [ 1238450 ] Build script for manual at SF.net + Manual/build: new file build.sh + 2005-07-12 Perry Grammar fix via rewrite for /ub option Manual: Command_line.xml -- 2.11.0