From 197e0405ef20da925c17e72e9bdcc0ca07bc653d Mon Sep 17 00:00:00 2001 From: Nick White Date: Sat, 13 Nov 2010 21:37:10 +0000 Subject: Move summary to websummary --- Makefile | 2 +- summary.sh | 44 -------------------------------------------- websummary.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 summary.sh create mode 100644 websummary.sh diff --git a/Makefile b/Makefile index f754f33..3c21132 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ index.html: doap.ttl README webheader.html @echo '

SimplyRead $(VERSION) for Chromium
' >> $@ @echo 'GPG signature

' >> $@ @echo '
' >> $@ - @sh summary.sh doap.ttl | smu >> $@ + @sh websummary.sh doap.ttl | smu >> $@ @echo '' >> $@ dist: diff --git a/summary.sh b/summary.sh deleted file mode 100644 index c274443..0000000 --- a/summary.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -test $# -ne 1 && echo "usage: $0 doap" && exit 1 - -rdf="$1" - -q="PREFIX doap: -PREFIX foaf: -SELECT ?home ?repo ?license ?maintainer ?maintainerhome ?lang ?repotype -WHERE { -?p a doap:Project; - doap:homepage ?home; - doap:repository ?r; - doap:license ?license; - doap:programming-language ?lang; - doap:maintainer ?m. -?r a ?repotype; - 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://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: $repocmd $repo -- Maintainer: [$maint]($mainthome) -- Language: $lang -- License: [$license]($licenseuri) -_EOF_ -done diff --git a/websummary.sh b/websummary.sh new file mode 100644 index 0000000..c274443 --- /dev/null +++ b/websummary.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +test $# -ne 1 && echo "usage: $0 doap" && exit 1 + +rdf="$1" + +q="PREFIX doap: +PREFIX foaf: +SELECT ?home ?repo ?license ?maintainer ?maintainerhome ?lang ?repotype +WHERE { +?p a doap:Project; + doap:homepage ?home; + doap:repository ?r; + doap:license ?license; + doap:programming-language ?lang; + doap:maintainer ?m. +?r a ?repotype; + 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://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: $repocmd $repo +- Maintainer: [$maint]($mainthome) +- Language: $lang +- License: [$license]($licenseuri) +_EOF_ +done -- cgit v1.2.3