ZopeSkel provides a collection of skeletons for quickstarting Zope and Plone projects. These skeletons are available as PasteScript templates and can be used via the “paster” command line tool. This how-to describes how-to create a plone egg with an archetype content type in a fiew command lines.

1. Install ZopeSkel

$ easy_install -U ZopeSkel

2. Create the archetype Plone egg

$ paster create --list-template
Available templates:
[...]
      archetype: A Plone project that uses Archetypes
[...]

$ paster create -t archetype
[...]
Enter project name: myproject.contenttypes
[...]
  1. Create the content-type
$ cd myproject.contenttypes
$ paster addcontent --list
Available templates:
[...]
       contenttype:  A content type skeleton
[...]
$ paster addcontent contenttype
[...]
Enter contenttype_name (Content type name ) ['Example Type']: MyContentType
[...]
  1. Add an archetype field to the new content-type
$ paster addcontent --list
Available templates:
[...]
    atschema: A handy AT schema builder
[...]
$ paster addcontent atschema
[...]
Enter content_class_filename (What is the module (file)name of your content class?) 
['exampletype']: mycontenttype
Enter field_name (What would you like to name this field?) ['newfield']: myfield
Enter field_type (What kind of field should I make for you?
Some examples: [computed,cmfobject,reference,text,image,float,lines,datetime,boolean,
file,integer,fixedpoint,string]) ['string']:
Enter widget_type (What kind of widget do you want to use 
(example: Password)?) ['default']:
[...]

5. Links

6. Thanks

Thank you to Jean-Michel François aka toutpt who introduced me to this very handy tool, and of course to the authors of PasteScript and ZopeSkel!