[Libreoffice-commits] help.git: help3xsl/xhp2html.sh
help3xsl/xhp2html.sh |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 05e6b76a1511edde0e668f025cb8af140e396d9c Author: Olivier HallotDate: Tue Feb 27 12:52:41 2018 -0300 Update release for new help in script Change-Id: Ia2531f7bb69d1ccb4c5e6665b04ffb6ab2b577cd Reviewed-on: https://gerrit.libreoffice.org/50450 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh index fc6bf175b..335a1abe5 100755 --- a/help3xsl/xhp2html.sh +++ b/help3xsl/xhp2html.sh @@ -148,14 +148,13 @@ echo 'Conversion to HTML finished for '$3 ### # Change root of git core -productversion='6.0' +productversion='6.1' local='no' fileTree='/' rootHelpex=/home/tdf/git/core ALL_LANGS='en-US am ar ast bg bn bn-IN bo bs ca ca-valencia cs da de dz el en-GB en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko lo lt lv mk nb ne nl nn om pl pt-BR pt ro ru sid si sk sl sq sv ta tg tr ug uk vi zh-CN zh-TW' - here=$(pwd) root=$(realpath "$here/../..") ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: help3xsl/xhp2html.sh
help3xsl/xhp2html.sh | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) New commits: commit 482fb2a966c3cfde24d94d7f43768b8edf63ceca Author: Olivier HallotDate: Fri Jan 26 09:46:22 2018 -0200 Adjust online builder xhp2html.sh to new bookmarks Change-Id: Ie3a211d7247acd0ef7c15266368d9db7e1c8f232 Reviewed-on: https://gerrit.libreoffice.org/48681 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh index d196625f2..919aa63f2 100755 --- a/help3xsl/xhp2html.sh +++ b/help3xsl/xhp2html.sh @@ -35,6 +35,8 @@ rm -f $bookmarkFile touch $bookmarkFile stub2=\' +stub1='document.getElementById("Bookmarks").getElementsByClassName( "list" )[0].innerHTML='\'\\ +echo $stub1 >> $bookmarkFile xslfile=get_bookmark.xsl @@ -42,43 +44,35 @@ param1=' --stringparam Language '$lang' --stringparam productversion '$productve # bookmarks for modules -for i in CALC CHART WRITER DRAW IMPRESS MATH BASIC +for i in WRITER CALC DRAW IMPRESS CHART MATH BASIC do -stub1='document.getElementById("bookmark'$i'").innerHTML='\'\\ sfind=$sourceDir'/'$(echo 'text/s'$i | tr '[:upper:]' '[:lower:]') param=$param1' --stringparam app '$i tempFile=$(mktemp) find $sfind -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $tempFile -echo $stub1 >> $bookmarkFile sort -k3b -t\> -s -o $tempFile $tempFile awk 'NF' $tempFile >> $bookmarkFile -echo $stub2 >> $bookmarkFile rm -f $tempFile done # Case of SHARED -stub1='document.getElementById("bookmarkSHARED").innerHTML='\'\\ tempFile=$(mktemp) param=$param1' --stringparam app SHARED' find $sourceDir'/text/shared' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $tempFile -echo $stub1 >> $bookmarkFile sort -k3b -t\> -s -o $tempFile $tempFile awk 'NF' $tempFile >> $bookmarkFile -echo $stub2 >> $bookmarkFile rm -f $tempFile # Case of Explorer (BASE) -stub1='document.getElementById("bookmarkBASE").innerHTML='\'\\ tempFile=$(mktemp) param=$param1' --stringparam app BASE' find $sourceDir'/text/shared/explorer/database' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $tempFile -echo $stub1 >> $bookmarkFile sort -k3b -t\> -s -o $tempFile $tempFile awk 'NF' $tempFile >> $bookmarkFile -echo $stub2 >> $bookmarkFile rm -f $tempFile +echo $stub2 >> $bookmarkFile } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: help3xsl/xhp2html.sh
help3xsl/xhp2html.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b07c31d8dfa44e18560eaacfe7f63ef2e5e23ff7 Author: ShinnokDate: Wed Nov 29 12:48:22 2017 +0200 Replace usage of readlink -f with realpath. For consistency reasons, the other scripts use the latter. Additionally on macOS/BSD readlink -f option is not available, nor other default tools for canonicalizing paths, so looking for GNU's realpath in the first place is a better bet. Change-Id: I77b82a956f63c66e352a372895cd623f83916168 Reviewed-on: https://gerrit.libreoffice.org/45486 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh index 4b3734254..b4e56b5a7 100755 --- a/help3xsl/xhp2html.sh +++ b/help3xsl/xhp2html.sh @@ -193,7 +193,7 @@ if test "${dir}" = "/"; then echo "error: cannot find \"program\" dir from \"$(pwd)\"" exit 1 fi -rootHelpex=$(readlink -f "${rootHelpex}/..") +rootHelpex=$(realpath "${rootHelpex}/..") done exedir="${rootHelpex}"/workdir/LinkTarget/Executable ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: help3xsl/xhp2html.sh
help3xsl/xhp2html.sh |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 840ceaafbe4f723661c10539ed2915298cf77c5f Author: Olivier HallotDate: Tue Nov 28 11:29:39 2017 -0200 Fix hid2file.js Change-Id: I976801b1e84defd3f8588a3423acc4254098c237 Reviewed-on: https://gerrit.libreoffice.org/45411 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh index 98622376b..de146e387 100755 --- a/help3xsl/xhp2html.sh +++ b/help3xsl/xhp2html.sh @@ -208,12 +208,12 @@ echo "execing: ${exedir}/helpex" ### # -# Create the bookmark2file map +# Create the hid2file map # ### stub1='var map={' stub2='};' -ffile='html/'$productversion'/bookmark2file.js' +ffile='html/'$productversion'/hid2file.js' ffile2=/tmp/tmpbkm.txt rm -f $ffile2 $ffile find $helpfiles -type f -name "*.xhp" -exec xsltproc get_url.xsl {} + > $ffile2 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: help3xsl/xhp2html.sh
help3xsl/xhp2html.sh | 69 +-- 1 file changed, 67 insertions(+), 2 deletions(-) New commits: commit ac105fe860f05e66f574e135fa6fcb738db9347f Author: Olivier HallotDate: Sat Nov 11 13:30:17 2017 -0200 Fix script for online version of new help Change-Id: I9a395dbc88b6c2606b2a7fca1d829b10922e4674 Reviewed-on: https://gerrit.libreoffice.org/44630 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh index 9e90a0aa2..98622376b 100755 --- a/help3xsl/xhp2html.sh +++ b/help3xsl/xhp2html.sh @@ -18,6 +18,70 @@ # # convert2HTML $outDirLang $outDirHTML $lang $productversion $online $fileTree & +function get_bookmark(){ +lang=$1 +productversion=$2 +#workDir=$(realpath $3) +workDir=$(pwd) + +outDir=$(realpath $workDir/html/$productversion/$lang) +#sourceDir=$(realpath $workDir/l10n/$lang/helpcontent2/source) +sourceDir=$(realpath $workDir/l10n/$productversion/$lang) + +bookmarkFile=$outDir/bookmarks.js +mkdir -p $outDir + +rm -f $bookmarkFile +touch $bookmarkFile + +stub2=\' + +xslfile=get_bookmark.xsl + +param1=' --stringparam Language '$lang' --stringparam productversion '$productversion + +# 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=$param1' --stringparam app '$i +tempFile=$(mktemp) +find $sfind -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $tempFile +echo $stub1 >> $bookmarkFile +sort -k3b -t\> -s -o $tempFile $tempFile +awk 'NF' $tempFile >> $bookmarkFile +echo $stub2 >> $bookmarkFile +rm -f $tempFile +done + +# Case of SHARED + +stub1='document.getElementById("bookmarkSHARED").innerHTML='\'\\ +tempFile=$(mktemp) +param=$param1' --stringparam app SHARED' +find $sourceDir'/text/shared' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $tempFile +echo $stub1 >> $bookmarkFile +sort -k3b -t\> -s -o $tempFile $tempFile +awk 'NF' $tempFile >> $bookmarkFile +echo $stub2 >> $bookmarkFile +rm -f $tempFile + +# Case of Explorer (BASE) + +stub1='document.getElementById("bookmarkBASE").innerHTML='\'\\ +tempFile=$(mktemp) +param=$param1' --stringparam app BASE' +find $sourceDir'/text/shared/explorer/database' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $tempFile +echo $stub1 >> $bookmarkFile +sort -k3b -t\> -s -o $tempFile $tempFile +awk 'NF' $tempFile >> $bookmarkFile +echo $stub2 >> $bookmarkFile +rm -f $tempFile +} + + function convert2HTML() { #outDirLang =1 #outDirHTML =2 @@ -92,11 +156,12 @@ echo 'Conversion to HTML finished for '$3 # Change root of git core productversion='6.0' local='no' -fileTree='/home/tdf/git/core/helpcontent2/help3xsl/html/' +fileTree='/' rootHelpex=/home/tdf/git/core ALL_LANGS='en-US am ar ast bg bn bn-IN bo bs ca ca-valencia cs da de dz el en-GB en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko lo lt lv mk nb ne nl nn om pl pt-BR pt ro ru sid si sk sl sq sv ta tg tr ug uk vi zh-CN zh-TW' + here=$(pwd) root=$(realpath "$here/../..") @@ -209,7 +274,7 @@ fi #extracting bookmarks echo 'Extracting bookmarks' -./get_bookmark.sh $lang $productversion & +get_bookmark $lang $productversion $(pwd)/html & # converting to HTML convert2HTML $outDirLang $outDirHTML $lang $productversion $local $fileTree & ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] help.git: help3xsl/xhp2html.sh
help3xsl/xhp2html.sh | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) New commits: commit 3e535dfe206e106a7a06e39a8e9f5a7b6e5bc95c Author: Olivier HallotDate: Wed Sep 20 17:09:40 2017 -0300 Some better coding practice use $() in bash script Change-Id: Ia46e529bf2059a378b0f311ec2b6d5fc03e86f66 Reviewed-on: https://gerrit.libreoffice.org/42566 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot diff --git a/help3xsl/xhp2html.sh b/help3xsl/xhp2html.sh index 105a86049..9e90a0aa2 100755 --- a/help3xsl/xhp2html.sh +++ b/help3xsl/xhp2html.sh @@ -35,7 +35,7 @@ function convert2HTML() { xsltparm='--stringparam fileTree '$6' --stringparam local '$5' --stringparam Language '$3' --stringparam productversion '$4' --stringparam root '$1'/' echo 'Conversion to HTML started for '$3 -for filep in `find $1/text -name "*.xhp"` +for filep in $(find $1/text -name "*.xhp") do DIR=${filep##*text/} name=${DIR:0:-3} @@ -49,7 +49,7 @@ done # ### -treePOFile=`mktemp` +treePOFile=$(mktemp) echo $root/translations/source/$3/helpcontent2/source/auxiliary.po > $treePOFile ALL_TREE='sbasic.tree scalc.tree schart.tree shared.tree simpress.tree smath.tree swriter.tree' @@ -65,8 +65,8 @@ xsltparm='--stringparam lang '$3' --stringparam productversion '$4 for tree in $ALL_TREE do treeSourceFile=$root'/helpcontent2/source/auxiliary/'$tree -treeTemp1=`mktemp` -treeTemp2=`mktemp` +treeTemp1=$(mktemp) +treeTemp2=$(mktemp) "${exedir}/treex" -l $3 -i $treeSourceFile -m $treePOFile -o $treeTemp1 -r $xhpFiles @@ -97,8 +97,7 @@ fileTree='/home/tdf/git/core/helpcontent2/help3xsl/html/' rootHelpex=/home/tdf/git/core ALL_LANGS='en-US am ar ast bg bn bn-IN bo bs ca ca-valencia cs da de dz el en-GB en-ZA eo es et eu fi fr gl gu he hi hr hu id is it ja ka km ko lo lt lv mk nb ne nl nn om pl pt-BR pt ro ru sid si sk sl sq sv ta tg tr ug uk vi zh-CN zh-TW' - -here=`pwd` +here=$(pwd) root=$(realpath "$here/../..") rm -rf $here/l10n @@ -192,7 +191,7 @@ xhpfiles=`mktemp` find $translations -type f >$pofiles # For each po file -for ff in `cat $pofiles` +for ff in $(cat $pofiles) do echo 'Processing po file: '$ff potemp=`mktemp` ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits