diff -Nru yelp-tools-3.10.0/ChangeLog yelp-tools-3.12.1/ChangeLog --- yelp-tools-3.10.0/ChangeLog 2013-09-23 18:05:34.000000000 +0000 +++ yelp-tools-3.12.1/ChangeLog 2014-04-13 13:36:42.000000000 +0000 @@ -1,3 +1,297 @@ +commit 24af2bcafb770cb9aa2764ea59fd43075cce509b +Author: Shaun McCance +Date: Tue Mar 25 10:08:55 2014 -0400 + + yelp-check: Return non-zero for broken hrefs + + https://bugzilla.gnome.org/show_bug.cgi?id=726763 + + tools/yelp-check.in | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +commit eefe1acf4a4f2b7559f058675b9305cd6f5b6b51 +Author: Shaun McCance +Date: Mon Mar 24 22:31:46 2014 -0400 + + Version 3.12.0 + + NEWS | 4 ++++ + configure.ac | 2 +- + 2 files changed, 5 insertions(+), 1 deletions(-) + +commit f928d5aadc9e7862cef04d1d5f363b19354a6177 +Author: Shaun McCance +Date: Mon Feb 3 13:30:09 2014 -0500 + + Version 3.11.5 + + NEWS | 9 +++++++++ + configure.ac | 2 +- + 2 files changed, 10 insertions(+), 1 deletions(-) + +commit 1a33cbeb6090cc879c5c2a6ccdcc872e9ce99a92 +Author: Shaun McCance +Date: Mon Feb 3 11:09:37 2014 -0500 + + yelp-build: Add option to ignore missing media files + + tools/yelp-build.in | 18 ++++++++++++++++-- + 1 files changed, 16 insertions(+), 2 deletions(-) + +commit 3b3eeaa2507bfa2a044cb022e2dd43c39b515e7c +Author: Shaun McCance +Date: Mon Feb 3 10:33:50 2014 -0500 + + Support e:mouseover and ui(x):thumb equally in all tools + + xslt/mal-files.xsl | 26 ++++++-------------------- + xslt/media.xsl | 3 ++- + 2 files changed, 8 insertions(+), 21 deletions(-) + +commit a4b1ac7e764d1a0de861592422d5043e051c3688 +Author: Shaun McCance +Date: Mon Feb 3 10:27:28 2014 -0500 + + yelp-build: Added -p option for fallback path for files + + Especially when doing translations, it's common to have only some + of the source files in the current directory, and for the rest to + just live untranslated in another directory. This makes it much + easier to use yelp-build for that case, without manually copying + or linking files first. + + tools/yelp-build.in | 58 +++++++++++++++++++++++++++++++++++++++++++++----- + 1 files changed, 52 insertions(+), 6 deletions(-) + +commit 960e74869e67ec49d6c8fc3d12635e8906205172 +Author: Shaun McCance +Date: Sun Feb 2 14:28:16 2014 -0500 + + yelp.m4: Use AS_HELP_STRING instead of AC_HELP_STRING, #709657 + + tools/yelp.m4 | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +commit 6a26ba9b486a0dfb86afdcb6e8a450ee8dc3dd06 +Author: Shaun McCance +Date: Sun Feb 2 14:23:12 2014 -0500 + + Set LC_ALL instead of LANG for awk, #709354 + + tools/yelp-build.in | 4 ++-- + tools/yelp-check.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +commit ddee793ab2f2ff7366ef2bdde79ebb44e2395b55 +Author: Shaun McCance +Date: Sun Feb 2 14:02:24 2014 -0500 + + yelp-check: Added check for missing media files + + tools/yelp-check.in | 43 ++++++++++++++++++++++++++++++++++++++++++- + xslt/Makefile.am | 3 ++- + xslt/media.xsl | 44 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 88 insertions(+), 2 deletions(-) + +commit 34c6ceca3967fd845b8a42f4fe54309073273d4b +Author: Shaun McCance +Date: Wed Jan 29 13:21:52 2014 -0500 + + yelp-check: Added tool to check Mallard page licenses + + tools/yelp-check.in | 82 ++++++++++++++++++++++++++++++++++++++++ + xslt/Makefile.am | 1 + + xslt/mal-license.xsl | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 185 insertions(+), 0 deletions(-) + +commit 5ba2a0d240b84ac66a386b06bdcc21fc3101c68c +Author: Shaun McCance +Date: Mon Dec 16 14:35:45 2013 -0500 + + Version 3.11.3 + + NEWS | 4 ++++ + configure.ac | 2 +- + 2 files changed, 5 insertions(+), 1 deletions(-) + +commit 0929f449089044bbc05af54668f1c4c254b9a15c +Author: Christian Persch +Date: Sun Nov 24 23:20:53 2013 +0100 + + yelp.m4: Add no-lc-dist option + + Add no-lc-dist option to disable disting the generated lc files. Disabled by + default for backwards compatibility. + + https://bugzilla.gnome.org/show_bug.cgi?id=672919 + + tools/yelp.m4 | 8 ++++++-- + 1 files changed, 6 insertions(+), 2 deletions(-) + +commit 4c6c5bab66c7fe0ad419ff573cd65b6bb0ec8002 +Author: Christian Persch +Date: Sun Nov 24 23:12:30 2013 +0100 + + yelp.m4: Prepare for multiple options case + + Bug #672919. + + tools/yelp.m4 | 18 +++++++++--------- + 1 files changed, 9 insertions(+), 9 deletions(-) + +commit ba22301c3cc8e5d5e34a7c29a81838fab0de3467 +Author: Shaun McCance +Date: Tue Nov 19 17:32:50 2013 -0500 + + Version 3.11.2 + + NEWS | 5 +++++ + configure.ac | 2 +- + 2 files changed, 6 insertions(+), 1 deletions(-) + +commit 91f56fff8487aac2ef65265f7c95737525ee7340 +Author: Shaun McCance +Date: Tue Nov 19 09:18:54 2013 -0500 + + yelp.m4: Added no-lc-media-links option for YELP_HELP_INIT + + This replaces the HELP_MEDIA_NODUPS variable I'd previously + introduced with a global parameter. It's a bit less flexible, + but much less ugly. + + tools/yelp.m4 | 18 ++++++++++++++++-- + 1 files changed, 16 insertions(+), 2 deletions(-) + +commit 36358621dfd7428e67c9e1b744a74afb89067271 +Author: Shaun McCance +Date: Mon Nov 18 23:50:56 2013 -0500 + + Revert "Added HELP_MEDIA_NODUP and YELP_INIT_HELP" + + This reverts commit 2e63c1ae0f1bad71c6d7b9bf328f919e6372e719. + Going to do an option to YELP_HELP_INIT instead. + + .gitignore | 1 - + configure.ac | 6 +- + tools/Makefile.am | 2 +- + tools/yelp.m4 | 195 +++++++++++++++++++++++++++++++++++++++++++ + tools/yelp.m4.in | 237 ----------------------------------------------------- + 5 files changed, 197 insertions(+), 244 deletions(-) + +commit df25cfbba44232464b4219ec276a3faf476dfb3a +Author: Shaun McCance +Date: Mon Nov 18 10:28:20 2013 -0500 + + Version 3.11.1 + + NEWS | 12 ++++++++++++ + 1 files changed, 12 insertions(+), 0 deletions(-) + +commit 2e63c1ae0f1bad71c6d7b9bf328f919e6372e719 +Author: Shaun McCance +Date: Mon Nov 18 09:57:49 2013 -0500 + + Added HELP_MEDIA_NODUP and YELP_INIT_HELP + + HELP_MEDIA normally craetes symlinks for localized copies that don't + exist, but for images this isn't actually necessary. Yelp can load + according to the document path. Don't want to break API on HELP_MEDIA + because people use it for a few other things. Hence, HELP_MEDIA_NODUP + which works just like HELP_MEDIA, except no symlinks on install. + + Also, if you use HELP_MEDIA_NODUP and somebody builds with an older + yelp.m4, the files are just silently ignored. Added YELP_INIT_HELP + to replace YELP_HELP_INIT (though YELP_HELP_INIT is not currently + deprecated), and YELP_INIT_HELP is stingy about checking minimum + version. + + .gitignore | 1 + + configure.ac | 6 +- + tools/Makefile.am | 2 +- + tools/yelp.m4 | 195 ------------------------------------------- + tools/yelp.m4.in | 237 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 244 insertions(+), 197 deletions(-) + +commit 69014c0374ae8acbc0c93b3d43f28264791dca75 +Author: Shaun McCance +Date: Sat Nov 2 11:07:15 2013 -0400 + + yelp-build: Better Mallard templates to determine files to copy + + Instead of a second run using a stripped down stylesheet, we now use + the primary stylesheet, which gives us access to the same logic of + which elements to process, including conditional processing. + + Fixes https://bugzilla.gnome.org/show_bug.cgi?id=709951 + + tools/yelp-build.in | 98 +++------------------ + xslt/Makefile.am | 1 + + xslt/mal-files.xsl | 249 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 261 insertions(+), 87 deletions(-) + +commit e414c6afd3f2e20992ad489b07ea512dadd31f81 +Author: Michael Biebl +Date: Thu Oct 17 00:18:44 2013 +0200 + + Fix posix shell syntax error + + https://bugzilla.gnome.org/show_bug.cgi?id=710331 + + tools/yelp-check.in | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +commit db63d86f7f1e5c9c45e40ae6fdfaaa452ad1cc42 +Author: Shaun McCance +Date: Sun Oct 27 11:35:56 2013 -0400 + + yelp-check: Use a plain string instead of read for inline xsl + + tools/yelp-check.in | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +commit c91c94ab9ba80ce5a552e3a255ad097ec1097b1e +Author: Shaun McCance +Date: Sat Oct 26 16:52:36 2013 -0400 + + yelp-new: Be smarter about file paths + + At Kat's request, you can now specify an output in a directory + other than the cwd, and yelp-new is smart about figuring out + whether to add extensions. Also, when specifying a local path + for templates, yelp-new is smarter about extensions. + + tools/yelp-new.in | 39 ++++++++++++++++++++++++++++++++------- + 1 files changed, 32 insertions(+), 7 deletions(-) + +commit 3cf0f375c3e5158539fe9047bf41cbdb839b2fbf +Author: Shaun McCance +Date: Sat Oct 26 14:17:02 2013 -0400 + + yelp-check: Support validate on DocBook 5 documents + + tools/yelp-check.in | 38 +++++++++++++++++++++++++++++++++++++- + 1 files changed, 37 insertions(+), 1 deletions(-) + +commit 41ecb1992c6a632eaa10968639d435542fe4eff9 +Author: Shaun McCance +Date: Wed Oct 23 23:26:50 2013 -0400 + + yelp-check: Support explicitly allows namespaces in strict validation + + tools/yelp-check.in | 12 +++++++++++- + xslt/mal-rng.xsl | 21 +++++++++++++++++++++ + 2 files changed, 32 insertions(+), 1 deletions(-) + +commit 669cefc096b8c9566258480926a849d8bb3a21da +Author: Shaun McCance +Date: Mon Sep 23 14:06:25 2013 -0400 + + Version 3.10.0 + + NEWS | 4 ++++ + configure.ac | 2 +- + 2 files changed, 5 insertions(+), 1 deletions(-) + commit cc781f1f1f0a51bdb5814bba58459a264e38b106 Author: Shaun McCance Date: Mon Aug 19 17:17:09 2013 -0400 diff -Nru yelp-tools-3.10.0/configure yelp-tools-3.12.1/configure --- yelp-tools-3.10.0/configure 2013-09-23 18:05:29.000000000 +0000 +++ yelp-tools-3.12.1/configure 2014-04-13 13:36:37.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.66 for yelp-tools 3.10.0. +# Generated by GNU Autoconf 2.66 for yelp-tools 3.12.1. # # Report bugs to . # @@ -552,8 +552,8 @@ # Identity of this package. PACKAGE_NAME='yelp-tools' PACKAGE_TARNAME='yelp-tools' -PACKAGE_VERSION='3.10.0' -PACKAGE_STRING='yelp-tools 3.10.0' +PACKAGE_VERSION='3.12.1' +PACKAGE_STRING='yelp-tools 3.12.1' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=yelp-tools' PACKAGE_URL='' @@ -1194,7 +1194,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yelp-tools 3.10.0 to adapt to many kinds of systems. +\`configure' configures yelp-tools 3.12.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1260,7 +1260,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yelp-tools 3.10.0:";; + short | recursive ) echo "Configuration of yelp-tools 3.12.1:";; esac cat <<\_ACEOF @@ -1341,7 +1341,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yelp-tools configure 3.10.0 +yelp-tools configure 3.12.1 generated by GNU Autoconf 2.66 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1358,7 +1358,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yelp-tools $as_me 3.10.0, which was +It was created by yelp-tools $as_me 3.12.1, which was generated by GNU Autoconf 2.66. Invocation command line was $ $0 $@ @@ -2173,7 +2173,7 @@ # Define the identity of the package. PACKAGE='yelp-tools' - VERSION='3.10.0' + VERSION='3.12.1' cat >>confdefs.h <<_ACEOF @@ -3226,7 +3226,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yelp-tools $as_me 3.10.0, which was +This file was extended by yelp-tools $as_me 3.12.1, which was generated by GNU Autoconf 2.66. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3279,7 +3279,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yelp-tools config.status 3.10.0 +yelp-tools config.status 3.12.1 configured by $0, generated by GNU Autoconf 2.66, with options \\"\$ac_cs_config\\" diff -Nru yelp-tools-3.10.0/configure.ac yelp-tools-3.12.1/configure.ac --- yelp-tools-3.10.0/configure.ac 2013-09-23 18:05:21.000000000 +0000 +++ yelp-tools-3.12.1/configure.ac 2014-04-13 13:36:29.000000000 +0000 @@ -1,4 +1,4 @@ -AC_INIT([yelp-tools], [3.10.0], +AC_INIT([yelp-tools], [3.12.1], [http://bugzilla.gnome.org/enter_bug.cgi?product=yelp-tools]) AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-bzip2]) diff -Nru yelp-tools-3.10.0/debian/changelog yelp-tools-3.12.1/debian/changelog --- yelp-tools-3.10.0/debian/changelog 2013-10-16 22:48:13.000000000 +0000 +++ yelp-tools-3.12.1/debian/changelog 2015-02-21 21:57:20.000000000 +0000 @@ -1,3 +1,24 @@ +yelp-tools (3.12.1-1~ubuntu14.04.1) trusty-backports; urgency=medium + + * No-change backport to trusty (LP: #1411093) + + -- Felix Geyer Sat, 21 Feb 2015 22:57:20 +0100 + +yelp-tools (3.12.1-1) unstable; urgency=medium + + * New upstream release. + * Bump Standards-Version to 3.9.5 + + -- Andreas Henriksson Fri, 23 May 2014 12:55:39 +0200 + +yelp-tools (3.12.0-1) unstable; urgency=medium + + * New upstream release. + * Drop debian/patches/0001-Fix-posix-shell-syntax-error.patch + - merged upstream. + + -- Andreas Henriksson Fri, 04 Apr 2014 21:15:11 +0200 + yelp-tools (3.10.0-1) unstable; urgency=low * New upstream release. diff -Nru yelp-tools-3.10.0/debian/control yelp-tools-3.12.1/debian/control --- yelp-tools-3.10.0/debian/control 2013-10-16 22:49:09.000000000 +0000 +++ yelp-tools-3.12.1/debian/control 2014-05-23 10:57:00.000000000 +0000 @@ -16,7 +16,7 @@ xsltproc (>= 1.1.8), yelp-xsl, itstool -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Vcs-Svn: svn://anonscm.debian.org/pkg-gnome/desktop/unstable/yelp-tools Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/yelp-tools diff -Nru yelp-tools-3.10.0/debian/control.in yelp-tools-3.12.1/debian/control.in --- yelp-tools-3.10.0/debian/control.in 2013-10-16 22:11:31.000000000 +0000 +++ yelp-tools-3.12.1/debian/control.in 2014-05-23 10:56:37.000000000 +0000 @@ -11,7 +11,7 @@ xsltproc (>= 1.1.8), yelp-xsl, itstool -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Vcs-Svn: svn://anonscm.debian.org/pkg-gnome/desktop/unstable/yelp-tools Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-gnome/desktop/unstable/yelp-tools diff -Nru yelp-tools-3.10.0/debian/patches/0001-Fix-posix-shell-syntax-error.patch yelp-tools-3.12.1/debian/patches/0001-Fix-posix-shell-syntax-error.patch --- yelp-tools-3.10.0/debian/patches/0001-Fix-posix-shell-syntax-error.patch 2013-10-16 22:47:06.000000000 +0000 +++ yelp-tools-3.12.1/debian/patches/0001-Fix-posix-shell-syntax-error.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -From d04617cdee047e6d101346f8f02f4448f5f9d4b8 Mon Sep 17 00:00:00 2001 -From: Michael Biebl -Date: Thu, 17 Oct 2013 00:18:44 +0200 -Subject: [PATCH] Fix posix shell syntax error - ---- - tools/yelp-check.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/tools/yelp-check.in b/tools/yelp-check.in -index 7498012..c66c46d 100755 ---- a/tools/yelp-check.in -+++ b/tools/yelp-check.in -@@ -252,7 +252,8 @@ yelp_hrefs () { - } - - yelp_ids_page () { -- pageid=$(( -+ pageid=$( -+ ( - echo '&2 } yelp_usage_html () { @@ -130,6 +133,8 @@ echo " -c CACHE Use the existing Mallard cache CACHE" echo " -o OUT Output files in the directory OUT" echo " -x CUSTOM Import the custom XSLT file CUSTOM" + echo " -p PATHS Extra paths to search for files" + echo " -i Ignore missing media files" ) 1>&2 } @@ -138,6 +143,12 @@ exit 1 fi +yelp_paths_normalize () { + for path in $(echo "$1" | sed -e 's/[: ]/\n/g'); do + (cd "$path" && pwd) + done | tr '\n' ' ' +} + yelp_cache_in () { echo '' @@ -179,7 +190,8 @@ yelp_usage_cache exit 1 fi - yelp_cache_in "$@" | xsltproc --xinclude -o "$cache_out" "$xsl_mal_cache" - + yelp_cache_in "$@" | xsltproc --path "$html_paths" \ + --xinclude -o "$cache_out" "$xsl_mal_cache" - } yelp_html_xsl_common () { @@ -259,7 +271,7 @@ echo '' yelp_html_xsl_common echo '' - ) | xsltproc --xinclude -o "$html_out"/ - "$xml" + ) | xsltproc --path "$html_paths" --xinclude -o "$html_out"/ - "$xml" # Copy media if [ "x$xmldir" != "x$html_out" ]; then ( @@ -277,12 +289,26 @@ echo ' ' echo '' echo '' - ) | xsltproc --xinclude - "$xml" | while read media; do + ) | xsltproc --path "$html_paths" --xinclude - "$xml" | while read media; do mfile=`echo "$media" | urldecode` minput="$xmldir/$mfile" moutput="$html_out/$mfile" mkdir_p `dirname "$moutput"` - cp "$minput" "$moutput" + if [ ! -f "$minput" -a "x$html_paths" != "x" ]; then + if [ $(expr index "$minput" "$(pwd)/") = 1 ]; then + minput_rel=$(expr substr "$minput" \ + $(expr length "$(pwd)//") $(expr length "$minput")) + for path in $html_paths; do + if [ -f "$path/$minput_rel" ]; then + minput="$path/$minput_rel" + break + fi + done + fi + fi + if [ -f "$minput" -o "x$html_ignore_media" != "x1" ]; then + cp "$minput" "$moutput" + fi done fi # Copy icons @@ -311,7 +337,7 @@ echo ' ' echo '' echo '' - ) | xsltproc --xinclude - "$xml" | sort | uniq | while read icon; do + ) | xsltproc --path "$html_paths" --xinclude - "$xml" | sort | uniq | while read icon; do cp "${yelp_icon_dir}/${icon}.png" "$html_out/$html_internal_datadir" done; # Copy jQuery @@ -341,7 +367,7 @@ echo ' ' echo '' echo '' - ) | xsltproc --xinclude - "$xml" | sort | uniq \ + ) | xsltproc --path "$html_paths" --xinclude - "$xml" | sort | uniq \ | grep '^contents syntax ' | sed -e 's/^contents syntax brush-/brush./' \ | while read js; do cp "${yelp_js_dir}/jquery.syntax.${js}.js" "$html_out/$html_internal_datadir" @@ -375,99 +401,28 @@ xsl='file://'`echo "$xsl_mal2html" | urlencode` fi echo '' + echo '' + echo '' yelp_html_xsl_common html_cache_url='file://'`echo "$html_cache_file" | urlencode` echo '' echo '' echo '' + echo '' echo '' echo '' + echo '' + echo ' ' + echo '' echo '' echo '' echo '' echo '' - ) | xsltproc $html_profile --xinclude -o "$html_out"/ - "$html_tmp_infile" - ( - echo '' - xsl='file://'`echo "$xsl_mal2xhtml" | urlencode` - echo '' - echo '' - echo '' - echo ' ' - echo ' ' - echo ' ' - echo ' /' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo '' - echo '' - echo '' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - # Media - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - # Syntax highlighting - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo ' ' - echo ' +'"${yelp_js_dir}"'/jquery.syntax.brush.' - echo ' ' - echo ' .js ./ ' - echo ' ' - echo ' ' - # Icons - echo ' ' - echo ' ' - echo ' ' - # echo ' ' - # echo ' +'"${yelp_icon_dir}"'/yelp-note-advanced.png ./ ' - # echo ' ' - echo ' ' - echo ' +'"${yelp_icon_dir}"'/yelp-note-bug.png ./ ' - echo ' ' - echo ' ' - echo ' +'"${yelp_icon_dir}"'/yelp-note-important.png ./ ' - echo ' ' - echo ' ' - echo ' ' - echo ' +'"${yelp_icon_dir}"'/yelp-note-tip.png ./ ' - echo ' ' - echo ' ' - echo ' +'"${yelp_icon_dir}"'/yelp-note-warning.png ./ ' - echo ' ' - echo ' ' - echo ' +'"${yelp_icon_dir}"'/yelp-note.png ./ ' - echo ' ' - echo ' ' - echo ' ' - echo '' - echo '' - echo '' - ) | xsltproc --xinclude - "$html_tmp_infile" | sort | uniq | + ) | (cd "$html_out" && xsltproc $html_profile \ + --path "$html_paths" --xinclude \ + --stringparam mal.files.copy.icon.dir "$yelp_icon_dir" \ + --stringparam mal.files.copy.js.dir "$yelp_js_dir" \ + - "$html_tmp_infile") | sort | uniq | \ while read line; do use_internal_datadir=`expr substr "$line" 1 1` line=`expr substr "$line" 2 1000` @@ -478,18 +433,27 @@ else line_dest="$html_out/"`echo "$line" | cut -d' ' -f2` fi + if [ ! -f "$line_src" -a "x$html_paths" != "x" ]; then + if [ $(expr index "$line_src" "$(pwd)/") = 1 ]; then + line_src_rel=$(expr substr "$line_src" \ + $(expr length "$(pwd)//") $(expr length "$line_src")) + for path in $html_paths; do + if [ -f "$path/$line_src_rel" ]; then + line_src="$path/$line_src_rel" + break + fi + done + fi + fi line_dest=`echo "$line_dest" | urldecode` if [ "$line_src" != "$line_dest" ]; then line_dir=`dirname "$line_dest"` mkdir_p "$line_dir" - cp "$line_src" "$line_dest" + if [ -f "$minput" -o "x$html_ignore_media" != "x1" ]; then + cp "$line_src" "$line_dest" + fi fi done - cp "${yelp_js_dir}/jquery.js" "$html_out/$html_internal_datadir" - cp "${yelp_js_dir}/jquery.syntax.js" "$html_out/$html_internal_datadir" - cp "${yelp_js_dir}/jquery.syntax.core.js" "$html_out/$html_internal_datadir" - cp "${yelp_js_dir}/jquery.syntax.layout.yelp.js" "$html_out/$html_internal_datadir" - rm "$html_tmp_infile" if [ "x$html_cache_file_is_tmp" = "xyes" ]; then rm "$html_cache_file" @@ -514,6 +478,15 @@ html_custom="$1" shift ;; + "-p") + shift + html_paths=$(yelp_paths_normalize "$1") + shift + ;; + "-i") + shift + html_ignore_media="1" + ;; "--profile") html_profile="--profile" shift @@ -565,6 +538,15 @@ html_custom="$1" shift ;; + "-p") + shift + html_paths=$(yelp_paths_normalize "$1") + shift + ;; + "-i") + shift + html_ignore_media="1" + ;; *) break ;; @@ -593,11 +575,13 @@ epub_id=`uuidgen` epub_data=`(cd "$html_out" && ls yelp/*.*)` xsltproc \ + --path "$html_paths" \ -o "$html_out/opf.opf" \ --stringparam opf.id "$epub_id" \ --stringparam opf.data "$epub_data" \ "$xsl_mal_opf" "$epub_cache_file" xsltproc \ + --path "$html_paths" \ -o "$html_out/ncx.ncx" \ --stringparam ncx.id "$epub_id" \ "$xsl_mal_ncx" "$epub_cache_file" diff -Nru yelp-tools-3.10.0/tools/yelp-check.in yelp-tools-3.12.1/tools/yelp-check.in --- yelp-tools-3.10.0/tools/yelp-check.in 2013-08-19 20:23:50.000000000 +0000 +++ yelp-tools-3.12.1/tools/yelp-check.in 2014-03-25 14:07:32.000000000 +0000 @@ -17,9 +17,11 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. xsl_mal_link='@XSL_MAL_LINK@' +xsl_mal_license='@DATADIR@/xslt/mal-license.xsl' xsl_mal_status='@DATADIR@/xslt/mal-status.xsl' xsl_mal_rng='@DATADIR@/xslt/mal-rng.xsl' xsl_comments='@DATADIR@/xslt/comments.xsl' +xsl_media='@DATADIR@/xslt/media.xsl' urlencode () { # We usually don't want to urlencode slashes, because we're @@ -30,7 +32,7 @@ else urlencode_slash='\/' fi - echo "$1" | LANG=C awk ' + echo "$1" | LC_ALL=C awk ' BEGIN { for (i = 1; i <= 255; i++) chars[sprintf("%c", i)] = i; } @@ -48,7 +50,7 @@ } urldecode () { - echo "$1" | LANG=C awk ' + echo "$1" | LC_ALL=C awk ' BEGIN { for(i = 0; i < 10; i++) hex[i] = i; hex["A"] = hex["a"] = 10; @@ -78,6 +80,28 @@ }' } +docbook_version=' + + + + + + + + + 5.0 + + + 4 + + + + +' + yelp_usage () { ( echo "Usage: yelp-check [OPTIONS] [FILES]" @@ -86,7 +110,9 @@ echo " comments Print the editorial comments in a document" echo " hrefs Find broken external links in a document" echo " ids Find Mallard page IDs that do not match file names" + echo " license Report the license of Mallard pages" echo " links Find broken xref or linkend links in a document" + echo " media Find broken references to media files" echo " orphans Find orphaned pages in a Mallard document" echo " status Report the status of Mallard pages" echo " validate Validate files against a DTD or RNG" @@ -120,6 +146,15 @@ echo " -i Ignore xrefs where href is present" ) 1>&2 } +yelp_usage_media () { + ( + echo "Usage: yelp-check media " + echo "" + echo " Find broken references to media files. In Mallard, this" + echo " checks media and thumb elements. In DocBook, this checks" + echo " audiodata, imagedata, and videodata elements." + ) 1>&2 +} yelp_usage_orphans () { ( echo "Usage: yelp-check orphans " @@ -140,6 +175,25 @@ echo " comment element in Mallard and the remark element in DocBook." ) 1>&2 } +yelp_usage_license () { + ( + echo "Usage: yelp-check license " + echo "" + echo " Report the license of the Mallard page files FILES. Each" + echo " matching page is reporting along with its license, reported" + echo " based on the href attribute of the license element. Common" + echo " licenses use a shortened identifier. Pages with multiple" + echo " licenses have the identifiers separated by spaces. Pages" + echo " with no license element report 'none'. Licenses with no" + echo " href attribute are reported as 'unknown'." + echo "" + echo "Options:" + echo " --only LICENSES Only show pages whose license is in LICENSES" + echo " --except LICENSES Exclude pages whose license is in LICENSES" + echo " --totals Show total counts for each license" + echo "LICENSES may be a comma- and/or space-separated list." + ) 1>&2 +} yelp_usage_status () { ( echo "Usage: yelp-check status " @@ -169,6 +223,7 @@ echo "" echo "Options:" echo " --strict Disallow unknown namespaces" + echo " --allow NS Explicitly allow namespace NS in strict mode" ) 1>&2 } @@ -225,6 +280,7 @@ yelp_usage_hrefs exit 1 fi + check_out_file=`mktemp "${TMPDIR:-/tmp}"/yelp-XXXXXXXX` for xml in "$@"; do if [ -d "$xml" ]; then for page in "$xml"/*.page; do @@ -248,11 +304,17 @@ (curl -s -I -L "$url" | grep '^HTTP/' | tail -n 1 | head -n 1 | grep -q 'HTTP/.\.. 200 .*') || echo "$id: $url" fi - done + done > "$check_out_file" + ret=`cat "$check_out_file" | wc -l` + if test "x$ret" != "x0"; then ret="1"; fi + cat "$check_out_file" + rm "$check_out_file" + exit $ret } yelp_ids_page () { - pageid=$(( + pageid=$( + ( echo '&1 + exit 1 + fi + done | if [ "x$check_totals" = "x1" ]; then + sort | uniq -c | sed -e 's/^ *//' | awk '{print $2 ": " $1}' + else + sort + fi + return 0 +} + yelp_status () { if [ "$#" = "0" -o "x$1" = "x--help" ]; then yelp_usage_status @@ -619,7 +766,10 @@ # version strings often contain slashes. But xsltproc treats the # -o option as a URL and urldecodes, so doubly urlencode, because # we want the urlencoded string to be the on-disk name. - xsltproc -o "$check_rng_dir/"`urlencode "$check_rng_file"` --param rng.strict "$check_strict" "$xsl_mal_rng" "$1" + xsltproc -o "$check_rng_dir/"`urlencode "$check_rng_file"` \ + --param rng.strict "$check_strict" \ + --stringparam rng.strict.allow "$check_strict_allow" \ + "$xsl_mal_rng" "$1" fi xmllint --noout --xinclude --noent --relaxng "$check_rng_dir/$check_rng_file" "$1" > "$check_out_file" 2>&1 ret="$?" @@ -635,12 +785,18 @@ fi gret="0" check_strict="false()" + check_strict_allow="" while [ "$#" != "0" ]; do case "$1" in "--strict") check_strict="true()" shift ;; + "--allow") + shift + check_strict_allow="$check_strict_allow $1" + shift + ;; *) break ;; @@ -655,7 +811,21 @@ elif [ "x$ext" = "xpage" -o "x$ext" = "xcache" ]; then yelp_validate_page "$xml" || gret="$?" else - xmllint --noout --xinclude --noent --postvalid "$xml" || gret="$?" + version=`echo "$docbook_version" | xsltproc - "$xml"` + major=`echo "$version" | cut -c1` + if [ "x$major" = "x5" ]; then + check_out_file=`mktemp "${TMPDIR:-/tmp}"/yelp-XXXXXXXX` + rng_uri="http://docbook.org/xml/$version/rng/docbook.rng" + xmllint --noout --xinclude --noent --relaxng "$rng_uri" "$xml" > "$check_out_file" 2>&1 + gret="$?" + cat "$check_out_file" | grep -v 'validates$' + rm "$check_out_file" + elif xmllint --nocdata "$xml" | grep -q ' [TITLE]" echo "" @@ -87,7 +91,10 @@ done # Locate the template file -if [ -f "${1}.page.tmpl" ]; then +if [ $(yelp_get_extension ${1}) = "tmpl" -a -f "${1}" ]; then + infile="${1}" + outext="."$(yelp_get_extension $(basename "${1}" ".tmpl")) +elif [ -f "${1}.page.tmpl" ]; then infile="${1}.page.tmpl" outext=".page" elif [ -f "${tmpldir}${1}.page" ]; then @@ -104,13 +111,16 @@ exit 1 fi -# Set up some variable for substitution +# Set up some variables for substitution if type git >/dev/null 2>&1; then username=`git config user.name` useremail=`git config user.email` -elif type bzr >/dev/null 2>&1; then - username=`bzr whoami | sed -e 's/ <.*//'` - useremail=`bzr whoami --email` +fi +if [ "x$username" = "x" -a "x$useremail" = "x" ]; then + if type bzr >/dev/null 2>&1; then + username=`bzr whoami | sed -e 's/ <.*//'` + useremail=`bzr whoami --email` + fi fi if [ "x$username" = "x" -a "x$useremail" = "x" ]; then username='YOUR NAME' @@ -121,12 +131,27 @@ pagetitle="TITLE" fi -outfile="${2}${outext}${spec}" +outid=$(basename "${2}") + +if [ "x$spec" != "x" ]; then + if [ "."$(yelp_get_extension "${2}") = "$spec" ]; then + outfile="${2}" + elif [ "."$(yelp_get_extension "${2}") = "$outext" ]; then + outfile="${2}${spec}" + else + outfile="${2}${outext}${spec}" + fi +elif [ "."$(yelp_get_extension ${2}) = "$outext" ]; then + outfile="${2}" +else + outfile="${2}${outext}" +fi + if [ "x$spec" = "x.tmpl" ]; then cp "$infile" "$outfile" else cat "$infile" | grep -v '<\?yelp-tmpl-desc' | sed \ - -e s/@ID@/"$2"/ \ + -e s/@ID@/"$outid"/ \ -e s/@DATE@/`date +%Y-%m-%d`/ \ -e s/@YEAR@/`date +%Y`/ \ -e s/@NAME@/"$username"/ \ diff -Nru yelp-tools-3.10.0/xslt/Makefile.am yelp-tools-3.12.1/xslt/Makefile.am --- yelp-tools-3.10.0/xslt/Makefile.am 2011-05-31 13:20:51.000000000 +0000 +++ yelp-tools-3.12.1/xslt/Makefile.am 2014-02-02 18:43:12.000000000 +0000 @@ -4,9 +4,12 @@ comments.xsl \ mal-epub.xsl \ mal-opf.xsl \ + mal-files.xsl \ + mal-license.xsl \ mal-ncx.xsl \ mal-status.xsl \ - mal-rng.xsl + mal-rng.xsl \ + media.xsl EXTRA_DIST = \ mal-ncx.xsl.in \ diff -Nru yelp-tools-3.10.0/xslt/Makefile.in yelp-tools-3.12.1/xslt/Makefile.in --- yelp-tools-3.10.0/xslt/Makefile.in 2013-09-23 18:05:30.000000000 +0000 +++ yelp-tools-3.12.1/xslt/Makefile.in 2014-04-13 13:36:38.000000000 +0000 @@ -166,9 +166,12 @@ comments.xsl \ mal-epub.xsl \ mal-opf.xsl \ + mal-files.xsl \ + mal-license.xsl \ mal-ncx.xsl \ mal-status.xsl \ - mal-rng.xsl + mal-rng.xsl \ + media.xsl EXTRA_DIST = \ mal-ncx.xsl.in \ diff -Nru yelp-tools-3.10.0/xslt/mal-files.xsl yelp-tools-3.12.1/xslt/mal-files.xsl --- yelp-tools-3.10.0/xslt/mal-files.xsl 1970-01-01 00:00:00.000000000 +0000 +++ yelp-tools-3.12.1/xslt/mal-files.xsl 2014-02-03 15:32:43.000000000 +0000 @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru yelp-tools-3.10.0/xslt/mal-license.xsl yelp-tools-3.12.1/xslt/mal-license.xsl --- yelp-tools-3.10.0/xslt/mal-license.xsl 1970-01-01 00:00:00.000000000 +0000 +++ yelp-tools-3.12.1/xslt/mal-license.xsl 2014-02-01 03:23:58.000000000 +0000 @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + none + + + + + + + + + + + + + 1 + + + + + 1 + + + + 1 + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + unknown + + + cc- + + + - + + + + + + + + + + + + + + + + + + + unknown + + + + + diff -Nru yelp-tools-3.10.0/xslt/mal-rng.xsl yelp-tools-3.12.1/xslt/mal-rng.xsl --- yelp-tools-3.10.0/xslt/mal-rng.xsl 2013-08-19 20:23:04.000000000 +0000 +++ yelp-tools-3.12.1/xslt/mal-rng.xsl 2013-10-24 03:26:11.000000000 +0000 @@ -10,6 +10,7 @@ version="1.0"> + @@ -89,6 +90,26 @@ + + + + + + + + + + + + + + + + + + + + diff -Nru yelp-tools-3.10.0/xslt/media.xsl yelp-tools-3.12.1/xslt/media.xsl --- yelp-tools-3.10.0/xslt/media.xsl 1970-01-01 00:00:00.000000000 +0000 +++ yelp-tools-3.12.1/xslt/media.xsl 2014-02-03 15:33:27.000000000 +0000 @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + : + + + + + + + + + + : + + + + + +