Mercurial > hg > vamp-rdf-download-index
changeset 51:71703df777e8
Prepare for flatter filesystem hierarchy
author | Chris Cannam |
---|---|
date | Tue, 24 Jun 2014 13:33:17 +0100 |
parents | 2c4175039bf3 |
children | 5cfe6ae12a2f |
files | .hgsub .hgsubstate README.txt pluginlist.yeti printcats.yeti run.sh spag.yeti templates/download-test.html templates/download.html |
diffstat | 9 files changed, 200 insertions(+), 81 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsub Mon Jun 23 16:58:27 2014 +0100 +++ b/.hgsub Tue Jun 24 13:33:17 2014 +0100 @@ -1,3 +1,4 @@ spark = [git]https://github.com/perwendel/spark.git public = https://code.soundsoftware.ac.uk/hg/vamp-website - +forum = https://code.soundsoftware.ac.uk/hg/vamp-website-forum +rdf = https://code.soundsoftware.ac.uk/hg/vamp-known-plugins-rdf
--- a/.hgsubstate Mon Jun 23 16:58:27 2014 +0100 +++ b/.hgsubstate Tue Jun 24 13:33:17 2014 +0100 @@ -1,2 +1,4 @@ -054c48a8860caa9318518d17c970f7c5b0ae46e0 public +0353cb3d16305b081f3df9dd6942b71b1fc7a74e forum +bb33b0c7548142d47da21b3ece7b6a6d9bb16e6a public +050bdf2ff304a07ce59a782a857170365bf50b00 rdf f1f06769abacc6732e511774d4db2306cbe5db54 spark
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.txt Tue Jun 24 13:33:17 2014 +0100 @@ -0,0 +1,106 @@ + +Vamp Website Layout +------------------- + +Most of the site is served through a small Spark Java application, +whose code is found in this repo. The purpose of this application is +to serve the dynamically generated plugin download page, but for +convenience it is also configured to serve up the static HTML content +(found in the public/ subrepo) and static RDF data (rdf/ subrepo). + +This means the Apache front-end server should be configured to pass +everything through to the Spark server on a local port, except for the +forum (PHP to be run by Apache) and the wiki (redirecting to the +SoundSoftware code site, we no longer host a wiki locally). + +That is, these are handled by Spark as long as Apache passes / through +to it appropriately: + + / Static content served through Spark + /download.html Dynamic content generated by Spark + +But these need to be overridden by Apache before reaching Spark: + + /rdf Static content served by Apache (plus index pages etc) + /forum Dynamic PHP content + /wiki Redirect + + +Outline Apache config +--------------------- + +<VirtualHost *:80> + ServerName vamp-plugins.org + ServerAlias www.vamp-plugins.org + + DocumentRoot /var/www/vamp-plugins.org + <Directory /var/www/vamp-plugins.org> + Options None + AllowOverride None + Order allow,deny + Allow from all + # Permit short cache to speed navigation and assist + # the HTTP accelerator. The SMF forum overrides this + # with its own Expires header. + ExpiresDefault "access plus 1 minute" + </Directory> + + <DirectoryMatch "^/.*/\.svn/"> + Order allow,deny + Deny from all + Satisfy All + </DirectoryMatch> + + <DirectoryMatch "^/.*/\.hg/"> + Order allow,deny + Deny from all + Satisfy All + </DirectoryMatch> + + <Directory /var/www/vamp-plugins.org/pre> + Options +Indexes + </Directory> + + <Directory /var/www/vamp-plugins.org/forum> + AddHandler fcgid-script .php + FCGIWrapper /usr/lib/cgi-bin/php5 .php + Options +ExecCGI + Options -MultiViews + </Directory> + + <Directory /var/www/vamp-plugins.org/rdf> + AddType application/rdf+xml .rdf + AddType application/rdf+xml .rdfs + AddType text/rdf+n3 .n3 + DirectoryIndex vamp.rdf + Options +FollowSymLinks + RewriteEngine on + RewriteBase /rdf + RewriteRule ^([^/]+)/([^\.]+)$ $1/$2.n3 + ExpiresDefault "access plus 5 minutes" + </Directory> + + <Directory /var/www/vamp-plugins.org/rdf/plugins> + Options +Indexes + ExpiresDefault "access plus 5 minutes" + </Directory> + + Redirect seeother /wiki http://code.soundsoftware.ac.uk/projects/vamp-p +lugin-sdk/wiki + + <Directory /var/www/vamp-plugins.org/logs> + AuthUserFile "/var/www/.cannamlogs.htdigest" + AuthName "Server Usage Statistics" + AuthType Digest + Require user cannamlogs + </Directory> + + ErrorLog /var/log/apache2/error.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog /var/log/apache2/vamp-plugins.log varnishcombined + ServerSignature Off +</VirtualHost>
--- a/pluginlist.yeti Mon Jun 23 16:58:27 2014 +0100 +++ b/pluginlist.yeti Tue Jun 24 13:33:17 2014 +0100 @@ -8,7 +8,7 @@ vamp = load may.vamp; vamprdf = load may.vamp.vamprdf; -downloadPageRoute = "/download2.html"; +downloadPageRoute = "/download.html"; pluginStore = store.newRdfStore (); vamprdf.loadSystemVampRdf pluginStore; @@ -384,8 +384,15 @@ divc "platform-selector" (platformSelector queryParams ptag) ^ pluginList); + +// We serve mostly static data, with just the odd dynamic path. Static +// data is served from public/ and we override any routes we want for +// dynamic content. + staticFileLocation "public"; +// Download page, likely /download.html + route (Get downloadPageRoute) do { headers, queryParams }: if "clear" in queryParams and not "go" in queryParams then queryParams["search"] := ""; @@ -399,7 +406,7 @@ sortPlugins pluginData fi; - readFile "templates/download-test.html" "UTF-8" //!!! + readFile "templates/download.html" "UTF-8" do handle: strJoin "\n" (map do line: @@ -411,3 +418,4 @@ done (handle.lines ())) done; done; +
--- a/printcats.yeti Mon Jun 23 16:58:27 2014 +0100 +++ b/printcats.yeti Tue Jun 24 13:33:17 2014 +0100 @@ -2,6 +2,7 @@ vamp = load may.vamp; +println "# DO NOT EDIT - this was generated from the plugin .cat files by printcats.yeti"; println "@prefix vamp: <http://purl.org/ontology/vamp/> ."; println "@prefix : <#> ."; println "";
--- a/run.sh Mon Jun 23 16:58:27 2014 +0100 +++ b/run.sh Tue Jun 24 13:33:17 2014 +0100 @@ -30,5 +30,5 @@ exit 2 fi -VAMP_PATH=$mydir/public/rdf/plugins LD_LIBRARY_PATH="$MAY_DIR/ext/native/$ARCH:$LD_LIBRARY_PATH" java -cp target/classes:spark/target/classes:"$CLASSPATH" pluginlist +VAMP_PATH=$mydir/rdf/plugins LD_LIBRARY_PATH="$MAY_DIR/ext/native/$ARCH:$LD_LIBRARY_PATH" java -cp target/classes:spark/target/classes:"$CLASSPATH" pluginlist
--- a/spag.yeti Mon Jun 23 16:58:27 2014 +0100 +++ b/spag.yeti Tue Jun 24 13:33:17 2014 +0100 @@ -12,9 +12,10 @@ routeParams = customHash \(req#params()); queryParams = mapIntoHash id do p: req#queryParams(p) done (map string req#queryParams()#toArray()); + splatParams = req#splat() as list<string>; headers = mapIntoHash id do h: req#headers(h) done (map string req#headers()#toArray()); - callback { routeParams, queryParams, headers }, + callback { routeParams, queryParams, splatParams, headers }, end; new Handler()); case match of
--- a/templates/download-test.html Mon Jun 23 16:58:27 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> - <head> - <link rel="stylesheet" media="screen" type="text/css" href="screen.css"/> - <link rel="icon" type="image/png" href="images/waveform.png"/> - <link rel="shortcut" type="image/png" href="images/waveform.png"/> - <title>Vamp Plugins</title> - <meta name="robots" content="index"/> - <meta name="keywords" content="vamp plugin api plugins sonic visualiser visualizer visualise visualize audio music spectrogram feature extraction feapi vsi dssi"/> - <meta name="description" content="Vamp is a system for plugins that extract feature information from audio data."/> - </head> - <body> - <h1 id="header"><span>Vamp Plugins</span></h1> - - <div id="nav"> - <ul> - <li class="first"><a href="index.html">Home</a></li> - <li><a href="rationale.html">Rationale</a></li> - <li><a href="download.html">Download Plugins</a></li> - <li><a href="develop.html">Make Plugins</a></li> - <li><a href="http://vamp-plugins.org/forum/">Forum</a></li> - <li><a href="http://vamp-plugins.org/wiki/">Wiki</a></li> - </ul></div> - - <h2 id="firstpara">Find and Download Plugins</h2> - - <p>This page lists plugins made by research groups and - developers around the world. It is generated automatically from - the <a href="/rdf/plugins">RDF descriptions</a> published by the - plugin authors.</p> - - <p>▶ <b>How to Install</b> — For <a href="#install">installation instructions</a> see the bottom of this page.</p> - - <p>Spotted a mistake? Want to get your plugins listed here? <a href="mailto:cannam@all-day-breakfast.com">Let us - know!</a></p> <br> - - <!-- insert table here --> - - <div style="clear:both"></div> - <br> - - <a name="install"></a><h3>How to Install</h3> - - <p>A Vamp plugin set consists of a single dynamic library file - with <code>DLL</code>, <code>.dylib</code>, or <code>.so</code> - extension (depending on your platform) plus optionally a category - file with <code>.cat</code> extension and an RDF description file - with <code>.ttl</code> or <code>.n3</code> extension.</p> - - <p>To install a plugin set, just copy the plugin's library file - and any supplied category or RDF files into your system or - personal Vamp plugin location.</p> - - <p>The plugin file extension and the location to - copy into depend on your platform:</p> - - <table align=center border=1 cellpadding=5> - <tr><td> </td><td><b>File extension</b></td><td><b>System plugin folder</b></td><td><b>Personal plugin folder</b></td></tr> - <tr><td>Linux or other Unix</td><td><code>.so</code></td><td><code>/usr/local/lib/vamp</code></td><td><code>$HOME/vamp</code></td></tr> - <tr><td>OS/X</td><td><code>.dylib</code></td><td><code>/Library/Audio/Plug-Ins/Vamp</code></td><td><code>$HOME/Library/Audio/Plug-Ins/Vamp</code></td></tr> - <tr><td>Windows (32-bit)</td><td><code>.dll</code></td><td><code>C:\Program Files\Vamp Plugins</code></td><td> </td></tr> - <tr><td>Windows (64-bit)</td><td><code>.dll</code></td><td><code>C:\Program Files (x86)\Vamp Plugins</code></td><td> </td></tr> - </table> - - <p>You can alternatively set the <code>VAMP_PATH</code> - environment variable to list the locations a host should look in - for Vamp plugins.</p> - - <p><code>VAMP_PATH</code> should contain a semicolon-separated - (on Windows) or colon-separated (OS/X, Linux) list of paths. If - it is set, it will completely override the standard locations - listed above.</p> - - </body> -</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/download.html Tue Jun 24 13:33:17 2014 +0100 @@ -0,0 +1,75 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + <head> + <link rel="stylesheet" media="screen" type="text/css" href="screen.css"/> + <link rel="icon" type="image/png" href="images/waveform.png"/> + <link rel="shortcut" type="image/png" href="images/waveform.png"/> + <title>Vamp Plugins</title> + <meta name="robots" content="index"/> + <meta name="keywords" content="vamp plugin api plugins sonic visualiser visualizer visualise visualize audio music spectrogram feature extraction feapi vsi dssi"/> + <meta name="description" content="Vamp is a system for plugins that extract feature information from audio data."/> + </head> + <body> + <h1 id="header"><span>Vamp Plugins</span></h1> + + <div id="nav"> + <ul> + <li class="first"><a href="index.html">Home</a></li> + <li><a href="rationale.html">Rationale</a></li> + <li><a href="download.html">Download Plugins</a></li> + <li><a href="develop.html">Make Plugins</a></li> + <li><a href="http://vamp-plugins.org/forum/">Forum</a></li> + <li><a href="http://vamp-plugins.org/wiki/">Wiki</a></li> + </ul></div> + + <h2 id="firstpara">Find and Download Plugins</h2> + + <p>This page lists plugins made by research groups and + developers around the world. It is generated automatically from + the <a href="/rdf/plugins">RDF descriptions</a> published by the + plugin authors.</p> + + <p>▶ <b>How to Install</b> — For <a href="#install">installation instructions</a> see the bottom of this page.</p> + + <p>Spotted a mistake? Want to get your plugins listed here? <a href="mailto:cannam@all-day-breakfast.com">Let us + know!</a></p> <br> + + <!-- insert table here --> + + <div style="clear:both"></div> + <br> + + <a name="install"></a><h3>How to Install</h3> + + <p>A Vamp plugin set consists of a single dynamic library file + with <code>DLL</code>, <code>.dylib</code>, or <code>.so</code> + extension (depending on your platform) plus optionally a category + file with <code>.cat</code> extension and an RDF description file + with <code>.ttl</code> or <code>.n3</code> extension.</p> + + <p>To install a plugin set, just copy the plugin's library file + and any supplied category or RDF files into your system or + personal Vamp plugin location.</p> + + <p>The plugin file extension and the location to + copy into depend on your platform:</p> + + <table align=center border=1 cellpadding=5> + <tr><td> </td><td><b>File extension</b></td><td><b>System plugin folder</b></td><td><b>Personal plugin folder</b></td></tr> + <tr><td>Linux or other Unix</td><td><code>.so</code></td><td><code>/usr/local/lib/vamp</code></td><td><code>$HOME/vamp</code></td></tr> + <tr><td>OS/X</td><td><code>.dylib</code></td><td><code>/Library/Audio/Plug-Ins/Vamp</code></td><td><code>$HOME/Library/Audio/Plug-Ins/Vamp</code></td></tr> + <tr><td>Windows (32-bit)</td><td><code>.dll</code></td><td><code>C:\Program Files\Vamp Plugins</code></td><td> </td></tr> + <tr><td>Windows (64-bit)</td><td><code>.dll</code></td><td><code>C:\Program Files (x86)\Vamp Plugins</code></td><td> </td></tr> + </table> + + <p>You can alternatively set the <code>VAMP_PATH</code> + environment variable to list the locations a host should look in + for Vamp plugins.</p> + + <p><code>VAMP_PATH</code> should contain a semicolon-separated + (on Windows) or colon-separated (OS/X, Linux) list of paths. If + it is set, it will completely override the standard locations + listed above.</p> + + </body> +</html>