diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /buildscripts/texbuilder/quickstart | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'buildscripts/texbuilder/quickstart')
-rw-r--r-- | buildscripts/texbuilder/quickstart/build.php | 162 | ||||
-rw-r--r-- | buildscripts/texbuilder/quickstart/pages.php | 356 |
2 files changed, 259 insertions, 259 deletions
diff --git a/buildscripts/texbuilder/quickstart/build.php b/buildscripts/texbuilder/quickstart/build.php index 81a12d4c..a42d6be3 100644 --- a/buildscripts/texbuilder/quickstart/build.php +++ b/buildscripts/texbuilder/quickstart/build.php @@ -1,81 +1,81 @@ -<?php
-
-// TBD: subsections in Control Reference
-
-$pdflatexExec = "C:/Wei/miktex/texmf/MiKTeX/bin/pdflatex.exe";
-$pdfTex = "$pdflatexExec -interaction=nonstopmode -max-print-line=120 %s";
-
-$mainTexFile = dirname(__FILE__).'/quickstart.tex';
-
-//page root location
-$base = realpath(dirname(__FILE__).'/../../../demos/quickstart/protected/pages/');
-
-$pages = include('pages.php');
-
-//-------------- END CONFIG ------------------
-
-include(dirname(__FILE__).'.../../../texbuilder/Page2Tex.php');
-
-// ---------------- Create the Tex files ---------
-$count = 1;
-$j = 1;
-$current_path = '';
-echo "Compiling .page files to Latex files\n\n";
-
-$parser = new Page2Tex($base, dirname(__FILE__));
-
-foreach($pages as $chapter => $sections)
-{
- $content = '\chapter{'.$chapter.'}'.$parser->get_chapter_label($chapter);
- echo "Creating ch{$count}.txt => Chapter {$count}: {$chapter}\n";
- echo str_repeat('-',60)."\n";
- foreach($sections as $section)
- {
- echo " Adding $section\n";
- $page = $base.'/'.$section;
- $current_path = $page;
- $parser->setCurrentPage($current_path);
-
- //add id to <h1>, <h2>, <h3> and <p>
- $tmp_content = $parser->set_header_id(file_get_contents($page),$j++);
- file_put_contents($page, $tmp_content);
-
- $content .= $parser->get_section_label($section);
- $file_content = file_get_contents($page);
- //$tex =
- $content .= $parser->parse_html($page,$file_content);
- }
-
- //var_dump($content);
- file_put_contents("ch{$count}.tex", $content);
- $count++;
- echo "\n";
-}
-
-//$indexer->commit();
-
-if($argc <= 1 && $count > 1)
-{
- echo "** Use pdflatex to compile quickstart.tex to obtain PDF version of quickstart tutorial. **\n";
- exit;
-}
-if($argv[1] == 'pdf')
-{
- if(is_file($pdflatexExec))
- {
- //build pdfTex
- $command=sprintf($pdfTex,$mainTexFile);
- system($command);
- system($command); //run it twice
-
- echo "\n\n** PDF file quickstart.pdf created **\n\n";
-
- }
- else
- {
- echo " Unable to find pdfLatex executable $pdflatexExec";
- }
-}
-
-
-?>
+<?php + +// TBD: subsections in Control Reference + +$pdflatexExec = "C:/Wei/miktex/texmf/MiKTeX/bin/pdflatex.exe"; +$pdfTex = "$pdflatexExec -interaction=nonstopmode -max-print-line=120 %s"; + +$mainTexFile = dirname(__FILE__).'/quickstart.tex'; + +//page root location +$base = realpath(dirname(__FILE__).'/../../../demos/quickstart/protected/pages/'); + +$pages = include('pages.php'); + +//-------------- END CONFIG ------------------ + +include(dirname(__FILE__).'.../../../texbuilder/Page2Tex.php'); + +// ---------------- Create the Tex files --------- +$count = 1; +$j = 1; +$current_path = ''; +echo "Compiling .page files to Latex files\n\n"; + +$parser = new Page2Tex($base, dirname(__FILE__)); + +foreach($pages as $chapter => $sections) +{ + $content = '\chapter{'.$chapter.'}'.$parser->get_chapter_label($chapter); + echo "Creating ch{$count}.txt => Chapter {$count}: {$chapter}\n"; + echo str_repeat('-',60)."\n"; + foreach($sections as $section) + { + echo " Adding $section\n"; + $page = $base.'/'.$section; + $current_path = $page; + $parser->setCurrentPage($current_path); + + //add id to <h1>, <h2>, <h3> and <p> + $tmp_content = $parser->set_header_id(file_get_contents($page),$j++); + file_put_contents($page, $tmp_content); + + $content .= $parser->get_section_label($section); + $file_content = file_get_contents($page); + //$tex = + $content .= $parser->parse_html($page,$file_content); + } + + //var_dump($content); + file_put_contents("ch{$count}.tex", $content); + $count++; + echo "\n"; +} + +//$indexer->commit(); + +if($argc <= 1 && $count > 1) +{ + echo "** Use pdflatex to compile quickstart.tex to obtain PDF version of quickstart tutorial. **\n"; + exit; +} +if($argv[1] == 'pdf') +{ + if(is_file($pdflatexExec)) + { + //build pdfTex + $command=sprintf($pdfTex,$mainTexFile); + system($command); + system($command); //run it twice + + echo "\n\n** PDF file quickstart.pdf created **\n\n"; + + } + else + { + echo " Unable to find pdfLatex executable $pdflatexExec"; + } +} + + +?> diff --git a/buildscripts/texbuilder/quickstart/pages.php b/buildscripts/texbuilder/quickstart/pages.php index a99a2a35..8bb34625 100644 --- a/buildscripts/texbuilder/quickstart/pages.php +++ b/buildscripts/texbuilder/quickstart/pages.php @@ -1,179 +1,179 @@ -<?php
-/*
- * $Id$
- */
-
-//list page into chapters
-$pages['Getting Started'] = array(
- 'GettingStarted/Introduction.page',
- 'GettingStarted/AboutPrado.page',
- 'GettingStarted/Installation.page',
- 'GettingStarted/NewFeatures.page',
- 'GettingStarted/Upgrading.page'
- );
-
-$pages['Tutorials'] = array(
- 'GettingStarted/HelloWorld.page',
- 'Fundamentals/Hangman.page',
- 'GettingStarted/CommandLine.page'
- );
-
-$pages['Tutorial: Currency Converter'] = array(
- 'Tutorial/CurrencyConverter.page'
- );
-
-$pages['Tutorial: Building an AJAX Chat Application'] = array(
- 'Tutorial/AjaxChat.page'
- );
-
-$pages['Tutorial: Addressbook'] = array(
- 'Tutorial/AddressBook.page'
- );
-
-$pages['Fundamentals'] = array(
- 'Fundamentals/Architecture.page',
- 'Fundamentals/Components.page',
- 'Fundamentals/Controls.page',
- 'Fundamentals/Pages.page',
- 'Fundamentals/Modules.page',
- 'Fundamentals/Services.page',
- 'Fundamentals/Applications.page'
- );
-
-$pages['Configurations'] = array(
- 'Configurations/Overview.page',
- 'Configurations/Templates1.page',
- 'Configurations/Templates2.page',
- 'Configurations/Templates3.page',
- 'Configurations/AppConfig.page',
- 'Configurations/PageConfig.page',
- 'Configurations/UrlMapping.page'
- );
-
-$pages['Control Reference : Standard Controls'] = array(
- 'Controls/Standard.page',
- 'Controls/Button.page',
- 'Controls/Captcha.page',
- 'Controls/CheckBox.page',
- 'Controls/ClientScript.page',
- 'Controls/ClientScriptLoader.page',
- 'Controls/Conditional.page',
- 'Controls/ColorPicker.page',
- 'Controls/DatePicker.page',
- 'Controls/Expression.page',
- 'Controls/FileUpload.page',
- 'Controls/Head.page',
- 'Controls/HiddenField.page',
- 'Controls/HtmlArea.page',
- 'Controls/HyperLink.page',
- 'Controls/ImageButton.page',
- 'Controls/ImageMap.page',
- 'Controls/Image.page',
- 'Controls/InlineFrame.page',
- 'Controls/JavascriptLogger.page',
- 'Controls/Keyboard.page',
- 'Controls/Label.page',
- 'Controls/LinkButton.page',
- 'Controls/Literal.page',
- 'Controls/MultiView.page',
- 'Controls/OutputCache.page',
- 'Controls/Pager.page',
- 'Controls/Panel.page',
- 'Controls/PlaceHolder.page',
- 'Controls/RadioButton.page',
- 'Controls/SafeHtml.page',
- 'Controls/Slider.page',
- 'Controls/Statements.page',
- 'Controls/Table.page',
- 'Controls/TabPanel.page',
- 'Controls/TextBox.page',
- 'Controls/TextHighlighter.page',
- 'Controls/Wizard.page');
-
-$pages['Control Reference : List Controls'] = array(
- 'Controls/List.page');
-
-$pages['Control Reference : Validation Controls'] = array(
- 'Controls/Validation.page');
-
-$pages['Control Reference : Data Controls'] = array(
- 'Controls/Data.page',
- 'Controls/DataList.page',
- 'Controls/DataGrid.page',
- 'Controls/Repeater.page');
-
-$pages['Control Reference : Active Controls (AJAX)'] = array(
- 'ActiveControls/ActiveButton.page',
- 'ActiveControls/ActiveCheckBox.page',
- 'ActiveControls/ActiveCheckBoxList.page',
- 'ActiveControls/ActiveCustomValidator.page',
- 'ActiveControls/ActiveDataList.page',
- 'ActiveControls/ActiveDataGrid.page',
- 'ActiveControls/ActiveDatePicker.page',
- 'ActiveControls/ActiveDropDownList.page',
- 'ActiveControls/ActiveFileUpload.page',
- 'ActiveControls/ActiveHiddenField.page',
- 'ActiveControls/ActiveHyperLink.page',
- 'ActiveControls/ActiveImage.page',
- 'ActiveControls/ActiveImageButton.page',
- 'ActiveControls/ActiveLabel.page',
- 'ActiveControls/ActiveLinkButton.page',
- 'ActiveControls/ActiveListBox.page',
- 'ActiveControls/ActiveMultiView.page',
- 'ActiveControls/ActivePager.page',
- 'ActiveControls/ActivePanel.page',
- 'ActiveControls/ActiveRadioButton.page',
- 'ActiveControls/ActiveRadioButtonList.page',
- 'ActiveControls/ActiveRepeater.page',
- 'ActiveControls/ActiveTextBox.page',
- 'ActiveControls/AutoComplete.page',
- 'ActiveControls/Callback.page',
- 'ActiveControls/CallbackClientScript.page',
- 'ActiveControls/CallbackClientSide.page',
- 'ActiveControls/CallbackEventParameter.page',
- 'ActiveControls/CallbackOptions.page',
- 'ActiveControls/DragDrop.page',
- 'ActiveControls/EventTriggeredCallback.page',
- 'ActiveControls/InPlaceTextBox.page',
- 'ActiveControls/TimeTriggeredCallback.page',
- 'ActiveControls/ValueTriggeredCallback.page');
-
-$pages['Active Control Overview'] = array(
- 'ActiveControls/Home.page',
- 'ActiveControls/Introduction.page');
-
-$pages['Write New Controls'] = array(
- 'Controls/NewControl.page');
-
-$pages['Service References'] = array(
- 'Services/SoapService.page');
-
-$pages['Working with Databases'] = array(
- 'Database/DAO.page',
- 'Database/ActiveRecord.page',
- 'Database/Scaffold.page',
- 'Database/SqlMap.page');
-
-$pages['Advanced Topics'] = array(
- 'Advanced/Collections.page',
- 'Advanced/Auth.page',
- 'Advanced/Security.page',
- 'Advanced/Assets.page',
- 'Advanced/MasterContent.page',
- 'Advanced/Themes.page',
- 'Advanced/State.page',
- 'Advanced/Logging.page',
- 'Advanced/I18N.page',
- 'Advanced/Error.page',
- 'Advanced/Performance.page');
-
-$pages['Client-side Scripting'] = array(
- 'Advanced/Scripts.page',
- 'Advanced/Scripts1.page',
- 'Advanced/Scripts2.page',
- 'Advanced/Scripts3.page');
-
-return $pages;
-//-------------- END CONFIG ----------------
-
+<?php +/* + * $Id$ + */ + +//list page into chapters +$pages['Getting Started'] = array( + 'GettingStarted/Introduction.page', + 'GettingStarted/AboutPrado.page', + 'GettingStarted/Installation.page', + 'GettingStarted/NewFeatures.page', + 'GettingStarted/Upgrading.page' + ); + +$pages['Tutorials'] = array( + 'GettingStarted/HelloWorld.page', + 'Fundamentals/Hangman.page', + 'GettingStarted/CommandLine.page' + ); + +$pages['Tutorial: Currency Converter'] = array( + 'Tutorial/CurrencyConverter.page' + ); + +$pages['Tutorial: Building an AJAX Chat Application'] = array( + 'Tutorial/AjaxChat.page' + ); + +$pages['Tutorial: Addressbook'] = array( + 'Tutorial/AddressBook.page' + ); + +$pages['Fundamentals'] = array( + 'Fundamentals/Architecture.page', + 'Fundamentals/Components.page', + 'Fundamentals/Controls.page', + 'Fundamentals/Pages.page', + 'Fundamentals/Modules.page', + 'Fundamentals/Services.page', + 'Fundamentals/Applications.page' + ); + +$pages['Configurations'] = array( + 'Configurations/Overview.page', + 'Configurations/Templates1.page', + 'Configurations/Templates2.page', + 'Configurations/Templates3.page', + 'Configurations/AppConfig.page', + 'Configurations/PageConfig.page', + 'Configurations/UrlMapping.page' + ); + +$pages['Control Reference : Standard Controls'] = array( + 'Controls/Standard.page', + 'Controls/Button.page', + 'Controls/Captcha.page', + 'Controls/CheckBox.page', + 'Controls/ClientScript.page', + 'Controls/ClientScriptLoader.page', + 'Controls/Conditional.page', + 'Controls/ColorPicker.page', + 'Controls/DatePicker.page', + 'Controls/Expression.page', + 'Controls/FileUpload.page', + 'Controls/Head.page', + 'Controls/HiddenField.page', + 'Controls/HtmlArea.page', + 'Controls/HyperLink.page', + 'Controls/ImageButton.page', + 'Controls/ImageMap.page', + 'Controls/Image.page', + 'Controls/InlineFrame.page', + 'Controls/JavascriptLogger.page', + 'Controls/Keyboard.page', + 'Controls/Label.page', + 'Controls/LinkButton.page', + 'Controls/Literal.page', + 'Controls/MultiView.page', + 'Controls/OutputCache.page', + 'Controls/Pager.page', + 'Controls/Panel.page', + 'Controls/PlaceHolder.page', + 'Controls/RadioButton.page', + 'Controls/SafeHtml.page', + 'Controls/Slider.page', + 'Controls/Statements.page', + 'Controls/Table.page', + 'Controls/TabPanel.page', + 'Controls/TextBox.page', + 'Controls/TextHighlighter.page', + 'Controls/Wizard.page'); + +$pages['Control Reference : List Controls'] = array( + 'Controls/List.page'); + +$pages['Control Reference : Validation Controls'] = array( + 'Controls/Validation.page'); + +$pages['Control Reference : Data Controls'] = array( + 'Controls/Data.page', + 'Controls/DataList.page', + 'Controls/DataGrid.page', + 'Controls/Repeater.page'); + +$pages['Control Reference : Active Controls (AJAX)'] = array( + 'ActiveControls/ActiveButton.page', + 'ActiveControls/ActiveCheckBox.page', + 'ActiveControls/ActiveCheckBoxList.page', + 'ActiveControls/ActiveCustomValidator.page', + 'ActiveControls/ActiveDataList.page', + 'ActiveControls/ActiveDataGrid.page', + 'ActiveControls/ActiveDatePicker.page', + 'ActiveControls/ActiveDropDownList.page', + 'ActiveControls/ActiveFileUpload.page', + 'ActiveControls/ActiveHiddenField.page', + 'ActiveControls/ActiveHyperLink.page', + 'ActiveControls/ActiveImage.page', + 'ActiveControls/ActiveImageButton.page', + 'ActiveControls/ActiveLabel.page', + 'ActiveControls/ActiveLinkButton.page', + 'ActiveControls/ActiveListBox.page', + 'ActiveControls/ActiveMultiView.page', + 'ActiveControls/ActivePager.page', + 'ActiveControls/ActivePanel.page', + 'ActiveControls/ActiveRadioButton.page', + 'ActiveControls/ActiveRadioButtonList.page', + 'ActiveControls/ActiveRepeater.page', + 'ActiveControls/ActiveTextBox.page', + 'ActiveControls/AutoComplete.page', + 'ActiveControls/Callback.page', + 'ActiveControls/CallbackClientScript.page', + 'ActiveControls/CallbackClientSide.page', + 'ActiveControls/CallbackEventParameter.page', + 'ActiveControls/CallbackOptions.page', + 'ActiveControls/DragDrop.page', + 'ActiveControls/EventTriggeredCallback.page', + 'ActiveControls/InPlaceTextBox.page', + 'ActiveControls/TimeTriggeredCallback.page', + 'ActiveControls/ValueTriggeredCallback.page'); + +$pages['Active Control Overview'] = array( + 'ActiveControls/Home.page', + 'ActiveControls/Introduction.page'); + +$pages['Write New Controls'] = array( + 'Controls/NewControl.page'); + +$pages['Service References'] = array( + 'Services/SoapService.page'); + +$pages['Working with Databases'] = array( + 'Database/DAO.page', + 'Database/ActiveRecord.page', + 'Database/Scaffold.page', + 'Database/SqlMap.page'); + +$pages['Advanced Topics'] = array( + 'Advanced/Collections.page', + 'Advanced/Auth.page', + 'Advanced/Security.page', + 'Advanced/Assets.page', + 'Advanced/MasterContent.page', + 'Advanced/Themes.page', + 'Advanced/State.page', + 'Advanced/Logging.page', + 'Advanced/I18N.page', + 'Advanced/Error.page', + 'Advanced/Performance.page'); + +$pages['Client-side Scripting'] = array( + 'Advanced/Scripts.page', + 'Advanced/Scripts1.page', + 'Advanced/Scripts2.page', + 'Advanced/Scripts3.page'); + +return $pages; +//-------------- END CONFIG ---------------- + ?>
\ No newline at end of file |