#!/bin/sh # # Using the W3C Tech Reports Digital Library data with RubyRDF # danbri@w3.org # $Id: Makefile,v 1.1 2002/03/12 21:11:39 danbri Exp $ # TR Automation writeup: http://www.w3.org/2002/01/tr-automation/ # This README file is a shell script that shows how # easy it is to use the Ruby-RDF PostgreSQL # # assumptions: # - redland is installed (for RDF parser) # - postgresql is up and running and db tables exist all: fetch ask fetch: wget parse sqlize load ask: test1 # Get RDF: wget: wget http://www.w3.org/2000/04/mem-news/tr2.rdf # parse and convert RDF: parse: rdfdump -o ntriples file:tr2.rdf > tr2.nt # requires Redland/Repat parser sqlize: cd ../../db/;./nt2sql.rb <../examples/tr/tr2.nt > ../examples/tr/tr2.sql # load RDF: load: psql test1 < tr2.sql # ask the database a Squish query: test1: ../../squish/squish.rb < ./notes.squish | psql test1