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
|
Line | |
---|
1 | @echo off
|
---|
2 |
|
---|
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
|
---|
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
|
---|
8 | echo Usage: $0 [gs-major-version-number=2]
|
---|
9 | goto exit
|
---|
10 |
|
---|
11 | setlocal
|
---|
12 |
|
---|
13 | set top_dir=%CD%
|
---|
14 | set source_dir=%CD%\xml-source
|
---|
15 | set processing_dir=%CD%\processing
|
---|
16 | set output_dir=%CD%\html
|
---|
17 | :generate:
|
---|
18 | if not exist "%output_dir" mkdir %output_dir%
|
---|
19 | cd ..
|
---|
20 | cd shared
|
---|
21 | set shared_dir=%CD%
|
---|
22 | cd %output_dir%
|
---|
23 |
|
---|
24 |
|
---|
25 | set CLASSPATH=%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar
|
---|
26 |
|
---|
27 | echo "processing top level index"
|
---|
28 |
|
---|
29 | java -cp "%CLASSPATH%" -DGSDLHOME="%GSDLHOME%" ApplyXSLT "en" "%processing_dir%\xml-to-top-index.xsl" "%source_dir%\tutorial_en.xml" %* > "%output_dir%\index.html"
|
---|
30 |
|
---|
31 | echo "generating wiki index page"
|
---|
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"
|
---|
33 |
|
---|
34 |
|
---|
35 | for %%G IN (en,fr,ru,es) do (
|
---|
36 | if not exist "html\%%G" mkdir html\%%G
|
---|
37 |
|
---|
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"
|
---|
43 | cd ..
|
---|
44 | )
|
---|
45 |
|
---|
46 | endlocal
|
---|
47 |
|
---|
48 | :exit:
|
---|
49 |
|
---|
50 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.