diff options
author | Nick White <git@njw.me.uk> | 2010-10-24 13:39:20 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2010-10-24 13:39:20 +0100 |
commit | b0659cf2523776df0bba023e2a54f1d8d3afda4e (patch) | |
tree | a3531488c7b9ee2bf635a91bc33c914a3ed6c8ee | |
parent | ddd0a6e1afddd2d9395a48e03d62ee97ed3bd73a (diff) |
Fix doap and improve summary output
-rw-r--r-- | doap.ttl | 2 | ||||
-rw-r--r-- | summary.sh | 9 |
2 files changed, 7 insertions, 4 deletions
@@ -1,7 +1,7 @@ @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/alacarte#>. +@prefix : <http://njw.me.uk/software/readable/#>. :p a doap:Project; doap:name "Readable"; @@ -6,7 +6,7 @@ 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 +SELECT ?home ?repo ?license ?maintainer ?maintainerhome ?lang ?repotype WHERE { ?p a doap:Project; doap:homepage ?home; @@ -14,7 +14,8 @@ WHERE { doap:license ?license; doap:programming-language ?lang; doap:maintainer ?m. -?r doap:location ?repo. +?r a ?repotype; + doap:location ?repo. ?m foaf:name ?maintainer; foaf:homepage ?maintainerhome. }" @@ -30,10 +31,12 @@ roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \ test "$licenseuri" = "http://www.gnu.org/licenses/gpl.html" && license="GPL" test "$licenseuri" = "http://www.gnu.org/licenses/agpl.html" && license="AGPL" test "$licenseuri" = "http://creativecommons.org/licenses/MIT/" && license="MIT" + repotype=`echo $r | awk -F , '{print $8}'| sed -e 's/uri(\(.*\))/\1/'` + test "$repotype" = "http://usefulinc.com/ns/doap#GitRepository" && repocmd="git clone" cat <<- _EOF_ - Project homepage: [$home]($home) -- Code repository: git clone $repo +- Code repository: $repocmd $repo - Maintainer: [$maint]($mainthome) - Language: $lang - License: [$license]($licenseuri) |