<?xml version="1.0" ?>
<?xml-stylesheet href="atom.css" type="text/css"?>
<!-- Perhaps "context" should be replaced with "view"? [Reinout]-->
<atom:feed xmlns="http://www.w3.org/2005/Atom"
           xmlns:atom="http://www.w3.org/2005/Atom"
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           xml:base="http://play.pixelblaster.ro"
           xml:lang="en">

  <div xmlns="http://www.w3.org/1999/xhtml">
    <a href="http://www.atomenabled.org/feedvalidator/check.cgi?url=http://play.pixelblaster.ro/blog">
      <img title="Validate my Atom feed" width="88"
           height="31"
           src="http://www.atomenabled.org/feedvalidator/images/valid-atom.png"
           alt="[Valid Atom]" border="0px"/>
    </a>
    <p>
      <span>
        This is an Atom formatted XML site feed. It is intended to be viewed in
        a Newsreader or syndicated to another site. Please visit 
      </span>
      <a href="http://www.atomenabled.org/">Atom Enabled</a>
      <span>
        for more info.
      </span>
    </p>
  </div>

  <atom:title type="html">Weblog</atom:title>
  <atom:subtitle></atom:subtitle>

  <atom:updated>2012-01-16T15:32:10+02:00</atom:updated>

  <atom:link href="http://play.pixelblaster.ro/blog"
             rel="alternate" type="text/html"/>

  

  <atom:id>e9c2584b19d92991459a0bd0dc2f7f09</atom:id>

  <atom:generator uri="http://plone.org/products/fatsyndication/" version="0.1">fatsyndication</atom:generator>

  

    <atom:entry>

      <atom:title>A simple epub file renaming utility</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2012/01/16/a-simple-epub-file-renaming-utility">
        http://plone.org/
      </atom:link>

      <atom:id>d954c6355077a525f278f8bc028e7a94</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I have a couple of epub files that have random names assigned to them, and I wanted to rename them based on their metadata, in the form Author - Title. Below is what I came up with:</p>
<pre>#!/usr/bin/python

from zipfile import ZipFile
import lxml.etree
import os.path
import shutil
import sys

namespaces = {
        'u':"urn:oasis:names:tc:opendocument:xmlns:container",
        'xsi':"http://www.w3.org/2001/XMLSchema-instance",
        'opf':"http://www.idpf.org/2007/opf", 
        'dcterms':"http://purl.org/dc/terms/",
        'calibre':"http://calibre.kovidgoyal.net/2009/metadata",
        'dc':"http://purl.org/dc/elements/1.1/",
        }

def main():
    if len(sys.argv) != 2:
        print "Need a path."
        sys.exit(1)

    fpath = sys.argv[1]
    zip = ZipFile(fpath)
    meta = zip.read("META-INF/container.xml")
    e = lxml.etree.fromstring(meta)
    rootfile = e.xpath("/u:container/u:rootfiles/u:rootfile", 
            namespaces=namespaces)[0]
    path = rootfile.get('full-path')
    opf = zip.read(path)
    e = lxml.etree.fromstring(opf)
    title = e.xpath("//dc:title", namespaces=namespaces)[0].text
    author = e.xpath("//dc:creator", namespaces=namespaces)[0].text


    base = os.path.dirname(fpath)
    new_name = "%s - %s.epub" % (author, title)
    shutil.move(fpath, os.path.join(base, new_name))

if __name__ == "__main__":
    main()
</pre>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2012-01-16T15:32:10+02:00</atom:published>

      <atom:updated>2012-01-16T15:32:10+02:00</atom:updated>

      
        <atom:category term="Python"/>
      
      
        <atom:category term="cookbook"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Getting the superclasses for a python object</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2011/06/28/getting-the-superclasses-for-a-python-object">
        http://plone.org/
      </atom:link>

      <atom:id>23d7964b9d62a59e622050c3b765a2fc</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>Zope 2 (and Plone) persistent objects usually have an intricate inheritance tree. Finding what classes an object inherits can be a time consuming task, hunting through the various eggs for the relevant source code. Below is a little snippet that shows how to easily get the list of superclasses:</p>
<pre>(Pdb) pp type(ff).mro()
(&lt;class 'plone.app.blob.subtypes.image.ExtensionBlobField'&gt;,
&nbsp;&lt;class 'archetypes.schemaextender.field.TranslatableExtensionField'&gt;,
&nbsp;&lt;class 'archetypes.schemaextender.field.BaseExtensionField'&gt;,
&nbsp;&lt;class 'plone.app.blob.field.BlobField'&gt;,
&nbsp;&lt;class 'Products.Archetypes.Field.ObjectField'&gt;,
&nbsp;&lt;class 'Products.Archetypes.Field.Field'&gt;,
&nbsp;&lt;class 'Products.Archetypes.Layer.DefaultLayerContainer'&gt;,
&nbsp;&lt;class 'plone.app.blob.mixins.ImageFieldMixin'&gt;,
&nbsp;&lt;class 'Products.Archetypes.Field.ImageField'&gt;,
&nbsp;&lt;class 'Products.Archetypes.Field.FileField'&gt;,
&nbsp;&lt;type 'ExtensionClass.Base'&gt;,
&nbsp;&lt;type 'object'&gt;)</pre>
<p>&nbsp;Credit goes to the <a class="external-link" href="http://pybites.blogspot.com/2009/01/mro-magic.html">original post</a> where I found this.</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2011-06-28T17:08:06+03:00</atom:published>

      <atom:updated>2011-06-28T17:09:03+03:00</atom:updated>

      
        <atom:category term="zope2"/>
      
      
        <atom:category term="zope3"/>
      
      
        <atom:category term="cookbook"/>
      
      
        <atom:category term="Plone"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Version conflict: zc.buildout's version of madness</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2011/05/02/version-conflict-zc-buildouts-version-of-madness">
        http://plone.org/
      </atom:link>

      <atom:id>db03cd46d9cf51639b97c8f04bfd0578</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I'm not even trying to understand what happens, because it's aggravating to see buildouts fail like this:</p>
<pre>While:
&nbsp; Installing.
&nbsp; Getting section zope2.
&nbsp; Initializing section zope2.
&nbsp; Installing recipe plone.recipe.zope2install.
Error: There is a version conflict.
We already have: setuptools 0.6c9</pre>
<p>or, worse, this:</p>
<pre>While:
&nbsp; Installing.
&nbsp; Getting section zope2.
&nbsp; Initializing section zope2.
&nbsp; Installing recipe plone.recipe.zope2install.
Error: There is a version conflict.
We already have: zc.buildout 1.5.2</pre>
<p>Well, technically I know what happens: for example, zc.buildout is latest 2.0a1 now, but I've already installed 1.5.2 in my virtualenv (the bootstrap process failed hard, there are a tons of bugs there, I've had more failures in bootstrap then success, lately) and I had one product in my buildout which depended on zc.buildout, so it tried to pull the latest, only to get a version conflict.</p>
<p>I wish zc.buildout would behave more inteligently. Even specifying&nbsp;</p>
<pre class="literal-block">prefer-final = true<br /></pre>
<p>didn't do much to solve my problems. The only way to solve the problem was to add the following to the buildout.cfg file:</p>
<pre>[buildout]
...
versions = versions

[versions]
zc.buildout =1.5.2
setuptools = 0.6c9</pre>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2011-05-02T10:13:55+03:00</atom:published>

      <atom:updated>2011-05-02T10:14:08+03:00</atom:updated>

      
        <atom:category term="rants"/>
      
      
        <atom:category term="cookbook"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Building PIL with JPEG support on Ubuntu 11.04</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2011/05/01/building-pil-with-jpeg-support-on-ubuntu-11.04">
        http://plone.org/
      </atom:link>

      <atom:id>e8ed0b9fefd77aaeab180506c0b1742c</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I had problems building PIL with jpeg support on the latest Ubuntu. There are now two libjpeg libraries: one called libjpeg62 and one libjpeg8. Every guide on the net explaining how to compile PIL with jpeg support points to installing libjpeg62-dev. Needless to say, libjpeg8-dev is actually needed to properly build PIL. My reason for initially avoiding libjpeg8 is that it causes libsdlimage-dev to be uninstalled, so it looks like I'll have to juggle packages whenever I want to compile something that requires SDL.</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2011-05-01T12:41:20+03:00</atom:published>

      <atom:updated>2011-05-01T12:41:45+03:00</atom:updated>

      
        <atom:category term="rants"/>
      
      
        <atom:category term="cookbook"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Export/import users in and out of Plone</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2011/03/09/export-import-users-in-and-out-of-plone">
        http://plone.org/
      </atom:link>

      <atom:id>5c1ebf60bd7797d28192bf0a2add69c3</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>A dirty quick method of importing and exporting the users (only usernames and passwords) out of Plone, using 2 external methods. Code below, not much else to say.</p>
<pre>import cPickle

def export(self):
    pas = self.acl_users
    users = pas.source_users
    passwords = users._user_passwords
    result = dict(passwords)

    f = open('/tmp/out.blob', 'w')
    cPickle.dump(result, f)
    f.close()

    return "done"

def import_users(self):
    pas = self.acl_users
    users = pas.source_users
    f = open('/tmp/out.blob')
    res = cPickle.load(f)
    f.close()

    for uid, pwd in res.items():
        users.addUser(uid, uid, pwd)

    return "done"
</pre>
<h2><br /></h2>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2011-03-09T18:09:19+02:00</atom:published>

      <atom:updated>2011-03-09T18:09:19+02:00</atom:updated>

      
        <atom:category term="cookbook"/>
      
      
        <atom:category term="Plone"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Set product configuration globally in zope.conf</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2011/02/08/set-product-configuration-globally-in-zope.conf">
        http://plone.org/
      </atom:link>

      <atom:id>ec0a4bf0471c7debceb7892e6513c98f</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I have a Zope product that needs to write in a centralized location, across multiple instances. The classic Python solution would be to write a variable in a config.py module and read that location from the code, but this feels unelegant in an environment that uses zc.buildout for deployment. The solution I have found is, as follows:</p>
<p>In buildout.cfg, in the instance part definition, add:</p>
<pre>zope-conf-additional =
&nbsp;&nbsp;&nbsp; &lt;environment&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mylocation ${buildout:directory}/var/mylocation
&nbsp;&nbsp;&nbsp; &lt;/environment&gt;
</pre>
<p>Next, inside the product code I have:</p>
<pre>from App.config import getConfiguration
import os

conf = getConfiguration()
dest = conf.environment['mylocation']
if not os.path.exists(dest):
&nbsp;&nbsp;&nbsp; os.mkdir(dest)</pre>
<p>There were 2 things that I had to research for this task: reading the global zope configuration (that's done with App.config.getConfiguration()) and the fact that you can't add arbitrary key/values in zope.conf and have to use the &lt;environment&gt; section.</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2011-02-08T19:46:42+02:00</atom:published>

      <atom:updated>2011-02-08T19:48:13+02:00</atom:updated>

      
        <atom:category term="zope2"/>
      
      
        <atom:category term="cookbook"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Running Products.Gloworm on Plone 4</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2011/01/04/running-products-gloworm-on-plone-4">
        http://plone.org/
      </atom:link>

      <atom:id>32b4c60324b00cc26dafcd0c172a730c</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>For some reason, the TTW developer tools tend to get neglected in the Plone world. A valuable tools such as Clouseau has fallen out of favour and now Gloworm, the @@manage-viewlets replacement/complement won't run in Plone 4 (at least at version 1.0, which is the latest right now on PyPI).</p>
<p>Fortunately, Gloworm has been updated in svn trunk. To get the latest version you need to add it to sources (in buildout.cfg or develop.cfg):</p>
<pre>[buildout]
eggs +=
&nbsp;&nbsp;&nbsp;&nbsp; Products.Gloworm

[sources]
Products.Gloworm = svn https://weblion.psu.edu/svn/weblion/weblion/Products.Gloworm/trunk/
</pre>
<p>Next, run in the shell:</p>
<pre>#bin/develop co Products.Gloworm
#bin/develop rb
</pre>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2011-01-04T19:09:02+02:00</atom:published>

      <atom:updated>2011-01-04T19:35:23+02:00</atom:updated>

      
        <atom:category term="cookbook"/>
      
      
        <atom:category term="Plone"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>A pattern for programatically creating Plone content</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2011/01/02/a-patern-for-programatically-creating-plone-content">
        http://plone.org/
      </atom:link>

      <atom:id>2df7300353ddbed130f9abbf3b36174b</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I'm importing content from a legacy system to a new website that I'm doing with Plone 4 (wow! what an improvement, in speed and technology) and was looking at the existing documentation on how to programatically create new Plone content. The issue I'm having with the <a class="external-link" href="http://plone.org/documentation/kb/add-content-programmatically">existing documentation</a> is that it's incomplete. It won't give you automatically created ids, you'll have to manually call mutators if you don't know any better, etc.</p>
<p>This is what I have come up with (this code runs in a browser view):</p>
<pre>_id = self.context.generateUniqueId("Document")
_id = self.context.invokeFactory(type_name=type_name, id=_id)
ob = self.context[_id]
ob.edit(
     description = "text...",
     subject     = ('tag1', 'tag2'),
     title       = "some title...",
&nbsp;)
ob._renameAfterCreation(check_auto_id=True)
_id = ob.getId()
</pre>
<p>One thing I notice is that Plone 4 starts faster, comes with easily pluggable developer tools, and in general feels a lot more polished then any previous Plone releases. It's a good system to work with.</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2011-01-02T11:11:54+02:00</atom:published>

      <atom:updated>2011-01-04T19:34:42+02:00</atom:updated>

      
        <atom:category term="cookbook"/>
      
      
        <atom:category term="Plone"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>A miniguide to Dolmen packages</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2010/09/19/a-miniguide-to-dolmen-packages">
        http://plone.org/
      </atom:link>

      <atom:id>d0b7901be6fed9aa9399661ea0bbea35</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I'm finally starting a long-overdue project which I have decided to do with <a class="external-link" href="http://www.dolmen-project.org/">Dolmen</a>. As usual, I start by studying its source code and the <a class="external-link" href="http://gitweb.dolmen-project.org/">packages</a> that are available for it. By itself it can will get me about 60% with the requirements for my project, so it's a pretty good starting base. I plan to also study and use some of the menhir.* packages, which are pretty good as generic CMS content types.</p>
<dl class="docutils">
<dt>dolmen</dt>
<dd>Dolmen is an application development framework based on Grok and ZTK which also provides a CMS (Content Management System) out of the box. Dolmen is being made with four main objectives in mind: easily pluggable, rock solid and fast content type development, readability and speed.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.app.authentication">dolmen.app.authentication</a></dt>
<dd>Users and group management in Dolmen</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.app.breadcrumbs">dolmen.app.breadcrumbs</a></dt>
<dd>Provides a breadcrumbs navigation for the Dolmen applications. It registers a viewlet to render the links.</dd>
<dt>dolmen.app.clipboard</dt>
<dd>Provides a useable "clipboard", that allows you to cut, copy and paste your objects.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.app.container">dolmen.app.container</a></dt>
<dd>Is a collection of tools to work with containers in Dolmen applications.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.app.content">dolmen.app.content</a></dt>
<dd>Provides out-of-the-box utilities for Dolmen applications content.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.app.layout">dolmen.app.layout</a></dt>
<dd>Provides ready-to-use components to get a fully functional and extensively pluggable User Interface for a Dolmen application</dd>
<dt>dolmen.app.metadatas</dt>
<dd>Forms and viewlets to edit ZopeDublinCore metadata</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.app.search">dolmen.app.search</a></dt>
<dd>Viewlets and utilities for permission-aware searching of objects in a Dolmen site.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.app.security">dolmen.app.security</a></dt>
<dd>Roles and permissions for a Dolmen site</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.app.site">dolmen.app.site</a></dt>
<dd>The basic Dolmen objects that serve as roots of Dolmen sites</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.app.viewselector">dolmen.app.viewselector</a></dt>
<dd>Allows basic management of alternate views</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.authentication">dolmen.authentication</a></dt>
<dd>Basic components for authentication</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.beaker">dolmen.beaker</a></dt>
<dd>Zope sessions implementation using beaker</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.blob">dolmen.blob</a></dt>
<dd>A layer above zope.file using ZODB blobs as a storage facility. It offers a BlobFile content type and a BlobProperty property for complex schemas.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.builtins">dolmen.builtins</a></dt>
<dd>A set of interfaces that apply to basic Python types, to better integrate them with ZCA</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.content">dolmen.content</a></dt>
<dd>Base classes and utilities to create content types</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.field">dolmen.field</a></dt>
<dd>Additional fields usable in schemas. At this moment there's just GlobalClass</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.file">dolmen.file</a></dt>
<dd>Allows you to manage and store files within the ZODB. It takes the core functionalities of zope.app.file, and simplifies them, using Grok for views and adapters registrations.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.forms.base">dolmen.forms.base</a></dt>
<dd>A package in charge of providing basic functionalities to work with zeam.form Forms.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.forms.crud">dolmen.forms.crud</a></dt>
<dd>A package which helps developers create their C.R.U.D forms using Grok, zeam.form and dolmen.content. It provides a collection of base classes to add, edit, and access content. It innovates by providing adapters to customize the fields of a form.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.menu">dolmen.menu</a></dt>
<dd>Aims to provide the most flexible and explicit way to create and manage menus and their entries with Grok.</dd>
<dt>dolmen.queue</dt>
<dd>A simple layer on top of zc.async to provide queuing of tasks. Not ready?</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.relations">dolmen.relations</a></dt>
<dd>Is a thin layer above zc.relation, allowing a simple and straightforward implementation of standalone relationships between objects.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.storage">dolmen.storage</a></dt>
<dd>Defines a clear high-level API to deal with pluggable storage components.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.thumbnailer">dolmen.thumbnailer</a></dt>
<dd>Is package specialized in Thumbnail generation. Using the dolmen.storage mechanisms, it allows a pluggable and flexible thumbnail storage.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.widget.file">dolmen.widget.file</a></dt>
<dd>A package that walks hand-in-hand with dolmen.file. It provides a useable and pluggable way to render the dolmen.file.FileField in a zeam.form Form.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.widget.image">dolmen.widget.image</a></dt>
<dd>A thin layer above dolmen.widget.file providing a widget suitable to fields implementing IImageField. It adds, thanks to dolmen.thumbnailer a preview of the uploaded image in both input and display mode.</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/dolmen.widget.tinymce">dolmen.widget.tinymce</a></dt>
<dd>A package that provides a useable and pluggable way to render a text field as a WYSIWG editor in a zeam.form Form.</dd>
<dt>dolmen.workflow</dt>
<dd>Nothing here</dd>
<dt>megrok.icon</dt>
<dd>Allows registration of icons and associating them with content types</dd>
<dt>megrok.resourcemerger</dt>
<dd>Allows concatanation and packing of browser resources (css and js)</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/menhir.contenttype.document">menhir.contenttype.document</a></dt>
<dd>An example document content type</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/menhir.contenttype.file">menhir.contenttype.file</a></dt>
<dd>An example file content type</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/menhir.contenttype.folder">menhir.contenttype.folder</a></dt>
<dd>An example folder content type</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/menhir.contenttype.image">menhir.contenttype.image</a></dt>
<dd>An example image content type</dd>
<dt>menhir.contenttype.photoalbum</dt>
<dd>An example photoalbum content type</dd>
<dt>menhir.contenttype.rstdocument</dt>
<dd>An example rstdocument content type</dd>
<dt>menhir.contenttype.user</dt>
<dd>An example user content type</dd>
<dt>menhir.library.tablesorter</dt>
<dd>Registers a jquery based library for HTML tables sorting</dd>
<dt>menhir.simple.comments</dt>
<dd>Simple commenting system with avatar integration</dd>
<dt>menhir.simple.livesearch</dt>
<dd>A viewlet that provides a livesearch box</dd>
<dt>menhir.simple.navtree</dt>
<dd>A viewlet providing a navigation tree</dd>
<dt>menhir.simple.tag</dt>
<dd>A tagging engine based on the lovely.tag</dd>
<dt>menhir.skin.lightblue</dt>
<dd>A complete skin for a Dolmen site.</dd>
<dt>menhir.skin.snappy</dt>
<dd>A skin for Snappy sites</dd>
<dt>snappy.site</dt>
<dd>The Snappy, a video sharing sample site</dd>
<dt>snappy.transform</dt>
<dd>Mimetype transform utilities. Not finished?</dd>
<dt>snappy.video.flasher</dt>
<dd>Utilities to mark files as Flash and allow to view them.</dd>
<dt>snappy.video.player</dt>
<dd>A video player for flash movies</dd>
<dt>snappy.video.transforms</dt>
<dd>Convert video files to flash movies and thumbnails</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/zeam.form.base">zeam.form.base</a></dt>
<dd>A form library designed to be grokish and simple</dd>
<dt><a class="reference external" href="http://pypi.python.org/pypi/zeam.form.ztk">zeam.form.ztk</a></dt>
<dd>zope.schema integration for zeam.form. It provides widgets and default CRUD style actions.</dd>
<dt>dolmen-documentation</dt>
<dd>A few tutorials for Dolmen</dd>
<dt>dolmenproject</dt>
<dd>A Paste script extension that allows quick bootstrapping of new Dolmen projects</dd></dl>
<p>To download all the packages, I've ctrl+selected the git repositories names from <a class="external-link" href="http://gitweb.dolmen-project.org/">http://gitweb.dolmen-project.org/</a>, pasted them into a repositories.txt file and ran the following script:</p>
<p>&nbsp;</p>
<pre>import subprocess
import os

f = open('repositories.txt')
for line in f.readlines():
&nbsp;&nbsp;&nbsp; git = line.strip()
&nbsp;&nbsp;&nbsp; pkg = git
&nbsp;&nbsp;&nbsp; if pkg.endswith('.git'):
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pkg = ".".join(pkg.split('.')[:-1])

&nbsp;&nbsp;&nbsp; if os.path.exists(pkg):
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subprocess.check_call(['git', 'pull'], cwd=pkg)
&nbsp;&nbsp;&nbsp; else:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subprocess.check_call(['git', 'clone', 'git://devel.dolmen-project.org/' + git])</pre>
<p>&nbsp;</p>
<dl class="docutils"><dt><br /></dt></dl>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2010-09-19T22:16:36+03:00</atom:published>

      <atom:updated>2010-10-02T15:42:29+03:00</atom:updated>

      
        <atom:category term="Dolmen"/>
      
      
        <atom:category term="zope3"/>
      
      
        <atom:category term="Grok"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Migrating content (folders) from Plone 3 to Plone 4 via zexp import</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2010/08/22/migrating-content-folders-from-plone-3-to-plone-4-via-zexp-import">
        http://plone.org/
      </atom:link>

      <atom:id>dc38e2a0d26193187030ace593530d6c</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I had a need (and a problem) moving some content from a Zope 2.10/ Plone 3.3 instance to a Zope 2.12/Plone 4 instance. The path I have chosen was that of the least resistence, which for me was exporting the folder I was interested as a zexp file from the old instance and importing it in the new Plone instance. According to some members of the #plone IRC channel, this method of getting content from one zope instance to another is not possible, or at least not supported. I supposed that's correct, zexp import works best for moving content between identical zope instances, but, as they say, necessity is the mother of learning.</p>
<p>The issue is that the implementation of folders has changed from Plone 3 to 4 to use  BTrees, which greatly improves performance. The problem is that, when viewing imported folders, I got the following traceback:</p>
<div>
<pre>Traceback (innermost last):

    * Module ZPublisher.Publish, line 116, in publish
    * Module ZPublisher.BaseRequest, line 434, in traverse
    * Module Products.CMFCore.DynamicType, line 150, in __before_publishing_traverse__
    * Module Products.CMFDynamicViewFTI.fti, line 215, in queryMethodID
    * Module Products.CMFDynamicViewFTI.fti, line 182, in defaultView
    * Module Products.CMFPlone.PloneTool, line 840, in browserDefault
    * Module Products.CMFPlone.PloneTool, line 708, in getDefaultPage
    * Module Products.CMFPlone.utils, line 81, in getDefaultPage
    * Module plone.app.layout.navigation.defaultpage, line 32, in getDefaultPage
    * Module plone.app.layout.navigation.defaultpage, line 75, in getDefaultPage
    * Module Products.BTreeFolder2.BTreeFolder2, line 337, in has_key

AttributeError: 'NoneType' object has no attribute 'has_key' 
</pre>
</div>
<p>The solution was to call @@migrate-btrees on the imported folder, which fixes that folder and makes it conform to the latest implementation.</p>
<p>One final note, the default Plone buildout doesn't have a folder called "import" anywhere in the buildout, so one needs to be created inside the "client home folder", which is the folder of your plone and buildout instance, the one that hosts the bin, parts and var folders.</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2010-08-22T14:05:56+03:00</atom:published>

      <atom:updated>2010-08-22T14:06:27+03:00</atom:updated>

      
        <atom:category term="Plone"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Some issues with zc.recipe.egg's python option</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2010/05/12/some-issues-with-zc-recipe-eggs-python-option">
        http://plone.org/
      </atom:link>

      <atom:id>3ff2532093828d303ee1672938f1e597</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I've recently had to integrate a script/package into a Plone 2.5 buildout that runs on top of Python 2.4. Due to that package's dependence of a sane imaplib (and the one in Python 2.4 is buggy), I had to run the script with python2.6. To make a script run on a different python, you need to do:</p>
<pre>[myscript]
recipe = zc.regipe.egg
eggs = 
&nbsp;&nbsp;&nbsp;&nbsp; myegg
&nbsp;&nbsp;&nbsp;&nbsp; IMAPClient
python = python26</pre>
<p>The python26 option is actually the name of a buildout part that configures the python executable path</p>
<pre>[python26]
python = /usr/bin/python26
</pre>
<p>Now the problems. I've had various buildouts fail with a message "Cannot find egg myegg". After a bit of effort, we managed to trace the cause to this problem:</p>
<p>First, the python path in the [python26] part was incorect. Second, even if it pointed to the proper binary, the -devel packages for that python needed to be installed.</p>
<p>Well, now I know. Hopefully I'll remember it for the next time when I'll encounter the problem.</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2010-05-12T11:21:44+03:00</atom:published>

      <atom:updated>2010-05-12T11:21:44+03:00</atom:updated>

      
        <atom:category term="Python"/>
      
      
        <atom:category term="cookbook"/>
      
      
        <atom:category term="buildout"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Can you do this on your shiny Mac?</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2010/02/25/can-you-do-this-on-your-shiny-mac">
        http://plone.org/
      </atom:link>

      <atom:id>fcecea85d6a0747f6f6e64a38f4ddef4</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>Probably you can, but you have never done it because you have a shiny interface for everything. I'm talking about this discovery of mine:</p>
<pre>svn diff | kompare -</pre>
<p>What it does is to take the output from svn diff and pipe it into Kompare, a merge/diff utility from the KDE Project. I can do this from the command line, straight from the directory that I'm in, and bang! I get a nice graphical overview, complete with the tree structure that I can navigate to see what I'm about to commit. Honestly, this little command gets me excited everytime I run it.</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2010-02-25T12:04:41+02:00</atom:published>

      <atom:updated>2010-02-25T13:13:47+02:00</atom:updated>

      
        <atom:category term="rants"/>
      
      
        <atom:category term="cookbook"/>
      
      
        <atom:category term="colaborative"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Generating products outside of the Products.* namespace with ArchGenXML</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2010/02/24/generating-products-outside-of-the-products-namespace-with-archgenxml">
        http://plone.org/
      </atom:link>

      <atom:id>92eafaa69f2003437122a83601463aab</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I'm a die hard in regards to ArchGenXML usage. The number of things to know about when creating new content types for Plone is just too high. Package structure, Zope package registration, content types registration, QuickInstaller registration, GenericSetup profiles, skins registration, workflows, etc. I can go in and do changes to the code, and add to it, but generating it from scratch is a gigantic task, especially for my use case, where I need to start a new project with about 7 content types.</p>
<p>Now to the problem: ArchGenXML assumes (and hardcodes in its templates) the Products.* prefix for your package. I don't have any problems with it, but my employer uses a different package structure so for uniformity I need to follow their standards. 15 minutes of poking and changing through agx enabled me to change it so it would generate GS xml files with the proper namespace (based on a new model level TGV named "namespace" that I have created). After assessing the difficulty of the task and being under time pressure, I've decided to go the dumb route, which I'm documenting below:</p>
<p>My generation script is something like this:</p>
<pre>./archgenxml -c archgenxml.cfg myproduct.zuml 

#rename Products.myproduct to ns.myproduct
find myproduct/* -type f -print | xargs sed -i 's/Products\.myproduct/ns\.myproduct/g'

#in the xml type profiles, replace myproduct by ns.myproduct
find myproduct/* -type f -print | xargs sed -i 's/&gt;myproduct&lt;/&gt;ns\.myproduct&lt;/g'

#in the profiles.zcml, rename the profile to ns.myproduct
find myproduct/* -type f -print | xargs sed -i 's/title=\"myproduct\"/title=\"ns\.myproduct\"/g'</pre>
<p>Notice the sed lines, which change the source code to point to "ns.myproduct" instead of "Products.myproduct". Now there's just two more problems, which are actually AGX bugs:</p>
<ul><li>the FilesystemDirectoryViews registered for the skin are incorect, so you'll need to insert this in ns/myproduct/__init__.py</li></ul>
<pre>from Products.CMFCore import utils
from Globals import package_home
from os.path import dirname
ppath = utils.ProductsPath
utils.ProductsPath.append(dirname(package_home(product_globals)))
DirectoryView.registerDirectory('skins', product_globals)
utils.ProductsPath = ppath</pre>
<ul><li>trying to get AGX to output the code inside a two level deep folder doesn't work (it crashes), so you'll need to move this script file and the model just above the "myproduct" folder, inside the "ns" namespace.</li></ul>
<p>That's about it. Hopefully I'll find the time to fix the two bugs and add the namespace improvement in the next week. Still need to do the review for Plone for Education, which I have received for free from the publisher.</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2010-02-24T17:54:52+02:00</atom:published>

      <atom:updated>2010-02-24T22:38:11+02:00</atom:updated>

      
        <atom:category term="cookbook"/>
      
      
        <atom:category term="Plone"/>
      
      
        <atom:category term="ArchGenXML"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Another cause for buildout failures: system distributed Python</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2010/01/28/another-cause-for-buildout-failures-system-distributed-python">
        http://plone.org/
      </atom:link>

      <atom:id>cdc8b31e8905e5a5ae5af8d81a21028e</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I've had a buildout bootstrap process failure, this time a weird one, perhaps I should document the bug and report it.</p>
<p>The latest Ubuntu version which I have installed (Lucid Lynx) comes with a package called python-pkg-resources, which packages <a class="external-link" href="http://www.python.org/dev/peps/pep-0365/">pkg_resources</a>, which used to be available only through the setuptools distribution. Buildout's bootstrap.py  tries to guess if Setuptools or Distribute are installed by checking the availability of pkg_resources; by guessing wrong it all comes to a crash at the end.</p>
<p>I'm not very interested in debugging these types of problems anymore. Distribution/packaging tools should just work. I want to focus on my work, not debug the toolchain. No more corner cases or whatver. So I'm gonna compile separate Pythons in the future, especially when dealing with older Zope/Plones.</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2010-01-28T21:29:31+02:00</atom:published>

      <atom:updated>2010-02-05T11:56:06+02:00</atom:updated>

      
        <atom:category term="python"/>
      
      
        <atom:category term="rants"/>
      
      
        <atom:category term="buildout"/>
      

    </atom:entry>

  
  

    <atom:entry>

      <atom:title>Dear PyPi uploaders: don't use a download URL, upload your package instead!</atom:title>

      <atom:link rel="alternate" type="text/html"
                 href="http://play.pixelblaster.ro/blog/archive/2010/01/28/dear-pypi-uploaders-dont-use-a-download-url-upload-your-package-instead">
        http://plone.org/
      </atom:link>

      <atom:id>15c2ec144213a78525b3b5618dacdef6</atom:id>
      <!-- Summary is missing here (entry/Description) -->
      <!-- This body below should really be xhtml instead of
      semi-encoded possibly unescaped strange stuff -->
      <atom:content type="html"
                    xml:base="http://play.pixelblaster.ro"
                    xml:lang="en-US" xml:space="preserve"><![CDATA[
<p>I think this is the Python Index biggest mistake, the one which makes it unreliable for serious development environments: exposing package entries with no real package files and just a download URL. To see what I'm talking about, just examine the PyPI records for <a class="external-link" href="http://pypi.python.org/pypi/BeautifulSoup">BeautifulSoup</a>
 or <a class="external-link" href="http://pypi.python.org/pypi/ipython/">IPython</a>,
 packages that are very common in buildouts. As soon as the author and publisher of that package has a hosting problem, the developer that uses that package also has a problem. Buildouts will completely fail and this will cause dead times and frustration for the developers.</p>
<p>Yes, there are a couple of PyPi mirrors, but they only mirror files hosted by PyPi. The central PyPi site will probably have better performance and availability then what individual groups and developers can provide and it's always easier to mirror one single website than many, so there's no shame or loss of pride in using the PyPi to host your files. Please do so!</p>
<p>&nbsp;</p>
]]></atom:content>

      <atom:author>
        <atom:name>tibi &lt;nomail@nodomain.net&gt;</atom:name>
      </atom:author>

      <atom:published>2010-01-28T20:57:23+02:00</atom:published>

      <atom:updated>2010-02-05T11:56:09+02:00</atom:updated>

      
        <atom:category term="Python"/>
      
      
        <atom:category term="development"/>
      
      
        <atom:category term="buildout"/>
      
      
        <atom:category term="rants"/>
      

    </atom:entry>

  

</atom:feed>

