]> git.donarmstrong.com Git - lilypond.git/commitdiff
Add scripts/auxiliar/cg-section.sh plus documentation
authorCarl Sorensen <c_sorensen@byu.edu>
Wed, 18 Aug 2010 16:00:59 +0000 (10:00 -0600)
committerCarl Sorensen <c_sorensen@byu.edu>
Wed, 18 Aug 2010 16:09:38 +0000 (10:09 -0600)
Documentation/contributor/doc-work.itexi
scripts/auxiliar/cg-section.sh [new file with mode: 0755]
scripts/auxiliar/doc-section.sh

index 6a9d0e0d2e3b71a0eb03d0fe778628daa1657e36..b866f2c966d081d507eabb1343228f2adf685f40 100644 (file)
@@ -1294,6 +1294,65 @@ the difficulty.
 @node Scripts to ease doc work
 @section Scripts to ease doc work
 
+@subheading Building only one section of the documentation
+
+In order to save build time, a script is available to build only
+one section of the documentation in English with a default html
+appearance.
+
+The script is available as:
+
+@example
+scripts/auxiliar/doc-section.sh
+@end example
+
+This script will require customization for your site if your
+LilyPond git repository is anyplace but @code{$HOME/lilypond}.
+
+Assuming that no customization is required, you can setup the
+single section build with:
+
+@example
+mkdir $HOME/lilypond/tempdocs
+cp $HOME/lilypond/Documentation/out/version.itexi $HOME/lilypond/tempdocs
+@end example
+
+You can then build a section of the documentation with:
+
+@example
+scripts/auxiliar/doc-section.sh MANUAL SECTION
+@end example
+
+@noindent
+where @code{SECTION} is the name of the file containing the section
+to be build, and @code{MANUAL} isc replaced by the name of the directory
+containing the section.  So, for example, to build section 1.1 of the
+Notation Reference, use the command:
+
+@example
+scripts/auxiliar/doc-section.sh notation pitches
+@end example
+
+This script will not work for building sections of the
+Contributors' guide.  For building sections of the Contributors'
+Guide, use:
+
+@example
+scripts/auxiliar/cg-section.sh SECTION
+@end example
+
+@noindent
+where @code{SECTION} is the name of the file containing the sections
+to be built.  For example, to build section 4 of the Contributors' guide,
+use:
+
+@example
+scripts/auxiliar/cg-section.sh doc-work
+@end example
+
+Like @code{doc-section.sh}, @code{cg-section.sh} may need to be customized
+for your installation.
+
 @subheading Stripping whitespace
 
 @c TODO: should this be documented elsewhere?  It's useful for
diff --git a/scripts/auxiliar/cg-section.sh b/scripts/auxiliar/cg-section.sh
new file mode 100755 (executable)
index 0000000..272260c
--- /dev/null
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+#  Build html versions of sections of lilypond Contributors' Guide
+#
+#  Usage:  cg-section.sh SECTION
+#
+#   where SECTION is the section to be built.
+#
+#   For example, CG 4 would be built by
+#       cg-section.sh doc-work
+#
+#   At the end of the run, the user is prompted whether or not to remove files
+#
+#  Before first use, the following must be done:
+#     * Set FROMDIR, DOCDIR, TODIR, LILYPONDBOOK, and TEXI2HTML for your system
+#     * Create $DOCDIR
+#     * Copy version.itexi from somewhere in your Documentation tree
+#         (probably Documentation/out) to $DOCDIR
+#
+#  Known limitations:
+#
+#     * Doesn't use website css files
+#     * Bitmap images aren't loaded properly
+#
+
+#
+#  Customize the file here
+#
+FROMDIR="$HOME/lilypond"
+DOCDIR="$HOME/lilypond/tempdocs"
+TODIR="$DOCDIR/contributor"
+TEXI2HTML="texi2html"
+REFCHECK="$FROMDIR/scripts/auxiliar/ref_check.py"
+
+NAME=$1
+
+if test ! -d $TODIR; then
+  mkdir $TODIR
+fi
+if test ! -d $TODIR/out; then
+  mkdir $TODIR/out
+fi
+
+cp $FROMDIR/Documentation/common-macros.itexi $TODIR/common-macros.itexi
+cp $FROMDIR/Documentation/macros.itexi $DOCDIR/macros.itexi
+cp $DOCDIR/version.itexi $TODIR/version.itexi
+
+if test -e $TODIR/$NAME.html; then
+  rm $TODIR/$NAME.html
+fi
+
+if test -e $TODIR/out/$NAME.texi; then
+  rm $TODIR/out/$NAME.texi
+fi
+
+echo Running RefCheck
+python $REFCHECK
+
+cd $DOCDIR
+echo Running texi2html
+cat $DOCDIR/macros.itexi $FROMDIR/Documentation/contributor/$NAME.itexi > $TODIR/$NAME.texi
+$TEXI2HTML \
+  --no-validate \
+  --output=$TODIR/out/$NAME.html \
+  --I=$FROMDIR/Documentation \
+  --I=$TODIR/out \
+  $TODIR/$NAME.texi
+
+read -p "delete files? (y/n): "
+if [ "$REPLY" = "y" ]; then
+  echo "deleting files"
+  rm -rf $TODIR
+fi
index 94c45d4a67d04021c71d44e346223dcb8cee4cd7..2957db5b380c96340f58fc7e8721e78f295e904b 100755 (executable)
@@ -24,7 +24,7 @@
 #
 #     * Doesn't use website css files
 #     * Bitmap images aren't loaded properly
-#     * Won't build Contributors' Guide
+#     * Won't build Contributors' Guide; see scripts/auxiliar/cg-section.sh
 #
 
 #