Changeset 1055 for trunk/buildscripts

Show
Ignore:
Timestamp:
05/12/2006 07:38:32 AM (3 years ago)
Author:
xue
Message:

Merge from 3.0 branch till 1054.

Location:
trunk/buildscripts
Files:
1 removed
1 modified
5 copied

Legend:

Unmodified
Added
Removed
  • trunk/buildscripts/texbuilder/build.php

    r1047 r1055  
    1111$base = realpath(dirname(__FILE__).'/../../demos/quickstart/protected/pages/'); 
    1212 
    13 //search index data directory 
    14 $index_dir = realpath(dirname(__FILE__).'/../../demos/quickstart/protected/index/data/'); 
    15  
    16  
    17 //list page into chapters 
    18 $pages['Getting Started'] = array( 
    19         'GettingStarted/Introduction.page', 
    20         'GettingStarted/AboutPrado.page', 
    21         'GettingStarted/Installation.page', 
    22         'GettingStarted/HelloWorld.page', 
    23         'GettingStarted/Upgrading.page' 
    24         ); 
    25  
    26 $pages['Fundamentals'] = array( 
    27         'Fundamentals/Architecture.page', 
    28     'Fundamentals/Components.page', 
    29     'Fundamentals/Controls.page', 
    30     'Fundamentals/Pages.page', 
    31     'Fundamentals/Modules.page', 
    32     'Fundamentals/Services.page', 
    33     'Fundamentals/Applications.page', 
    34     'Fundamentals/Hangman.page'); 
    35  
    36 $pages['Configurations'] = array( 
    37         'Configurations/Overview.page', 
    38         'Configurations/Templates1.page', 
    39         'Configurations/Templates2.page', 
    40         'Configurations/Templates3.page', 
    41         'Configurations/AppConfig.page', 
    42         'Configurations/PageConfig.page'); 
    43  
    44 $pages['Control Reference : Standard Controls'] = array( 
    45         'Controls/Button.page', 
    46         'Controls/CheckBox.page', 
    47         'Controls/ColorPicker.page', 
    48         'Controls/DatePicker.page', 
    49         'Controls/Expression.page', 
    50         'Controls/FileUpload.page', 
    51         'Controls/Head.page', 
    52         'Controls/HiddenField.page', 
    53         'Controls/HtmlArea.page', 
    54         'Controls/HyperLink.page', 
    55         'Controls/ImageButton.page', 
    56         'Controls/ImageMap.page', 
    57         'Controls/Image.page', 
    58         'Controls/InlineFrame.page', 
    59         'Controls/JavascriptLogger.page', 
    60         'Controls/Label.page', 
    61         'Controls/LinkButton.page', 
    62         'Controls/Literal.page', 
    63         'Controls/MultiView.page', 
    64         'Controls/Panel.page', 
    65         'Controls/PlaceHolder.page', 
    66         'Controls/RadioButton.page', 
    67         'Controls/SafeHtml.page', 
    68         'Controls/Statements.page', 
    69         'Controls/Table.page', 
    70         'Controls/TextBox.page', 
    71         'Controls/TextHighlighter.page', 
    72         'Controls/Wizard.page'); 
    73  
    74 $pages['Control Reference : List Controls'] = array( 
    75         'Controls/List.page'); 
    76  
    77 $pages['Control Reference : Validation Controls'] = array( 
    78         'Controls/Validation.page'); 
    79  
    80 $pages['Control Reference : Data Controls'] = array( 
    81         'Controls/Data.page', 
    82         'Controls/DataList.page', 
    83         'Controls/DataGrid.page', 
    84         'Controls/Repeater.page'); 
    85  
    86 $pages['Write New Controls'] = array( 
    87         'Controls/NewControl.page'); 
    88  
    89 $pages['Advanced Topics'] = array( 
    90         'Advanced/Auth.page', 
    91         'Advanced/Security.page', 
    92         'Advanced/Assets.page', 
    93         'Advanced/MasterContent.page', 
    94         'Advanced/Themes.page', 
    95         'Advanced/State.page', 
    96         'Advanced/Logging.page', 
    97         'Advanced/I18N.page', 
    98         'Advanced/Error.page', 
    99         'Advanced/Performance.page'); 
    100  
    101 $pages['Client-side Scripting'] = array( 
    102         'Advanced/Scripts.page', 
    103         'Advanced/Scripts1.page', 
    104         'Advanced/Scripts2.page', 
    105         'Advanced/Scripts3.page'); 
    106  
    10713//-------------- END CONFIG ------------------ 
    10814 
     15$pages = include('pages.php'); 
    10916 
    11017function escape_verbatim($matches) 
     
    260167 
    261168        //headings 
    262         $html = preg_replace('/<h1>([^<]+)<\/h1>/', '\section{$1}', $html); 
    263         $html = preg_replace('/<h2>([^<]+)<\/h2>/', '\subsection{$1}', $html); 
    264         $html = preg_replace('/<h3>([^<]+)<\/h3>/', '\subsubsection{$1}', $html); 
     169        $html = preg_replace('/<h1\s+id="[^"]+">([^<]+)<\/h1>/', '\section{$1}', $html); 
     170        $html = preg_replace('/<h2\s+id="[^"]+">([^<]+)<\/h2>/', '\subsection{$1}', $html); 
     171        $html = preg_replace('/<h3\s+id="[^"]+">([^<]+)<\/h3>/', '\subsubsection{$1}', $html); 
    265172 
    266173 
     
    319226//--------------- Indexer ------------------- 
    320227 
    321 require_once('create_index.php'); 
    322 $indexer = new quickstart_index($index_dir); 
     228//require_once('create_index.php'); 
     229//$indexer = new quickstart_index($index_dir); 
    323230 
    324231// ---------------- Create the Tex files --------- 
     
    340247                 
    341248                //add id to <h1>, <h2>, <3> 
    342                 $content = set_header_id(file_get_contents($page),$j++); 
    343                 file_put_contents($page, $content); 
     249                $tmp_content = set_header_id(file_get_contents($page),$j++); 
     250                file_put_contents($page, $tmp_content); 
    344251                 
    345252                $content .= get_section_label($section); 
    346253                $file_content = file_get_contents($page); 
    347                 $tex = parse_html($page,$file_content); 
    348                 $content .= $tex; 
    349                 $indexer->add($file_content,$section, filemtime($page)); 
     254                $tex =  
     255                $content .= parse_html($page,$file_content); 
    350256        } 
    351257 
     
    356262} 
    357263 
    358 $indexer->commit(); 
     264//$indexer->commit(); 
    359265 
    360266if($argc <= 1 && $count > 1)