summaryrefslogtreecommitdiff
path: root/buildscripts/texbuilder/build.php
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/texbuilder/build.php')
-rw-r--r--buildscripts/texbuilder/build.php116
1 files changed, 11 insertions, 105 deletions
diff --git a/buildscripts/texbuilder/build.php b/buildscripts/texbuilder/build.php
index f0556e3f..cbea9859 100644
--- a/buildscripts/texbuilder/build.php
+++ b/buildscripts/texbuilder/build.php
@@ -10,102 +10,9 @@ $mainTexFile = dirname(__FILE__).'/prado3_quick_start.tex';
//page root location
$base = realpath(dirname(__FILE__).'/../../demos/quickstart/protected/pages/');
-//search index data directory
-$index_dir = realpath(dirname(__FILE__).'/../../demos/quickstart/protected/index/data/');
-
-
-//list page into chapters
-$pages['Getting Started'] = array(
- 'GettingStarted/Introduction.page',
- 'GettingStarted/AboutPrado.page',
- 'GettingStarted/Installation.page',
- 'GettingStarted/HelloWorld.page',
- 'GettingStarted/Upgrading.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',
- 'Fundamentals/Hangman.page');
-
-$pages['Configurations'] = array(
- 'Configurations/Overview.page',
- 'Configurations/Templates1.page',
- 'Configurations/Templates2.page',
- 'Configurations/Templates3.page',
- 'Configurations/AppConfig.page',
- 'Configurations/PageConfig.page');
-
-$pages['Control Reference : Standard Controls'] = array(
- 'Controls/Button.page',
- 'Controls/CheckBox.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/Label.page',
- 'Controls/LinkButton.page',
- 'Controls/Literal.page',
- 'Controls/MultiView.page',
- 'Controls/Panel.page',
- 'Controls/PlaceHolder.page',
- 'Controls/RadioButton.page',
- 'Controls/SafeHtml.page',
- 'Controls/Statements.page',
- 'Controls/Table.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['Write New Controls'] = array(
- 'Controls/NewControl.page');
-
-$pages['Advanced Topics'] = array(
- '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');
-
//-------------- END CONFIG ------------------
+$pages = include('pages.php');
function escape_verbatim($matches)
{
@@ -259,9 +166,9 @@ function parse_html($page,$html)
$html = preg_replace('/<\/li>/', '', $html);
//headings
- $html = preg_replace('/<h1>([^<]+)<\/h1>/', '\section{$1}', $html);
- $html = preg_replace('/<h2>([^<]+)<\/h2>/', '\subsection{$1}', $html);
- $html = preg_replace('/<h3>([^<]+)<\/h3>/', '\subsubsection{$1}', $html);
+ $html = preg_replace('/<h1\s+id="[^"]+">([^<]+)<\/h1>/', '\section{$1}', $html);
+ $html = preg_replace('/<h2\s+id="[^"]+">([^<]+)<\/h2>/', '\subsection{$1}', $html);
+ $html = preg_replace('/<h3\s+id="[^"]+">([^<]+)<\/h3>/', '\subsubsection{$1}', $html);
@@ -318,8 +225,8 @@ $header_count = 0;
//--------------- Indexer -------------------
-require_once('create_index.php');
-$indexer = new quickstart_index($index_dir);
+//require_once('create_index.php');
+//$indexer = new quickstart_index($index_dir);
// ---------------- Create the Tex files ---------
$count = 1;
@@ -339,14 +246,13 @@ foreach($pages as $chapter => $sections)
$current_path = $page;
//add id to <h1>, <h2>, <3>
- $content = set_header_id(file_get_contents($page),$j++);
- file_put_contents($page, $content);
+ $tmp_content = set_header_id(file_get_contents($page),$j++);
+ file_put_contents($page, $tmp_content);
$content .= get_section_label($section);
$file_content = file_get_contents($page);
- $tex = parse_html($page,$file_content);
- $content .= $tex;
- $indexer->add($file_content,$section, filemtime($page));
+ $tex =
+ $content .= parse_html($page,$file_content);
}
//var_dump($content);
@@ -355,7 +261,7 @@ foreach($pages as $chapter => $sections)
echo "\n";
}
-$indexer->commit();
+//$indexer->commit();
if($argc <= 1 && $count > 1)
{