[pdb-discuss] Re: Somewhere to start
James Casbon
casbon at gmail.com
Mon Jul 16 15:53:30 UTC 2007
On 16/07/07, Rufus Pollock <rufus.pollock at okfn.org> wrote:
> This looks really excellent. I've just ported our existing domain model
> to sqlalchemy/elixir and you can see the results at:
>
> http://p.knowledgeforge.net/pdw/svn/trunk/src/pdw/www/models/recording.py
>
> Unit tests showing usage at:
>
> <http://p.knowledgeforge.net/pdw/svn/trunk/src/pdw/www/tests/models/test_recording.py>
>
Rufus, that looks like a really good start. The python pedant in me
can't help but mention that if your going to use all the XUnit cruft
then self.assertEquals gives you better messages than plain assert.
As for the model, again looks good. I like the idea.
>
> We'd welcome assistance and I very much think this could be useful. Our
> next task is to complete the domain model and then start pushing/pulling
> data from musicbrainz to a local db on which we can run the web app.
>
Presumably you're well aware of: http://musicbrainz.org/doc/PythonMusicBrainz2
Part of me is wondering if the idea of replicating some of the
musicbrainz database doesn't smell slightly bad. Apologies if this
has already been discussed, but I'm new here.
Wouldn't it be better to try and link each recording to the musicbrainz id. eg:
the MBID field from here.
http://musicbrainz.org/track/9f429c1b-ac0b-4e7a-8686-8804b09d5c67.html
Then
1. write a service that returns a recording for a given MBID
2. hack up a greasemonkey script to overlay onto the MB site that a
recording is available
Then you put all the chore of domain models and databases on MB.
Obviously this cant provide you search for tracks where there *is* a
recording avaiable. But hey, for each track available you could walk
the MB model and get the data as text, then create a web page for each
track and let google do the searching for you - they may be better at
it ;-)
Again, sorry if that's a bit leftfield,
James
More information about the pd-discuss
mailing list