sbp points out that multiple perl calls are unneccesary. merging them all into one makes this code run about twice as fast.
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1278 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -2,9 +2,18 @@
|
||||
|
||||
rm ../doc/reference.html
|
||||
CLASSES="Map Layer Layer.HTTPRequest Layer.Grid Layer.WMS Layer.KaMap Layer.EventPane Layer.Google Layer.VirtualEarth Layer.Markers Layer.Text Layer.GeoRSS Layer.Boxes Icon Marker Marker.Box Tile Tile.Image Tile.WFS Control Control.LayerSwitcher Control.MouseDefaults Control.MouseToolbar Control.PanZoom Control.PanZoomBar Control.Permalink Control.Scale LonLat Size Pixel Bounds"
|
||||
echo "<html><head><title>OpenLayers Class Reference Documentation</title><style type='text/css'> .type { background-color: #ddd } td { border: black solid 1px; padding: 3px; } table { border-collapse: collapse; margin: 5px 10px; } .classref { margin-left: 20px; }
|
||||
div.index { float:left; width: 300px; }
|
||||
</style></head><body>" >> ../doc/reference.html
|
||||
echo "<html>
|
||||
<head>
|
||||
<title>OpenLayers Class Reference Documentation</title>
|
||||
<style type='text/css'>
|
||||
.type { background-color: #ddd }
|
||||
td { border: black solid 1px; padding: 3px; }
|
||||
table { border-collapse: collapse; margin: 5px 10px; }
|
||||
.classref { margin-left: 20px; }
|
||||
div.index { float:left; width: 300px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>" >> ../doc/reference.html
|
||||
|
||||
for i in $CLASSES; do
|
||||
echo "<div class='index'><a href='#OpenLayers.$i'>OpenLayers.$i</a></div>" >> ../doc/reference.html
|
||||
@@ -14,16 +23,17 @@ echo "<br style='clear:both' />" >> ../doc/reference.html
|
||||
|
||||
for i in $CLASSES; do
|
||||
cat ../doc/$i.txt | \
|
||||
perl -pe 's!^(.*?) -- (.*?) -- (.*?)$! <tr><td>$1</td><td>$2</td><td>$3</td></tr>!g' | \
|
||||
perl -pe 's!^( \* )?(.*?) -- (.*?)$! <tr><td>$2</td><td>$3</td></tr>!g' | \
|
||||
perl -pe 's!^ \* (.*)$! </table>\n\n<h3>$1</h3>\n <table>!' | \
|
||||
perl -pe 's!{OpenLayers.(.*?)\|(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">\2</a>!g' | \
|
||||
perl -pe 's!{OpenLayers.(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">OpenLayers.$1</a>!' | \
|
||||
perl -pe 's!{([A-Za-z]+?)\|(.+?)}!<span class="type" title="$1">\2<\/span>!g' | \
|
||||
perl -pe 's!{([A-Za-z]+?)}!<span class="type" title="$1">$1<\/span>!g' | \
|
||||
perl -pe 's!^\* (.*)$!</table>\n<h2>$1</h2>\n<table>!' | \
|
||||
perl -pe 's!^OpenLayers\.(.*)$!<h1><a name="OpenLayers.$1">OpenLayers.$1</a></h1><div class="classref">!' \
|
||||
perl -pe 's!^(.*?) -- (.*?) -- (.*?)$! <tr><td>$1</td><td>$2</td><td>$3</td></tr>!g;
|
||||
s!^( \* )?(.*?) -- (.*?)$! <tr><td>$2</td><td>$3</td></tr>!g;
|
||||
s!^ \* (.*)$! </table>\n\n<h3>$1</h3>\n <table>!;
|
||||
s!{OpenLayers.(.*?)\|(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">\2</a>!g;
|
||||
s!{OpenLayers.(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">OpenLayers.$1</a>!;
|
||||
s!{([A-Za-z]+?)\|(.+?)}!<span class="type" title="$1">\2<\/span>!g;
|
||||
s!{([A-Za-z]+?)}!<span class="type" title="$1">$1<\/span>!g;
|
||||
s!^\* (.*)$!</table>\n<h2>$1</h2>\n<table>!;
|
||||
s!^OpenLayers\.(.*)$!<h1><a name="OpenLayers.$1">OpenLayers.$1</a></h1><div class="classref">!' \
|
||||
>> ../doc/reference.html
|
||||
echo '</table></div>' >> ../doc/reference.html
|
||||
done
|
||||
echo "</body></html>" >> ../doc/reference.html
|
||||
echo " </body>
|
||||
</html>" >> ../doc/reference.html
|
||||
|
||||
Reference in New Issue
Block a user