n.py

N.py is a note taking tool allowing typed notes and rich metadata.

Example Commands and Actions

n.py @@ some todo item

Stores the item as a todo item.

Person: Bob B. Bobbington, bob
> Person(bob) foaf:name "Bob B. Bobbington" .
> Person(bob) foaf:nick "bob" .

Stores Bob B. Bobbington as a person.

Person: Fanny F. Fannington, fanny
> Person(fanny) foaf:name "Fanny F. Fannington" .
?Person # same as ? rdf:type Person
> [Person(bob), Person(fanny)]
Person(bob)? # same as Person(bob) ? ?
> Person(bob) foaf:name "Bob B. Bobbington"; 
>    foaf:nick "bob" .
bob livesWith fanny .
> Person(bob) livesWith Person(fanny) .

Adds another person, and provides her relationship to another person.

todo: clean car
> Todo(s8f) added
s8f for fanny
> Todo(s8f) :for Person(fanny)
? for fanny
> [Todo(s8f)]

Adds a todo item, and shows a query.

Possiblity: item based labelling. For example, if you're adding a "for" property to a todo item, you know that the range of that is a person, so you can just look up people, and so all you need is an unambiguous label for people in the system—you don't even need a sytemwide unique ID. So you might have some subPropertyOf foaf:name for the task. It'd only work when you know the range/domain (as appropriate) for a property, though.

Person: Bob B. Bobbington, bob
> Person(bob) :name "Bob B. Bobbington" .
> Person(bob) :nick "bob" .
todo: clean car
> Todo(s8f) added
s8f for bob
> Todo(s8f) :for Person(jf8)
? for bob
> [Todo(s8f)]

Adding a todo item, and querying, with good label lookups.

Perhaps we could have constructor functions: so that if you know that you're adding something of a particular class, it can take various arguments.

Person: Fred F. Freddington, fred
> Person(fred) :name "Fred F. Freddington" .
> Person(fred) :nick "fred" .

And @@ is just an alias for the Todo class constructor...

todo: feed fish
> Todo(xbe) added

So, files in b.py are being used pretty much as classes would be here. I guess one can have multiple inheritance, though?

rdfs:subClassOf :Duck :Animal .
> :Duck rdfs:subClassOf :Animal .
Duck: Quackford Q. Quackington, quacky
> Animal.Duck(vps) :name "Quackford Q. Quackington" .
> Animal.Duck(vps) :nick "quacky" .

Yeah, seems right. Now, are Todo and Note datatype classes? I presume that they are, since they only consist of a single rdf:value item, really.

Sean B. Palmer