diff options
author | Nick White <git@njw.me.uk> | 2010-05-07 10:17:19 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2010-05-07 10:17:19 +0100 |
commit | da14c926936da061be35db3f350afcded7a7f657 (patch) | |
tree | 4c1ac83ad500d9bc5e3b2965d0fd3c917bd12ba7 /makerss.sh | |
parent | 83db2289a41249050ebded9a62c18a40117e62b4 (diff) | |
download | njw-website-da14c926936da061be35db3f350afcded7a7f657.tar.bz2 njw-website-da14c926936da061be35db3f350afcded7a7f657.zip |
Use correct rdf info for publications
Diffstat (limited to 'makerss.sh')
-rwxr-xr-x | makerss.sh | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -4,12 +4,14 @@ [[ "$1" ]] && siteurl="$1" || siteurl="" [[ "$2" ]] && creator="$2" || creator="" -items=`find . -name '*.txt' ! -name 'robots.txt' | sed 's/^\.//g' | sed 's/\.txt$//g'` +items=`find . -name '*.txt' ! -name 'robots.txt' ! -path '*/publications/2*' | sed -e 's/^\.//g' -e 's/\.txt$//g'` +pubs=`find ./publications -name '2*.txt' | sed -e 's/^\.//g' -e 's/\.txt$//g'` title=`head -n 1 index.txt` cat << EOF @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix rss: <http://purl.org/rss/1.0/>. +@prefix bibo: <http://purl.org/ontology/bibo/>. @prefix dc: <http://purl.org/dc/elements/1.1/>. @prefix cc: <http://creativecommons.org/ns#>. @@ -21,7 +23,7 @@ cat << EOF rss:items [ a rdf:Seq; EOF -for item in $items; do +for item in $items $pubs; do echo " rdf:li <${siteurl}${item}>;" done @@ -41,3 +43,5 @@ for item in $items; do cc:license <http://creativecommons.org/licenses/by-sa/3.0/>. EOF done; + +sed -e '/^@/d' -e "s|http://njw.me.uk|${siteurl}|g" < publications/index.ttl |