I just pushed fdb.py 0.3 to github (http://github.com/njr0/fdb.py).
It has a few extra things in the API, but the big new thing is you can use it from
the command line.
I hope the following is reasonably self-explanatory. Obviously you can use
an alias or a 1-line shell script to get rid of the need for the python fdb.py.
Script started on Fri Aug 21 16:27:35 2009 $ # reference objects by their about tag using -a $ # the -v just tells it to be verbose and tell you what it's doing $ python fdb.py tag -av DADGAD rating=10 Tagged object with about="DADGAD" with rating = 10 $ python fdb.py tag -av DADGAD favourite Tagged object with about="DADGAD" with favourite $ python fdb.py get -a DADGAD rating favourite /terry/rating Object with about=DADGAD: /njr/rating = 10 /njr/favourite <tag /terry/rating not present> $ python fdb.py untag -a -v DADGAD rating Removed tag rating from object with about="DADGAD" $ python fdb.py get -a DADGAD rating favourite /terry/rating Object with about=DADGAD: <tag /njr/rating not present> /njr/favourite <tag /terry/rating not present> $ # reference objects by their id tag using -i $ python fdb.py tag -iv a984efb2-67d8-4b5c-86d0-267b87832fa4 rating=10 Tagged object a984efb2-67d8-4b5c-86d0-267b87832fa4 with rating = 10 $ python fdb.py tag -iv a984efb2-67d8-4b5c-86d0-267b87832fa4 favourite Tagged object a984efb2-67d8-4b5c-86d0-267b87832fa4 with favourite $ python fdb.py get -i a984efb2-67d8-4b5c-86d0-267b87832fa4 rating favourit e /terry/rating Object a984efb2-67d8-4b5c-86d0-267b87832fa4: /njr/rating = 10 /njr/favourite <tag /terry/rating not present> $ python fdb.py untag -i -v a984efb2-67d8-4b5c-86d0-267b87832fa4 rating Removed tag rating from object a984efb2-67d8-4b5c-86d0-267b87832fa4 $ python fdb.py get -i a984efb2-67d8-4b5c-86d0-267b87832fa4 rating favourit e /terry/rating Object a984efb2-67d8-4b5c-86d0-267b87832fa4: <tag /njr/rating not present> /njr/favourite <tag /terry/rating not present> $ exit Script done on Fri Aug 21 16:31:45 2009
No comments:
Post a Comment