root/documentation/trunk/tutorials/generate-html.bat @ 20953

Revision 20953, 4.0 KB (checked in by davidb, 11 years ago)

ApplyXSLT now takes an extra parameter (for language). Minor tweaks to these scripts to take account of that

  • Property svn:keywords set to Author Date Id Revision
Line 
1@echo off
2
3if not "%GSDLHOME%" == "" goto generate
4
5echo You must run 'setup' in the top level folder of your Greenstone installation before running this script
6goto exit
7
8:generate:
9mkdir html
10cd html
11:generate:
12mkdir en
13mkdir fr
14mkdir ru
15mkdir es
16cd ..
17
18set top_dir=%CD%
19set source_dir=%CD%\xml-source
20set processing_dir=%CD%\processing
21set output_dir=%CD%\html
22cd ..
23cd shared
24set shared_dir=%CD%
25cd %output_dir%
26
27echo "processing top level index"
28
29java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT "" "%processing_dir%\xml-to-top-index.xsl"  "%source_dir%\tutorial_en.xml" > "%output_dir%\index.html"
30
31echo "generating wiki index page"
32java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT "" "%processing_dir%\xml-to-wiki-index.xsl" "%source_dir%\tutorial_en.xml" > "%output_dir%\wiki-index.txt"
33
34echo "procesing english version"
35
36cd %output_dir%\en
37java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT en "%processing_dir%\xml-to-index.xsl" "%source_dir%\tutorial_en.xml" > "index.html"
38java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT en "%processing_dir%\xml-to-one-html.xsl" "%source_dir%\tutorial_en.xml" > "all_tutorials.html"
39java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT en "%processing_dir%\xml-to-many-html.xsl" "%source_dir%\tutorial_en.xml" | perl -S "%GSDLHOME%\gli\help\splithelpdocument.pl"
40cd ..
41
42echo "procesing french version"
43cd %output_dir%\fr
44java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT fr "%processing_dir%\xml-to-index.xsl" "%source_dir%\tutorial_fr.xml" > index.html
45java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT fr "%processing_dir%\xml-to-one-html.xsl" "%source_dir%\tutorial_fr.xml" > all_tutorials.html
46java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT fr "%processing_dir%\xml-to-many-html.xsl" "%source_dir%\tutorial_fr.xml" | perl -S "%GSDLHOME%\gli\help\splithelpdocument.pl"
47cd ..
48
49echo "procesing spanish version"
50cd %output_dir%\es
51java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT es "%processing_dir%\xml-to-index.xsl" "%source_dir%\tutorial_es.xml" > index.html
52java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT es "%processing_dir%\xml-to-one-html.xsl" "%source_dir%\tutorial_es.xml" > all_tutorials.html
53java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT es "%processing_dir%\xml-to-many-html.xsl" "%source_dir%\tutorial_es.xml" | perl -S "%GSDLHOME%\gli\help\splithelpdocument.pl"
54cd ..
55
56echo "procesing russian version"
57cd %output_dir%\ru
58java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT ru "%processing_dir%\xml-to-index.xsl" "%source_dir%\tutorial_ru.xml" > index.html
59java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT ru "%processing_dir%\xml-to-one-html.xsl" "%source_dir%\tutorial_ru.xml" > all_tutorials.html
60java -cp "%shared_dir%;%GSDLHOME%\gli;%GSDLHOME%\gli\classes;%GSDLHOME%\perllib;%shared_dir%\xalan.jar" -DGSDLHOME="%GSDLHOME%" ApplyXSLT ru "%processing_dir%\xml-to-many-html.xsl" "%source_dir%\tutorial_ru.xml" | perl -S "%GSDLHOME%\gli\help\splithelpdocument.pl"
61
62cd ..
63
64:exit:
65
66
Note: See TracBrowser for help on using the browser.