Jan 22, 2008

For two recently launched websites (Karkara.com and Eibar.org) I have used Plone4ArtistsAudio, to easily create an audio album with podcasting capabilities without creating a new content-type. P4AAudio, is a product for Plone that exposes some python libraries to re-use common Plone content-types, like Files, to use them like an audio album.

For example, Gari has in his blog a folder called podcast, where he uploads his radio programs broadcasted by Euskadi Irratia every two weeks. I added Plone4ArtistsAudio to this Plone installation and enabled media in this folder, and only in this folder, and all audio files uploaded like Plone standard files were audio enhanced automagically to have this pretty look and feel.

Gari's podcast example

This is pretty cool: I had to add no custom content-type (so, no new portal types) to Plone. Some zope3 concepts like interfaces, adaptation or event subscribers are used by Plone4ArtistsAudio to create this product.

But everything has its cons. The installation of Plone4ArtistsAudio was a pain. In our latest projects we have used zc.buildout to deploy our sites following Martin's tutorial on Plone.org and many other suggestions from Plone community.

Plone4ArtistsAudio is just a bundle of python modules p4a.audio, p4a.ploneaudio, p4a.common, p4a.z2utils and plone.app.form. It ships all these modules inside a folder called pythonlib and it add this folder to the sys.path when loading.

For some reason, this way of including the modules in the PYTHONPATH is not compatible with the buildout way of working, because when starting, zope complained about plone.app.form not being found.

After some searching on the Internet, I found that something similar happened with PloneGetPaid but I couldn't fix it. So, after some help by Tim Terlegård, I decided to leave Plone4ArtistsAudio in my products folder, but add the libraries it ships as develop-eggs. Be careful, you cannot add this libraries directly as installable eggs from the PyPI, because some of them are marked to be zip_safe eggs, which aren't because they need the zcml files inside them loaded by Zope.

So, my buildout.cfg file is now something like this:

[buildout]
newest = false
index = http://download.zope.org/ppix
versions = versions

parts =
    plone
    zope2
    productdistros
    cachefu
    instance zopepyeggs =
    elementtree
    p4a.audio
    p4a.common
    p4a.fileimage
    p4a.ploneaudio
    p4a.z2utils
    plone.app.form

develop =
    src/p4a.audio
    src/p4a.common
    src/p4a.fileimage
    src/p4a.ploneaudio
    src/p4a.z2utils
    src/plone.app.form  [...]

And svn:externals set to the following URLs inside src directory:

p4a.audio http://www.plone4artists.org/svn/projects/p4a.audio/tags/release-1.0.1/
p4a.ploneaudio http://www.plone4artists.org/svn/projects/p4a.ploneaudio/tags/release-1.0.1/
p4a.common http://www.plone4artists.org/svn/projects/p4a.common/tags/release-1.0/
p4a.z2utils http://www.plone4artists.org/svn/projects/p4a.z2utils/tags/release-1.0/
p4a.fileimage http://www.plone4artists.org/svn/projects/p4a.fileimage/tags/release-1.0/
plone.app.form -r 18164 https://svn.plone.org/svn/plone/plone.app.form/branches/plone-2.5/

So, Plone4ArtistsAudio is a great product, it provides not only a nice interface without adding new content types, but also uses zope3 concepts like interfaces, adapters and subscriber and it also provides a podcast RSS feed, but its installation is not as easy as dropping the product in the Products folder.

Wow, this first post was quite long, but I hope it will be helpful for those trying to install Plone4ArtistsAudio in their buildout based Plone.

Happy Ploning and happy buildouting.. ;)

Add comment

You can add a comment by filling out the form below. Plain text formatting. Web and email addresses are transformed into clickable links. Comments are moderated.

You may be interested in these other articles