From 9eb3382fc24e5d2a4a2a1024f0b4f61f9ed4c035 Mon Sep 17 00:00:00 2001
From: Olivier Hallot <olivier.hallot@libreoffice.org>
Date: Tue, 27 Jun 2017 14:28:44 -0300
Subject: Help-in-browser (vi): more improvements

Improvement:
* image search & screeshots
* inserted TechArticle schema elements from http://schema.org
* new script for usage of helpex in a build
* results in https://helponline.libreoffice.org

Change-Id: I62d1c46f260c8bd5e287df382e8db086112c4d2a
Reviewed-on: https://gerrit.libreoffice.org/39452
Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
---
 help3xsl/get_bookmark.sh | 36 ++++++++++++++++--------------------
 1 file changed, 16 insertions(+), 20 deletions(-)

(limited to 'help3xsl/get_bookmark.sh')

diff --git a/help3xsl/get_bookmark.sh b/help3xsl/get_bookmark.sh
index d926787da4..e4d3fee100 100755
--- a/help3xsl/get_bookmark.sh
+++ b/help3xsl/get_bookmark.sh
@@ -6,28 +6,28 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-# $1 is html/productversion/
-# $2 is Language
-# $3 is productversion
+# $1 is Language
+# $2 is productversion
 
-outdir=$1$2
-mkdir -p $outdir
-sourcedir=`pwd`/
+outdir=`pwd`'/html/'$2'/'$1
+
+# mkdir -p $outdir
+sourcedir=`pwd`'/l10n/'$2'/'$1
 ffile=$outdir'/bookmarks.js'
 rm -f $ffile
-ffile2=temp.html
+ffile2=/tmp/temp.html
 stub2=\'
-xslfile=$outdir/../../../get_bookmark.xsl
+xslfile=get_bookmark.xsl
+
+param1=' --stringparam Language '$1' --stringparam productversion '$2
 
 # bookmarks for modules
 
 for i in CALC CHART WRITER DRAW IMPRESS MATH BASIC
 do
 stub1='document.getElementById("bookmark'$i'").innerHTML='\'\\
-sfind=$sourcedir`echo 'text/s'$i | tr '[:upper:]' '[:lower:]'`
-param='--stringparam app '$i
-param=$param' --stringparam Language '$2
-param=$param' --stringparam productversion '$3
+sfind=$sourcedir'/'`echo 'text/s'$i | tr '[:upper:]' '[:lower:]'`
+param=$param1' --stringparam app '$i
 rm -f $ffile2
 find $sfind -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
 echo $stub1 >> $ffile
@@ -40,10 +40,8 @@ done
 
 stub1='document.getElementById("bookmarkSHARED").innerHTML='\'\\
 rm -f $ffile2
-param='--stringparam app SHARED'
-param=$param' --stringparam Language '$2
-param=$param' --stringparam productversion '$3
-find $sourcedir'text/shared' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
+param=$param1' --stringparam app SHARED'
+find $sourcedir'/text/shared' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
 echo $stub1 >> $ffile
 sort -k3b -t\> -s -o $ffile2 $ffile2
 awk 'NF' $ffile2 >> $ffile
@@ -53,10 +51,8 @@ echo $stub2 >> $ffile
 
 stub1='document.getElementById("bookmarkBASE").innerHTML='\'\\
 rm -f $ffile2
-param='--stringparam app BASE'
-param=$param' --stringparam Language '$2
-param=$param' --stringparam productversion '$3
-find $sourcedir'text/shared/explorer/database' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
+param=$param1' --stringparam app BASE'
+find $sourcedir'/text/shared/explorer/database' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
 echo $stub1 >> $ffile
 sort -k3b -t\> -s -o $ffile2 $ffile2
 awk 'NF' $ffile2 >> $ffile
-- 
cgit