forked from amazingfate/help
Add 4 smaller bash scripts for building new help, for
better management
Scripts use the following parameters
workDir: $(WORKDIR)
lang: $(LANG)
productVersion: 6.0
and put results in
$(WORKDIR)/HelpTargetHTML
./get_hid2file.sh $productVersion $workDir
Creates hid2file.js that maps HID into HTML page
uses get_url.xsl transform
./get_bookmark.sh $lang $productVersion $workDir
Creates the index file 'bookmarks.js' based on
<bookmark_values> tag in all localized XHP files.
Visible in Index tab of the HTML page
Uses get_bookmark.xsl transform.
./get_html.sh $lang $productVersion $workDir $local $fileTree
Creates the HTML pages from localized XHP files
local: is local or website (yes/no)
If local="yes", the filetree should be $(installDir)
else (i.e. website), root file tree should be '/'
fileTree: is root file tree for $local=yes
If local = yes, then language selector, PIWIK probe
and global search services are removed.
Uses: online_transform.xsl transform
./get_tree.sh $lang $productVersion $workDir
Creates the contents.js from localized TREE files
Visible in Contents tab of the HTML page
Uses get_tree.xsl transform
./get_media.sh $lang $productVersion $workDir
Copy several auxiliary files for navigation
Copy HC2 media files
Copy galaxy icon theme for HTML pages
* minor change in file name hid2file.js
Added 2 more small scripts to show how to build local and online
./makelocal.sh
./makeonline.sh
Languages depends on the languages available in
$(WORKDIR)/HelpTranslatePartTarget/, and includes qtz.
will handle special case of en-US later
Change-Id: I0b7fdf5e1460070413eb2303f8d69b2b85a40c3e
Reviewed-on: https://gerrit.libreoffice.org/44114
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
-----------------------------------------------------------------
Helpcontent displayed in a browser directly from XML
-----------------------------------------------------------------
This README shows how to display Helpcontent2 XML pages (XHP) directly rendered in a modern browser.
-----------------------------------------------------------------
Background
-----------------------------------------------------------------
The XML files must be transformed into HTML files with the help of a style sheet file (XSL).
In the current helpcontent2, the processing is done in xmlhelp/ module, an ancient XSLT processor developed circa 2005 (OpenOffice.org 1.5)
Modern browsers such as Firefox, Chrome and Rekonq are capable to execute the transformation direcly in the client, by getting an URL that returns a XML file that contains the reference of the necessary XSL style sheet.
How to display Helpcontent2 in a browser
1. Open the browser
2. Open the file index.html in source/ folder
3. Navigate in pages
-----------------------------------------------------------------
File descriptions
-----------------------------------------------------------------
default.css:
-------------
the cascading style sheet for HTML formatting.
online_transform.xsl:
--------------------
the XSL transform file. Transform XHP files into HTML files.
This file is a modification of xmlhelper/util/main_transform.xsl, which was designed for xmlhelp XSL processor.
help.js
-------
This javascript file:
1. modifies href attributes in <a> of #DisplayArea to handle &DbPAR and &System params
2. picks the bookmarks file and displays in #BottomLeft <div> area.
3. Reads URL params.
-----------------------------------------------------------------
New ‘Object’ tag
-----------------------------------------------------------------
The filter online_transform.xsl now support the <object> tag defined for XHP files to allow a generic object in the browser. The <object> tag now maps to the folowing HTML5 tags:
Maps to HTML5 <video> tag:
<section id="video">
<object id="1232312" type ="video/ogg" data="movies/testvideo.ogv" height="480px" width="640px"/>
</section>
Maps to HTML5 <audio> tag:
<section id="audio">
<object id="1232312" type ="audio/ogg" data="audio/testaudio.wav" height="" width=""/>
</section>
Maps to HTML5 <object> tag:
<object id="1232312" type ="{mimetype}" data="object/testobject.swf" height="" width=""/>
-----------------------------------------------------------------
How to build the LibreOffice Browser help
-----------------------------------------------------------------
1) run help-to-html.sh in helpcontent2/help3xsl/ folder. A previous language build must exist in workdir/HelpTranslatePartHelp/ .
The script will build all existing languages available in this folder. See help-to-html.sh script and adjust path.
2) copy folder html/ to your root web server.