source: documentation/trunk/tutorials/generate-html.bat@ 17495

Last change on this file since 17495 was 17495, checked in by anna, 13 years ago

Added quote around the paths so that it's safe to have spaces in paths".

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
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 "%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 "%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 "%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 "%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 "%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 "%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 "%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 "%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 "%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 "%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 "%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 "%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 repository browser.