summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;