From f7e7a923aca8be643f9ae6f7252f9fb27b3d2c3b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 3 Dec 2011 11:05:10 -0600 Subject: Second part of prior commit --- tde-i18n-pt_BR/docs/tdepim/api/doxyndex.sh | 59 ++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 tde-i18n-pt_BR/docs/tdepim/api/doxyndex.sh (limited to 'tde-i18n-pt_BR/docs/tdepim/api/doxyndex.sh') diff --git a/tde-i18n-pt_BR/docs/tdepim/api/doxyndex.sh b/tde-i18n-pt_BR/docs/tdepim/api/doxyndex.sh new file mode 100644 index 00000000000..f1ae6cce649 --- /dev/null +++ b/tde-i18n-pt_BR/docs/tdepim/api/doxyndex.sh @@ -0,0 +1,59 @@ +#! /bin/sh +# +# A shell script to post-process doxy-generated files; the purpose +# is to make the menu on the left in the file match the actually +# generated files (ie. leave out namespaces if there are none). +# +# Usage: doxyndex.sh +# +# Typically, this means $(top_builddir)/apidocs and something like +# libfoo/html for the output. For the top-level dig, set relative-html +# to "." . In non-top directories, both and +# are calculated and replaced. Top directories get an empty +# if any. + +WRKDIR="$1/$2" +TOPDIR=`echo "$2" | sed -e 's+[^/][^/]*/+../+g' -e 's+html$+..+'` +echo "Postprocessing files in $WRKDIR ($TOPDIR)" + +# Special case top-level to have an empty MENU. +if test "x$2" = "x." ; then +MENU="" +else +MENU="
    " + +# This is a list of pairs, with / separators so we can use basename +# and dirname (a crude shell hack) to split them into parts. For +# each, if the file part exists (as a html file) tack it onto the +# MENU variable as a
  • with link. +for i in "Main Page/index" \ + "Modules/modules" \ + "Namespace List/namespaces" \ + "Class Hierarchy/hierarchy" \ + "Alphabetical List/classes" \ + "Class List/annotated" \ + "File List/files" \ + "Namespace Members/namespacemembers" \ + "Class Members/functions" +do + NAME=`dirname "$i"` + FILE=`basename "$i"` + test -f "$WRKDIR/$FILE.html" && MENU="$MENU
  • $NAME
  • " +done + +MENU="$MENU
" +fi + + +# Get the list of global Menu entries. +GMENU=`cat "$1"/subdirs | tr -d '\n'` + +PMENU=`grep '++' | awk '{ c=split($0,a,"/"); for (j=1; j<=c; j++) { printf " / %s\n" , a[j]; } }' | tr -d '\n'` + +# Now substitute in the MENU in every file. This depends +# on HTML_HEADER (ie. header.html) containing the comment. +for i in "$WRKDIR"/*.html +do + sed -e "s++$MENU+" -e "s++$GMENU+" -e "s++$PMENU+" < "$i" | sed -e "s+@topdir@+$TOPDIR+g" > "$i.new" && mv "$i.new" "$i" +done + -- cgit v1.2.1