Last change
on this file since 25472 was 25472, checked in by ak19, 12 years ago |
- ApplyXSLT takes an additional parameter: the Greenstone major version number, or sets this to 2 if none is provided. This is then passed onto the XSLT files. 2. generate-html.sh/bat will pass any commandline parameters on to ApplyXSLT.java. 3. Simplified the generate-html.bat file with a for loop to avoid code duplication. 4. The MajorVersion element will now be processed by processing/common.xsl: anything in a MajorVersion element whose number matches the Greenstone major version number specified to generate-html.sh/bat (or ApplyXSLT.java) will be output to html, if the MajorVersion number does not match, it won't be output.
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.7 KB
|
Rev | Line | |
---|
[13636] | 1 | @echo off
|
---|
| 2 |
|
---|
[25472] | 3 | :: Usage: generate-html.bat [<gs-major-version-number]
|
---|
| 4 | :: The optional parameter major version number, which can be 2 or 3, will be assumed to be (Greenstone) "2" if none is provided
|
---|
[13636] | 5 | if not "%GSDLHOME%" == "" goto generate
|
---|
| 6 |
|
---|
| 7 | echo You must run 'setup' in the top level folder of your Greenstone installation before running this script
|
---|
[25472] | 8 | echo Usage: $0 [gs-major-version-number=2]
|
---|
[13636] | 9 | goto exit
|
---|
| 10 |
|
---|
[25472] | 11 | setlocal
|
---|
[13636] | 12 |
|
---|
[13743] | 13 | set top_dir=%CD%
|
---|
| 14 | set source_dir=%CD%\xml-source
|
---|
| 15 | set processing_dir=%CD%\processing
|
---|
| 16 | set output_dir=%CD%\html
|
---|
[25472] | 17 | :generate:
|
---|
| 18 | if not exist "%output_dir" mkdir %output_dir%
|
---|
[13743] | 19 | cd ..
|
---|
| 20 | cd shared
|
---|
| 21 | set shared_dir=%CD%
|
---|
| 22 | cd %output_dir%
|
---|
| 23 |
|
---|
[25472] | 24 |
|
---|
| 25 | set CLASSPATH=%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar
|
---|
| 26 |
|
---|
[13636] | 27 | echo "processing top level index"
|
---|
| 28 |
|
---|
[25472] | 29 | java -cp "%CLASSPATH%" -DGSDLHOME="%GSDLHOME%" ApplyXSLT "en" "%processing_dir%\xml-to-top-index.xsl" "%source_dir%\tutorial_en.xml" %* > "%output_dir%\index.html"
|
---|
[17495] | 30 |
|
---|
[13636] | 31 | echo "generating wiki index page"
|
---|
[25472] | 32 | java -cp "%CLASSPATH%" -DGSDLHOME="%GSDLHOME%" ApplyXSLT "en" "%processing_dir%\xml-to-wiki-index.xsl" "%source_dir%\tutorial_en.xml" %* > "%output_dir%\wiki-index.txt"
|
---|
[13636] | 33 |
|
---|
| 34 |
|
---|
[25472] | 35 | for %%G IN (en,fr,ru,es) do (
|
---|
| 36 | if not exist "html\%%G" mkdir html\%%G
|
---|
[13636] | 37 |
|
---|
[25472] | 38 | echo "procesing %%G version"
|
---|
| 39 | cd %output_dir%\%%G
|
---|
| 40 | java -cp "%CLASSPATH%" -DGSDLHOME="%GSDLHOME%" ApplyXSLT %%G "%processing_dir%\xml-to-index.xsl" "%source_dir%\tutorial_%%G.xml" %* > "index.html"
|
---|
| 41 | java -cp "%CLASSPATH%" -DGSDLHOME="%GSDLHOME%" ApplyXSLT %%G "%processing_dir%\xml-to-one-html.xsl" "%source_dir%\tutorial_%%G.xml" %* > "all_tutorials.html"
|
---|
| 42 | java -cp "%CLASSPATH%" -DGSDLHOME="%GSDLHOME%" ApplyXSLT %%G "%processing_dir%\xml-to-many-html.xsl" "%source_dir%\tutorial_%%G.xml" %* | perl -S "%GSDLHOME%\gli\help\splithelpdocument.pl"
|
---|
[13636] | 43 | cd ..
|
---|
[25472] | 44 | )
|
---|
[13636] | 45 |
|
---|
[25472] | 46 | endlocal
|
---|
[13636] | 47 |
|
---|
| 48 | :exit:
|
---|
| 49 |
|
---|
| 50 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.