Re: What are the repetitive bits you do?

On 17 September 2011 12:37, Sebastian Tramp
<tramp@informatik.uni-leipzig.de> wrote:
> On Fri, Sep 16, 2011 at 11:13:05PM +0200, Melvin Carvalho wrote:
>
>> > 1. https://github.com/seebi/rdf.sh
>>
>> Thanks! I'm using this quite a lot now.
>>
>> Here's one I like:
>>
>> curl -X PATCH -H 'Content-Type: application/json'
>> -d '{ "http://melv.data.fm/test.ttl#me": {
>> "http://xmlns.com/foaf/0.1/givenname" : [ { "value" : "Melvin", "type"
>> : "literal" } ] } } ' melv.data.fm/test.ttl
>>
>> This will send an HTTP PATCH update to change one triple in a file
>> in my data space. It's useful when you want to use The Web as a
>> persistent store.
>
> Which backend do you use for this?
>
> A command "rdf patch melv.data.fm/test.ttl <new.json" is easily written
> but I think this is not really useable since writing json by hand is not
> that delight ;-)
>
> better would be:
>
> rdf.sh addAttribute m:me foaf:name "Melvin"
> or
> rdf.sh addRelation m:me foaf:knows http://sebastian.tramp.name
>
> To distinguish between datatype and object relations simplifies the
> command line a little bit. ...
>
> I wanted to add locally defined prefix definitions anyway - at the
> moment all prefixes are fetched from prefix.cc (again and again, so a
> cache is also needed)

Naming tricky.

The webstorage nameing seems to have some traction setItem / getItem (
http://dev.w3.org/html5/webstorage/ )

I thought something like:

rdf base "http://melv.data.fm/test.ttl#me"

then

rdf setItem foaf:name Melvin
rdf getItem foaf:name

Or perhaps instead of base the command can take an optional URI as the
last param.

A bit like rapper -g (guess mode) perhaps the script can make a good
guess as to whether this is an xsd:string or URI

Something along those lines I think would be a convenient way to
program the readwrite web from the command line, can be extended to
include your cert etc.

Thoughts?

>
> Best regards
>
> Sebastian Tramp
>
> --
> WebID: http://sebastian.tramp.name
>
>

Received on Friday, 23 September 2011 10:15:49 UTC