summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2010-07-20 11:32:55 +0100
committerNick White <git@njw.me.uk>2010-07-20 11:32:55 +0100
commite96151e218cf912c9714ce83d631d11e2386d719 (patch)
treece08ee5342ce004f3b795979a59fd9b70173be1b
parent968ed8c488681ec25160645238822b9cace2415b (diff)
downloadnjw-website-e96151e218cf912c9714ce83d631d11e2386d719.tar.bz2
njw-website-e96151e218cf912c9714ce83d631d11e2386d719.zip
Add publication details for copying article
-rwxr-xr-xbibtotxt.sh14
-rw-r--r--pubs/index.ttl5
2 files changed, 14 insertions, 5 deletions
diff --git a/bibtotxt.sh b/bibtotxt.sh
index 681ab7c..ffa9a85 100755
--- a/bibtotxt.sh
+++ b/bibtotxt.sh
@@ -8,13 +8,15 @@ echo ""
q="PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX bibo: <http://purl.org/ontology/bibo/>
-SELECT ?a ?title ?artdate ?stat ?jtitle ?juri
+SELECT ?a ?title ?artdate ?stat ?jtitle ?juri ?vol ?iss
WHERE {
?a a bibo:Article;
dc:title ?title;
dc:date ?artdate;
- bibo:status ?stat;
dc:isPartOf ?j.
+ OPTIONAL { ?a bibo:status ?stat }.
+ OPTIONAL { ?a bibo:volume ?vol }.
+ OPTIONAL { ?a bibo:issue ?iss }.
?j dc:title ?jtitle;
bibo:uri ?juri.
}"
@@ -28,9 +30,15 @@ roqet -q -r csv -e "$q" -D /dev/stdin < $rdf | sed '/^Result/d' \
stat=`echo $r | awk -F , '{print $5}'| sed -e 's/uri(\(.*\))/\1/' -e 's/.*\/\([^\/]\)/\1/'`
jtitle=`echo $r | awk -F , '{print $6}'| sed -e 's/"\(.*\)"/\1/'`
juri=`echo $r | awk -F , '{print $7}'| sed -e 's/"\(.*\)"/\1/'`
+ vol=`echo $r | awk -F , '{print $8}'| sed -e 's/"\(.*\)"/\1/'`
+ iss=`echo $r | awk -F , '{print $9}'| sed -e 's/"\(.*\)"/\1/'`
echo "- [${title}](${reluri})"
echo " [[PDF]](${reluri}.pdf) (${artdate})"
echo " *[${jtitle}](${juri})*"
- echo " [${stat}]"
+ test -n "$vol" && echo -n " Vol. $vol"
+ test -n "$iss" && echo ", No. $iss"
+ test -n "$stat" && echo " [${stat}]"
done
+
+exit 0
diff --git a/pubs/index.ttl b/pubs/index.ttl
index 5f28c03..78dc9ba 100644
--- a/pubs/index.ttl
+++ b/pubs/index.ttl
@@ -13,10 +13,11 @@
<http://njw.me.uk/pubs/2009-copyme> a bibo:Article;
dc:title "Technological change and the consumption of music";
- dc:date "2009";
+ dc:date "2010";
dc:isPartOf <urn:issn:20411405>;
+ bibo:volume "1";
+ bibo:issue "1";
cc:license <http://creativecommons.org/licenses/by-sa/3.0/>;
- bibo:status <bibo:status/forthcoming>;
dc:creator <http://njw.me.uk/card#i>.
<urn:issn:20411405> a bibo:Periodical;