Index: common-build.xml =================================================================== --- common-build.xml (revision 615010) +++ common-build.xml (working copy) @@ -144,7 +144,7 @@ - + @@ -211,7 +211,7 @@ - + + + + + - + + + + + - - - - - - - - - - - + Index: src/site/src/documentation/content/xdocs/site.xml =================================================================== --- src/site/src/documentation/content/xdocs/site.xml (revision 615010) +++ src/site/src/documentation/content/xdocs/site.xml (working copy) @@ -43,6 +43,7 @@ + Index: changes2html.pl =================================================================== --- changes2html.pl (revision 0) +++ changes2html.pl (revision 0) @@ -0,0 +1,440 @@ +#!/usr/bin/perl +# +# Transforms Lucene Java's CHANGES.txt into Changes.html +# +# Input is on STDIN, output is to STDOUT +# +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +use strict; +use warnings; + +my $jira_url_prefix = 'http://issues.apache.org/jira/browse/'; +my $bugzilla_url_prefix = 'http://issues.apache.org/bugzilla/show_bug.cgi?id='; + +my %release_dates = ( '0.01' => '2000-03-30', '0.04' => '2000-04-19', + '1.0' => '2000-10-04', '1.01b' => '2001-06-02', + '1.2 RC1' => '2001-10-02', '1.2 RC2' => '2001-10-19', + '1.2 RC3' => '2002-01-27', '1.2 RC4' => '2002-02-14', + '1.2 RC5' => '2002-05-14', '1.2 final' => '2002-06-13', + '1.3 RC1' => '2003-03-24', '1.3 RC2' => '2003-10-22', + '1.3 RC3' => '2003-11-25', '1.3 final' => '2003-12-26', + '1.4 RC1' => '2004-03-29', '1.4 RC2' => '2004-03-30', + '1.4 RC3' => '2004-05-11', '1.4 final' => '2004-07-01', + '1.4.1' => '2004-08-02', '1.4.2' => '2004-10-01', + '1.4.3' => '2004-12-07', '1.9 RC1' => '2006-02-21', + '1.9 final' => '2006-02-27', '1.9.1' => '2006-03-02', + '2.0.0' => '2006-05-26', '2.1.0' => '2007-02-14', + '2.2.0' => '2007-06-19', '2.3.0' => '2008-01-23' ); +my $month_regex = '(?i:Jan(?:|\.|uary)|Feb(?:|\.|ruary)|Mar(?:|\.|ch)' + . '|Apr(?:|\.|il)|May|Jun(?:|\.|e)|Jul(?:|\.|y)|Aug(?:|\.|ust)' + . '|Sep(?:|\.|t(?:|\.|ember))|Oct(?:|\.|ober)|Nov(?:|\.|ember)' + . '|Dec(?:|\.|ember))'; +my %month_nums = ( 'Jan' => '01', 'Jan.' => '01', 'January' => '01', + 'Feb' => '02', 'Feb.' => '02', 'February' => '02', + 'Mar' => '03', 'Mar.' => '03', 'March' => '03', + 'Apr' => '04', 'Apr.' => '04', 'April' => '04', + 'May' => '05', + 'Jun' => '06', 'Jun.' => '06', 'June' => '06', + 'Jul' => '07', 'Jul.' => '07', 'July' => '07', + 'Aug' => '08', 'Aug.' => '08', 'August' => '08', + 'Sep' => '09', 'Sep.' => '09', + 'Sept' => '09', 'Sept.' => '09', 'September' => '09', + 'Oct' => '10', 'Oct.' => '10', 'October' => '10', + 'Nov' => '11', 'Nov.' => '11', 'November' => '11', + 'Dec' => '12', 'Dec.' => '12', 'December' => '12' ); + + +my $title = undef; +my $release = undef; +my $reldate = undef; +my $relinfo = undef; +my $sections = undef; +my $items = undef; +my @releases = (); + +my @lines = <>; # Get all input at once + +# +# Parse input and build hierarchical release structure in @releases +# +for (my $line_num = 0 ; $line_num <= $#lines ; ++$line_num) +{ + $_ = $lines[$line_num]; + + next unless (/\S/); # Skip blank lines + + next if (/^\s*\$Id(?::.*)?\$/); # Skip $Id$ lines + + unless ($title) + { + if (/\S/) + { + s/^\s+//; # Trim leading whitespace + s/\s+$//; # Trim trailing whitespace + } + $title = $_; + next; + } + + if (/\s*===+\s*(.*?)\s*===+\s*/) # New-style release headings + { + $release = $1; + $release =~ s/^release\s*//i; # Trim "Release " prefix + ($release, $relinfo) = ($release =~ /^(\d+(?:\.\d+)*|Trunk)\s*(.*)/i); + $relinfo =~ s/\s*:\s*$//; # Trim trailing colon + $relinfo =~ s/^\s*,\s*//; # Trim leading comma + ($reldate, $relinfo) = get_release_date($release, $relinfo); + $sections = []; + push @releases, [ $release, $reldate, $relinfo, $sections ]; + $items = undef; + next; + } + + if (/^\s*([01](?:\.[0-9]{1,2}){1,2}[a-z]?(?:\s*(?:RC\d+|final))?)\s* + ((?:200[0-7]-.*|.*,.*200[0-7].*)?)$/x) # Old-style release heading + { + $release = $1; + $relinfo = $2; + $relinfo =~ s/\s*:\s*$//; # Trim trailing colon + $relinfo =~ s/^\s*,\s*//; # Trim leading comma + ($reldate, $relinfo) = get_release_date($release, $relinfo); + $sections = []; + push @releases, [ $release, $reldate, $relinfo, $sections ]; + $items = undef; + next; + } + + # Section heading: no leading whitespace, initial word capitalized, + # five words or less, and no trailing punctuation + if (/^([A-Z]\S*(?:\s+\S+){0,4})(?[0]; # 0th position of items array is list type + } + else + { + $type = get_list_type($_); + push @$items, $type; + } + + if ($type eq 'numbered') # The modern items list style + { # List item boundary is another numbered item or an unindented line + my $line; + my $item = $_; + $item =~ s/^(\s{0,2}\d+\.\s*)//; # Trim the leading item number + my $leading_ws_width = length($1); + $item =~ s/\s+$//; # Trim trailing whitespace + $item .= "\n"; + + while ($line_num < $#lines + && ($line = $lines[++$line_num]) !~ /^(?:\s{0,2}\d+\.\s*\S|\S)/) + { + $line =~ s/^\s{$leading_ws_width}//; # Trim leading whitespace + $line =~ s/\s+$//; # Trim trailing whitespace + $item .= "$line\n"; + } + $item =~ s/\n+\Z/\n/; # Trim trailing blank lines + push @$items, $item; + --$line_num unless ($line_num == $#lines); + } + elsif ($type eq 'paragraph') + { # List item boundary is a blank line + my $line; + my $item = $_; + $item =~ s/^(\s+)//; + my $leading_ws_width = defined($1) ? length($1) : 0; + $item =~ s/\s+$//; # Trim trailing whitespace + $item .= "\n"; + + while ($line_num < $#lines + and ($line = $lines[++$line_num]) =~ /\S/) + { + $line =~ s/^\s{$leading_ws_width}//; # Trim leading whitespace + $line =~ s/\s+$//; # Trim trailing whitespace + $item .= "$line\n"; + } + push @$items, $item; + --$line_num unless ($line_num == $#lines); + } + else # $type is one of the bulleted types + { # List item boundary is another bullet or a blank line + my $line; + my $item = $_; + $item =~ s/^(\s*$type\s*)//; # Trim the leading bullet + my $leading_ws_width = length($1); + $item =~ s/\s+$//; # Trim trailing whitespace + $item .= "\n"; + + while ($line_num < $#lines + and ($line = $lines[++$line_num]) !~ /^\s*(?:$type|\Z)/) + { + $line =~ s/^\s{$leading_ws_width}//; # Trim leading whitespace + $line =~ s/\s+$//; # Trim trailing whitespace + $item .= "$line\n"; + } + push @$items, $item; + --$line_num unless ($line_num == $#lines); + } +} + +# +# Print HTML-ified version to STDOUT +# +print<<"__HTML_HEADER__"; + + + + $title + + + + + + + + +

$title

+ +__HTML_HEADER__ + +my $heading; +my $display = 'block'; +my $relcnt = 0; +my $header = '

'; +for my $rel (@releases) +{ + $relcnt = $relcnt + 1; + $display = 'none' + if ($relcnt > 2); + $header = '

' + if ($relcnt > 2); + + if ($relcnt == 3) { + print "

"; + print "Older Releases"; + print "

\n"; + print "
    \n" + } + + ($release, $reldate, $relinfo, $sections) = @$rel; + + # The first section heading is undefined for the older sectionless releases + my $has_release_sections = $sections->[0][0]; + + (my $relid = lc($release)) =~ s/\s+/_/g; + print "$header"; + print "Release " unless ($release =~ /^trunk$/i); + print "$release $relinfo"; + print " [$reldate]" unless ($reldate eq 'unknown'); + print "\n"; + print "
      \n" + if ($has_release_sections); + + for my $section (@$sections) + { + ($heading, $items) = @$section; + (my $sectid = lc($heading)) =~ s/\s+/_/g; + my $numItemsStr = $#{$items}>0 ? "($#{$items})" : "(none)"; + + print "
    • ", + ($heading || ''), "\n", "   $numItemsStr" + if ($has_release_sections); + my $list = ($items->[0] || '') eq 'numbered' ? 'ol' : 'ul'; + my $listid = $sectid ? "$relid.$sectid" : $relid; + print " <$list id=\"$listid\" style=\"display:none\">\n"; + + for my $itemnum (1..$#{$items}) + { + my $item = $items->[$itemnum]; + $item =~ s:\s*(\([^)"]+?\))\s*$:
      $1:; # Separate attribution + $item =~ s:\n{2,}:\n

      \n:g; # Preserve paragraph breaks + $item =~ s{(?:${jira_url_prefix})?(LUCENE-\d+)} # Link to JIRA + {$1}g; + $item =~ s{((?i:bug|patch)\s*#?\s*(\d+))} # Link to Bugzilla + {$1}g; + print "

    • $item
    • \n"; + } + print " \n"; + print " \n" if ($has_release_sections); + } + print "
    \n" if ($has_release_sections); +} + +print "
\n" if ($relcnt > 3); + +print "\n\n"; + +# +# Subroutine: get_list_type +# +# Takes one parameter: +# +# - The first line of a sub-section/point +# +# Returns one scalar: +# +# - The list type: 'numbered'; or one of the bulleted types '-', or '.' or +# 'paragraph'. +# +sub get_list_type +{ + my $first_list_item_line = shift; + my $type = 'paragraph'; # Default to paragraph type + + if ($first_list_item_line =~ /^\s{0,2}\d+\.\s+\S+/) + { + $type = 'numbered'; + } + elsif ($first_list_item_line =~ /^\s*([-.])\s+\S+/) + { + $type = $1; + } + return $type; +} + + +# +# Subroutine: get_release_date +# +# Takes two parameters: +# +# - Release name +# - Release info, potentially including a release date +# +# Returns two scalars: +# +# - The release date, in format YYYY-MM-DD +# - The remainder of the release info (if any), with release date stripped +# +sub get_release_date +{ + my $release = shift; + my $relinfo = shift; + + my ($year, $month, $dom, $reldate); + + if ($relinfo) + { + # YYYY-MM-DD or YYYY-M-D or YYYY-MM-D or YYYY-M-DD + if ($relinfo =~ s:\s*(2\d\d\d)([-./]) + (1[012]|0?[1-9])\2 + ([12][0-9]|30|31|0?[1-9])\s*: :x) + { + $year = $1; + $month = $3; + $dom = $4; + $dom = "0$dom" if (length($dom) == 1); + $reldate = "$year-$month-$dom"; + } + # MM-DD-YYYY or M-D-YYYY or MM-D-YYYY or M-DD-YYYY + elsif ($relinfo =~ s:\s*(1[012]|0?[1-9])([-./]) + ([12][0-9]|30|31|0?[1-9])\2 + (2\d\d\d)\s*: :x) + { + $month = $1; + $dom = $3; + $dom = "0$dom" if (length($dom) == 1); + $year = $4; + $reldate = "$year-$month-$dom"; + } + # MMMMM DD, YYYY or MMMMM DDth, YYYY + elsif ($relinfo =~ s:($month_regex)\s* + ([12][0-9]|30|31|0?[1-9])((st|rd|th)\.?)?,?\s* + (2\d\d\d)\s*: :x) + { + $month = $month_nums{$1}; + $dom = $2; + $dom = "0$dom" if (length($dom) == 1); + $year = $5; + $reldate = "$year-$month-$dom"; + } + # DD MMMMM YYYY + elsif ($relinfo =~ s:([12][0-9]|30|31|0?[1-9])(\s+|[-/.]) + ($month_regex)\2 + (2\d\d\d)\s*: :x) + { + $dom = $1; + $dom = "0$dom" if (length($dom) == 1); + $month = $month_nums{$3}; + $year = $4; + $reldate = "$year-$month-$dom"; + } + } + unless ($reldate) + { # No date found in $relinfo + # Handle '1.2 RC6', which should be '1.2 final' + $release = '1.2 final' if ($release eq '1.2 RC6'); + + if (exists($release_dates{$release})) + { + $reldate = $release_dates{$release}; + } + else + { + $reldate = 'unknown'; + } + } + $relinfo =~ s/,?\s*$//; # Trim trailing comma and whitespace + return ($reldate, $relinfo); +} + +1; Property changes on: changes2html.pl ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native Index: ChangesSimpleStyle.css =================================================================== --- ChangesSimpleStyle.css (revision 0) +++ ChangesSimpleStyle.css (revision 0) @@ -0,0 +1,32 @@ +body { + font-family: Courier New, monospace; + font-size: 10pt; +} + +h1 { + font-family: Courier New, monospace; + font-size: 10pt; +} + +h2 { + font-family: Courier New, monospace; + font-size: 10pt; +} + +h3 { + font-family: Courier New, monospace; + font-size: 10pt; +} + +a:link { + color: blue; +} + +a:visited { + color: purple; +} + +li { + margin-top: 1em; + margin-bottom: 1em; +} \ No newline at end of file Index: ChangesFancyStyle.css =================================================================== --- ChangesFancyStyle.css (revision 0) +++ ChangesFancyStyle.css (revision 0) @@ -0,0 +1,30 @@ +body { + font-family: Georgia, "Times New Roman", Times, serif; + color: black; + background-color: light-grey +} + +h1 { + font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif + color: yellow; + background-color: lightblue +} + +h2 { + font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif + color: yellow; + background-color: lightblue +} + +a:link { + color: blue +} + +a:visited { + color: purple +} + +li { + margin-top: 1em; + margin-bottom: 1em; +} \ No newline at end of file Index: Changes.html =================================================================== --- Changes.html (revision 0) +++ Changes.html (revision 0) @@ -0,0 +1,1890 @@ + + + + Lucene Change Log + + + + + + + + +

Lucene Change Log

+ +

Trunk (not yet released)

+
    +
  • Changes in runtime behavior +   (none) +
  • +
  • API Changes +   (1) +
  • +
  • Bug fixes +   (none) +
  • +
  • New features +   (2) +
  • +
  • Optimizations +   (2) +
  • +
  • Documentation +   (none) +
  • +
  • Build +   (1) +
  • +
  • Test Cases +   (none) +
  • +
+

Release 2.3.0 [2008-01-21]

+
    +
  • Changes in runtime behavior +   (2) +
  • +
  • API Changes +   (14) +
  • +
  • Bug fixes +   (28) +
  • +
  • New features +   (13) +
  • +
  • Optimizations +   (14) +
  • +
  • Documentation +   (2) +
  • +
  • Build +   (8) +
  • +
  • Test Cases +   (1) +
  • +
+

Older Releases

+ + + Property changes on: Changes.html ___________________________________________________________________ Name: svn:executable + * Name: svn:eol-style + native