diff options
-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) |