Added scripts used on the static site for generating download links.
This commit is contained in:
9
etc/snapshotzipbuilds/1.3-snapshot-download.php
Normal file
9
etc/snapshotzipbuilds/1.3-snapshot-download.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
$url = "http://s3.amazonaws.com/maven.springframework.org?prefix=snapshot/org/springframework/ldap/spring-ldap/1.3.0.CI-SNAPSHOT/";
|
||||
$xml = file_get_contents($url);
|
||||
|
||||
header('Content-Type: text/xml; charset=UTF-8');
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>';
|
||||
echo '<?xml-stylesheet type="text/xsl" href="./snapshot-download.xsl"?>';
|
||||
echo substr($xml, 39);
|
||||
?>
|
||||
56
etc/snapshotzipbuilds/dist-download.css
Normal file
56
etc/snapshotzipbuilds/dist-download.css
Normal file
@@ -0,0 +1,56 @@
|
||||
body {
|
||||
font-family: arial, sans-serif;
|
||||
background-color: #eeeef5;
|
||||
}
|
||||
|
||||
.name {
|
||||
padding-right: 3px;
|
||||
padding-left: 3px;
|
||||
width: 75%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.size {
|
||||
padding-right: 3px;
|
||||
padding-left: 3px;
|
||||
width: 25%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #395726;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #728c22;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #ff5c00;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
table {
|
||||
color: #728c22;
|
||||
margin-right: 0px;
|
||||
margin-left: 4px;
|
||||
margin-bottom: 0px;
|
||||
margin-top: 4px;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table tr th {
|
||||
color: #395726;
|
||||
border-bottom-style: double;
|
||||
border-bottom-width: 3px;
|
||||
border-bottom-color: #395726;
|
||||
padding-bottom: 5px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
table tr td {
|
||||
font-weight: bold;
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
6
etc/snapshotzipbuilds/readme.txt
Normal file
6
etc/snapshotzipbuilds/readme.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
The page containing snapshot zip builds is actually a PHP page which takes the
|
||||
XML listing from S3, and transforms it into links using a XSLT. The required
|
||||
files should be placed on the following location:
|
||||
|
||||
http://static.springframework.org/spring-ldap/downloads/1.3-snapshot-download.php
|
||||
|
||||
38
etc/snapshotzipbuilds/snapshot-download.xsl
Normal file
38
etc/snapshotzipbuilds/snapshot-download.xsl
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:s3="http://s3.amazonaws.com/doc/2006-03-01/"
|
||||
version="1.0">
|
||||
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<head>
|
||||
<style type="text/css" media="all">@import "./dist-download.css";</style>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:apply-templates select="s3:ListBucketResult"/>
|
||||
</body>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="s3:ListBucketResult">
|
||||
<xsl:variable name="bucket-name" select="s3:Name"/>
|
||||
<xsl:variable name="prefix" select="substring(s3:Prefix,1)"/>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="name">Spring LDAP Project Snapshots</th>
|
||||
<th class="size">Size</th>
|
||||
</tr>
|
||||
<xsl:for-each select="s3:Contents[substring(s3:Key, (string-length(s3:Key) - 2)) = 'zip']">
|
||||
<tr>
|
||||
<td class="name">
|
||||
<a class="name" href="http://s3.amazonaws.com/{$bucket-name}/{s3:Key}">
|
||||
<xsl:value-of select="substring-after(s3:Key,$prefix)"/><br/>
|
||||
</a>
|
||||
</td>
|
||||
<td class="size"><xsl:value-of select="format-number(s3:Size div 1048576, '###,##0.0')"/> MB</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user