1 |
3032
|
perry
|
#!/bin/sh
|
2 |
|
|
|
3 |
|
|
rm ../doc/reference.html
|
4 |
|
|
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"
|
5 |
|
|
echo "<html>
|
6 |
|
|
<head>
|
7 |
|
|
<title>OpenLayers Class Reference Documentation</title>
|
8 |
|
|
<style type='text/css'>
|
9 |
|
|
.type { background-color: #ddd }
|
10 |
|
|
td { border: black solid 1px; padding: 3px; }
|
11 |
|
|
table { border-collapse: collapse; margin: 5px 10px; }
|
12 |
|
|
.classref { margin-left: 20px; }
|
13 |
|
|
div.index { float:left; width: 300px; }
|
14 |
|
|
</style>
|
15 |
|
|
</head>
|
16 |
|
|
<body>" >> ../doc/reference.html
|
17 |
|
|
|
18 |
|
|
for i in $CLASSES; do
|
19 |
|
|
echo "<div class='index'><a href='#OpenLayers.$i'>OpenLayers.$i</a></div>" >> ../doc/reference.html
|
20 |
|
|
done
|
21 |
|
|
|
22 |
|
|
echo "<br style='clear:both' />" >> ../doc/reference.html
|
23 |
|
|
|
24 |
|
|
for i in $CLASSES; do
|
25 |
|
|
cat ../doc/$i.txt | \
|
26 |
|
|
perl -pe 's!^(.*?) -- (.*?) -- (.*?)$! <tr><td>$1</td><td>$2</td><td>$3</td></tr>!g;
|
27 |
|
|
s!^( \* )?(.*?) -- (.*?)$! <tr><td>$2</td><td>$3</td></tr>!g;
|
28 |
|
|
s!^ \* (.*)$! </table>\n\n<h3>$1</h3>\n <table>!;
|
29 |
|
|
s!{OpenLayers.(.*?)\|(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">\2</a>!g;
|
30 |
|
|
s!{OpenLayers.(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">OpenLayers.$1</a>!;
|
31 |
|
|
s!{([A-Za-z]+?)\|(.+?)}!<span class="type" title="$1">\2<\/span>!g;
|
32 |
|
|
s!{([A-Za-z]+?)}!<span class="type" title="$1">$1<\/span>!g;
|
33 |
|
|
s!^\* (.*)$!</table>\n<h2>$1</h2>\n<table>!;
|
34 |
|
|
s!^OpenLayers\.(.*)$!<h1><a name="OpenLayers.$1">OpenLayers.$1</a></h1><div class="classref">!' \
|
35 |
|
|
>> ../doc/reference.html
|
36 |
|
|
echo '</table></div>' >> ../doc/reference.html
|
37 |
|
|
done
|
38 |
|
|
echo " </body>
|
39 |
|
|
</html>" >> ../doc/reference.html
|