summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2010-07-31 21:27:13 +0100
committerNick White <git@njw.me.uk>2010-07-31 21:27:13 +0100
commitc9757c5715a67f433eeb0d8cfaaf38607a7db73f (patch)
tree63f5c28be60393cae872632a08c59df255e8d07b
parent1ca9055590b1e6953c3ccc6f92a6ce889caa6c56 (diff)
Add draft webpage
-rw-r--r--web/doap.ttl26
-rw-r--r--web/doapbutton.sh28
-rw-r--r--web/doapfooter.sh40
-rw-r--r--web/doapheader.sh30
-rw-r--r--web/index.html42
-rw-r--r--web/makepage.sh38
-rw-r--r--web/screen.pngbin0 -> 2625 bytes
-rw-r--r--web/small.pngbin0 -> 362 bytes
8 files changed, 204 insertions, 0 deletions
diff --git a/web/doap.ttl b/web/doap.ttl
new file mode 100644
index 0000000..f926d3e
--- /dev/null
+++ b/web/doap.ttl
@@ -0,0 +1,26 @@
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
+@prefix doap: <http://usefulinc.com/ns/doap#>.
+@prefix foaf: <http://xmlns.com/foaf/0.1/>.
+@prefix : <http://njw.me.uk/software/spout#>.
+
+:p a doap:Project;
+ doap:name "Spout";
+ doap:shortdesc "A simple caveflying game";
+ doap:description "Spout is a simple caveflying game. The aim is to get as high as possible avoiding or destroying obstacles.";
+ doap:homepage <http://njw.me.uk/software/spout>;
+ doap:repository :repo;
+ doap:programming-language "C";
+ doap:license <http://creativecommons.org/licenses/MIT/>;
+ doap:release :v1.4;
+ doap:maintainer <http://njw.me.uk/card#i>.
+
+<http://njw.me.uk/card#i> a foaf:Person;
+ foaf:name "Nick White";
+ foaf:homepage <http://njw.me.uk>.
+
+:repo a doap:GitRepository;
+ doap:location <http://git.njw.me.uk/spout.git>.
+
+:v1.4 a doap:Version;
+ doap:revision "1.4";
+ doap:file-release <http://njw.me.uk/software/spout/spout-1.4.tar.gz>.
diff --git a/web/doapbutton.sh b/web/doapbutton.sh
new file mode 100644
index 0000000..21da477
--- /dev/null
+++ b/web/doapbutton.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+test $# -ne 1 && echo "usage: $0 doap" && exit 1
+
+rdf="$1"
+
+q="PREFIX doap: <http://usefulinc.com/ns/doap#>
+PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+SELECT ?name ?ver ?file
+WHERE {
+?p a doap:Project;
+ doap:name ?name;
+ doap:release ?rel.
+?rel doap:revision ?ver;
+ doap:file-release ?file.
+}"
+
+roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \
+| while read r; do
+ name=`echo $r | awk -F , '{print $2}'| sed -e 's/"\(.*\)"/\1/'`
+ version=`echo $r | awk -F , '{print $3}'| sed -e 's/"\(.*\)"/\1/'`
+ fileurl=`echo $r | awk -F , '{print $4}'| sed -e 's/uri(\(.*\))/\1/'`
+
+ cat <<- _EOF_
+### [Download $name $version]($fileurl)
+### ([GPG signature]($fileurl.sig))
+_EOF_
+done
diff --git a/web/doapfooter.sh b/web/doapfooter.sh
new file mode 100644
index 0000000..ef58225
--- /dev/null
+++ b/web/doapfooter.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+test $# -ne 1 && echo "usage: $0 doap" && exit 1
+
+rdf="$1"
+
+q="PREFIX doap: <http://usefulinc.com/ns/doap#>
+PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+SELECT ?home ?repo ?license ?maintainer ?maintainerhome ?lang
+WHERE {
+?p a doap:Project;
+ doap:homepage ?home;
+ doap:repository ?r;
+ doap:license ?license;
+ doap:programming-language ?lang;
+ doap:maintainer ?m.
+?r doap:location ?repo.
+?m foaf:name ?maintainer;
+ foaf:homepage ?maintainerhome.
+}"
+
+roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \
+| while read r; do
+ home=`echo $r | awk -F , '{print $2}'| sed -e 's/uri(\(.*\))/\1/'`
+ repo=`echo $r | awk -F , '{print $3}'| sed -e 's/uri(\(.*\))/\1/'`
+ licenseuri=`echo $r | awk -F , '{print $4}'| sed -e 's/uri(\(.*\))/\1/'`
+ maint=`echo $r | awk -F , '{print $5}'| sed -e 's/"\(.*\)"/\1/'`
+ mainthome=`echo $r | awk -F , '{print $6}'| sed -e 's/uri(\(.*\))/\1/'`
+ lang=`echo $r | awk -F , '{print $7}'| sed -e 's/"\(.*\)"/\1/'`
+ test "$licenseuri" = "http://www.gnu.org/licenses/gpl.html" && license="GPL"
+ test "$licenseuri" = "http://creativecommons.org/licenses/MIT/" && license="MIT"
+
+ cat <<- _EOF_
+- Project homepage: [$home]($home)
+- Code repository: [$repo]($repo)
+- Maintainer: [$maint]($mainthome)
+- Language: $lang
+- License: [$license]($licenseuri)
+_EOF_
+done
diff --git a/web/doapheader.sh b/web/doapheader.sh
new file mode 100644
index 0000000..ca2b5f9
--- /dev/null
+++ b/web/doapheader.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+test $# -ne 1 && echo "usage: $0 doap" && exit 1
+
+rdf="$1"
+
+q="PREFIX doap: <http://usefulinc.com/ns/doap#>
+PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+SELECT ?name ?desc
+WHERE {
+?p a doap:Project;
+ doap:name ?name;
+ doap:description ?desc.
+}"
+
+roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \
+| while read r; do
+ name=`echo $r | awk -F , '{print $2}'| sed -e 's/"\(.*\)"/\1/'`
+ desc=`echo $r | awk -F , '{print $3}'| sed -e 's/"\(.*\)"/\1/'`
+
+ cat <<- _EOF_
+$name
+=======================================================================
+
+About
+-----
+
+$desc
+_EOF_
+done
diff --git a/web/index.html b/web/index.html
new file mode 100644
index 0000000..6fc6497
--- /dev/null
+++ b/web/index.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html><html><head>
+<style type="text/css">
+body { font-family: sans-serif; max-width: 75%; margin: auto;
+background: url(small.png) no-repeat 86% 2px; }
+h1 { font-size: 1.6em; text-align: center; margin-bottom: 0.2em; }
+h2 { font-size: 1.2em; border-bottom: thin solid black; margin-top: 0.1em; }
+h3 { border: thin solid black; margin: auto; background: #cd2f2f;
+max-width: 15em; text-align: center; padding: 0.2em; margin-bottom: 0.3em; }
+h3:hover { background: #ff9657; }
+h3 a { color: black; text-decoration: none }
+h3 a:hover { text-decoration: underline }
+img { display: block; margin: auto; }
+</style>
+<link rel="alternate" type="text/turtle" title="rdf" href="doap.ttl" />
+<title>Spout - A simple caveflying game</title>
+</head><body>
+
+<h1>Spout</h1>
+
+<h2>About</h2>
+<p>Spout is a simple caveflying game. The aim is to get as high as possible avoiding or destroying obstacles.</p>
+<p><img src="screen.png" alt="screenshot of Spout - A simple caveflying game" /></p>
+<h3><a href="http://njw.me.uk/software/spout/spout-1.4.tar.gz">Download Spout 1.4</a><br />
+(<a href="http://njw.me.uk/software/spout/spout-1.4.tar.gz.sig">GPG signature</a>)</h3>
+
+<h2>History</h2>
+<p>Spout was originally written for a handheld by kuni, and soon
+afterwards was ported to Windows using cygwin and sdl and released
+under the MIT license.</p>
+<p>In 2004 a 'unix version' was released, which mostly just slapped
+autotools into the windows version and infringed the license.</p>
+<p>This is a new unix version, based on the original Windows code by
+kuni, which aims to add useful features and simplify the code.</p>
+<hr />
+<ul>
+<li>Project homepage: <a href="http://njw.me.uk/software/spout">http://njw.me.uk/software/spout</a></li>
+<li>Code repository: <a href="http://git.njw.me.uk/spout.git">http://git.njw.me.uk/spout.git</a></li>
+<li>Maintainer: <a href="http://njw.me.uk">Nick White</a></li>
+<li>Language: C</li>
+<li>License: <a href="http://creativecommons.org/licenses/MIT/">MIT</a></li>
+</ul>
+</body></html>
diff --git a/web/makepage.sh b/web/makepage.sh
new file mode 100644
index 0000000..b2ad2ce
--- /dev/null
+++ b/web/makepage.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+test $# -ne 2 && echo "usage: $0 title doap" && exit 1
+
+title="$1"
+
+cat <<- _EOF_
+<!DOCTYPE html><html><head>
+<style type="text/css">
+body { font-family: sans-serif; max-width: 75%; margin: auto;
+ background: url(small.png) no-repeat 86% 2px; }
+h1 { font-size: 1.6em; text-align: center; margin-bottom: 0.2em; }
+h2 { font-size: 1.2em; border-bottom: thin solid black; margin-top: 0.1em; }
+h3 { border: thin solid black; margin: auto; background: #cd2f2f;
+ max-width: 15em; text-align: center; padding: 0.2em; margin-bottom: 0.3em; }
+h3:hover { background: #ff9657; }
+h3 a { color: black; text-decoration: none }
+h3 a:hover { text-decoration: underline }
+img { display: block; margin: auto; }
+</style>
+<link rel="alternate" type="text/turtle" title="rdf" href="doap.ttl" />
+<title>$title</title>
+</head><body>
+_EOF_
+
+sh web/doapheader.sh "$2" | smu
+
+echo "![screenshot of $title](screen.png)"|smu
+
+sh web/doapbutton.sh "$2" | smu
+
+tail -n 12 < README | smu # history
+
+echo "- - -"|smu
+
+sh web/doapfooter.sh "$2" |smu
+
+echo "</body></html>"
diff --git a/web/screen.png b/web/screen.png
new file mode 100644
index 0000000..07b6714
--- /dev/null
+++ b/web/screen.png
Binary files differ
diff --git a/web/small.png b/web/small.png
new file mode 100644
index 0000000..39e79a6
--- /dev/null
+++ b/web/small.png
Binary files differ