From e96151e218cf912c9714ce83d631d11e2386d719 Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 20 Jul 2010 11:32:55 +0100 Subject: Add publication details for copying article --- bibtotxt.sh | 14 +++++++++++--- pubs/index.ttl | 5 +++-- 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: PREFIX 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 @@ a bibo:Article; dc:title "Technological change and the consumption of music"; - dc:date "2009"; + dc:date "2010"; dc:isPartOf ; + bibo:volume "1"; + bibo:issue "1"; cc:license ; - bibo:status ; dc:creator . a bibo:Periodical; -- cgit v1.2.3