Re: Querying dbpedia from the command line?

2008-09-18 Thread Bob DuCharme
Richard Cyganiak wrote: 1. SPARQL is great, but too verbose for the command line. I don't worry about this much, because I'm not interested in using it from the command line per se as much as the ability to use a script to retrieve data from a SPARQL endpoint, and doing it from the command

Re: Querying dbpedia from the command line?

2008-09-17 Thread Richard Cyganiak
Bob, I'm not sure if it works on every SPARQL endpoint, but try this: curl -F 'query=SELECT * WHERE { ?s ?p ?o } LIMIT 3' http://dbpedia.org/sparql The key is using curl's -F parameter (which takes a key-value pair and urlencodes the value), and putting the 'query=...' part into quotes.

Re: Querying dbpedia from the command line?

2008-09-17 Thread Bob DuCharme
Sergio Fernández wrote: Did you try to quote the URL? Yes, see http://lists.w3.org/Archives/Public/public-lod/2008Sep/0032.html. It may be one of those things that has a different effect on the Windows and Linux command lines. Bob

Re: Querying dbpedia from the command line?

2008-09-17 Thread Bob DuCharme
Richard Cyganiak wrote: I'm not sure if it works on every SPARQL endpoint, but try this: curl -F 'query=SELECT * WHERE { ?s ?p ?o } LIMIT 3' http://dbpedia.org/sparql The key is using curl's -F parameter (which takes a key-value pair and urlencodes the value), and putting the 'query=...'

Querying dbpedia from the command line?

2008-09-16 Thread Bob DuCharme
Has anyone managed to pass a URL with a SPARQL query to wget or curl and successfully retrieved data from dbpedia? When I take the wget example at http://groups.yahoo.com/group/govtrack/message/570 and paste the query at dbpedia's SNORQL interface it works[1], and when I paste the wget

Re: Querying dbpedia from the command line?

2008-09-16 Thread Bob DuCharme
- Bob DuCharme [EMAIL PROTECTED] wrote: Has anyone managed to pass a URL with a SPARQL query to wget or curl and successfully retrieved data from dbpedia? Peter Ansell wrote: You need to URLEncode the SPARQL query. I am not sure how to do that with a command-line or wget but that

Re: Querying dbpedia from the command line?

2008-09-16 Thread Peter Ansell
- Bob DuCharme [EMAIL PROTECTED] wrote: From: Bob DuCharme [EMAIL PROTECTED] To: Peter Ansell [EMAIL PROTECTED] Cc: public-lod@w3.org Sent: Wednesday, September 17, 2008 12:01:08 PM GMT +10:00 Brisbane Subject: Re: Querying dbpedia from the command line? - Bob DuCharme [EMAIL