25 May 2011

fdb 2.00: New GitHub Location; Defaults to Fluidinfo-style Paths

I have made a few small but significant changes changes to the fdb.py library and command line and pushed the version to 2.00.

  • I have renamed it on github as fdb rather than fdb.py. The fact that it was called fdb.py was based on my naïve (mis)understanding of github and meant that people pulling the repositroy would get it in a directory called fdb.py, which is almost unspeakably unpleasant. If you have a git remote set up to pull from it, you’ll probably have to edit your .git/config file.

    The new location is: https://github.com/njr0/fdb

  • I have changed the default convention from unix-style paths (which I prefer) to Fluidinfo-style paths. The old default behaviour meant that, for example, to tag the book animal farm with with a rating of 1 and then pull back that rating and the about tag you would use a command like:

    $ fdb tag -a 'book:animal farm (george orwell)' rating=10
    $ fdb show -a 'book:animal farm (george orwell)' rating /about
    Object with about="book:animal farm (george orwell)":
      /njr/rating = 10
      /fluiddb/about = "book:animal farm (george orwell)"

    By default, you now have to use full Fluidinfo-style paths:

    $ fdb tag -a 'book:animal farm (george orwell)' njr/rating=10
    $ fdb show -a 'book:animal farm (george orwell)' njr/rating fluiddb/about
    Object with about="book:animal farm (george orwell)":
      njr/rating = 10
      fluiddb/about = "book:animal farm (george orwell)"

    If you prefer the old behaviour, simply add to your credentials file (.fluiddbCredentials in your home directory, on unix, or fluiddbCredentials.ini on Windows) a third line saying:

    unix-style-paths true

    You can also specify unix-style-paths on the command line, with the -U flag, or Fluidinfo-style paths with the -F flag.

  • I’ve also fixed a minor bug in fdb, which affected some unicode queries. With the new version, you should be able to type

    $ fdb show -F -q 'fluiddb/about matches "café"' fluiddb/about
    1 object matched
    Object 10d77a6f-f9b1-4cb7-84c3-29f7454a20ce:
      fluiddb/about = "café papaya"

    and get at least one result back. Sadly, with earlier versions, you would get none.

  • There’s also a new --version (or -V) flag to find out the version number of the installed copy of fdb.

Apologies for any inconvenience that the repository move and change of default convention may cause; they’re probably for the best in the medium term.

Needless to say, I have unix-style-paths set to true, but I’ll probably switch to using non-unix-style paths for future blog posts.

(Terry wins this round.)

2 comments:

  1. Anonymous27/5/11 15:28

    I'm detecting a theme - that Terry always wins...

    ReplyDelete
  2. Right.

    But notice: I didn't say he was right . . . just that he won :-)

    ReplyDelete

Labels