recent developments with zopeskel

51
Recent Developments With ZopeSkel Chris Calloway University of North Carolina Department of Marine Sciences October 29, 2009 1

Upload: cbcunc

Post on 12-May-2015

1.311 views

Category:

Technology


0 download

DESCRIPTION

Plone Conference 2009, Budapest

TRANSCRIPT

Page 1: Recent Developments With ZopeSkel

Recent Developments With ZopeSkel

Chris CallowayUniversity of North CarolinaDepartment of Marine SciencesOctober 29, 2009

1

Page 2: Recent Developments With ZopeSkel

Report Out

2

Page 3: Recent Developments With ZopeSkel

October 2-5, 2009 in Chapel Hill, North Carolina

3

Page 4: Recent Developments With ZopeSkel

TriZPUG

4

Page 5: Recent Developments With ZopeSkel

Josh Johnson (jjmojojjmojo)

5

Page 6: Recent Developments With ZopeSkel

ZopeSkel Archetypes How-Tohttp://lionfacelemonface.wordpress.com/

6

Page 7: Recent Developments With ZopeSkel

DC Plone Conference 2008 ZopeSkel Sprint

7

Page 8: Recent Developments With ZopeSkel

DC Plone Conference 2008 ZopeSkel Sprint

•jjmojojjmojo•claytron•markvl•jraco•esartor•evilbungle•edo102•mbiggers•mond21•pareto

8

Page 9: Recent Developments With ZopeSkel

DC Plone Conference 2008 ZopeSkel Sprint

9

Page 10: Recent Developments With ZopeSkel

ZopeSkel IRC Channel

#zopeskel on freenode.net

10

Page 11: Recent Developments With ZopeSkel

Plone Symposium East ZopeSkel Presentation

11

Page 12: Recent Developments With ZopeSkel

Plone Bootcampshttp://plonebootcamps.com

12

Page 13: Recent Developments With ZopeSkel

Joel Burton

13

Page 14: Recent Developments With ZopeSkel

Project Sitehttp://www.coactivate.org/projects/zopeskel-bbq-sprint/

14

Page 15: Recent Developments With ZopeSkel

Cris Ewing

15

Page 16: Recent Developments With ZopeSkel

Chris Rossi

16

Page 17: Recent Developments With ZopeSkel

Sponsors

Nate Aune Justin Bennett Matthew Bowen Joel Burton Chris Calloway Alex and Amy Clark Stephen Compall Jan-Jaap Driessen Don Fick Robert Gimlich David Glick Calvin Hendryx-Parker

Karl Johan Kleist Stephen McMahon Andrzej Mleczko Clayton Parker Fabian Reinhard Michael Revoir Francis Ridder Don Ross Jon Stahl Dorneles Treméa Aaron VanDerlip Ken Wasetis

17

Page 18: Recent Developments With ZopeSkel

Our Motivation: Users

•Thousands of people use ZopeSkel

•Use for buildouts, themes, content types, products

•Continually answer template questions incorrectly

•ZopeSkel made by developers for developers

•Themers and integrators are the actual users

•Recognize this

•Separate common usage from developer usage

•Simplify the use of ZopeSkel

18

Page 19: Recent Developments With ZopeSkel

Our Goals

•Better questions in templates

•Templates with verbose help

•Repeatable personals preferences

•Context sensitive questions

•Fewer questions

•Remove diagnostics from standard output

•Documentation on good template writing

•Refactor tests

•Wrap and rename

19

Page 20: Recent Developments With ZopeSkel

Wrap and Rename

20

Page 21: Recent Developments With ZopeSkel

Our Design

•Verbose description var in templates

•onchange hook called on var change

•$HOME/.zopeskel

•easy attribute on questions

•pre( ) template warning

•post( ) template instructions

•promote consistency in template

21

Page 22: Recent Developments With ZopeSkel

Day One Accomplishment

22

Page 23: Recent Developments With ZopeSkel

Button Is Dead; Long Live Button

bin/zopeskel

23

Page 24: Recent Developments With ZopeSkel

bin/zopeskel

$ bin/zopeskel

Usage:

zopeskel <template> <output-name> [var1=value] ... [varN=value]

zopeskel --help Full help

zopeskel --list List template verbosely, with details

zopeskel --make-config-file Output .zopeskel prefs file

Plone Development

| archetype: A Plone project that uses Archetypes content types

| kss_plugin: A project for a KSS plugin

| plone: A project for Plone products

| plone2_theme: A theme for Plone 2.1

| plone3_portlet: A Plone 3 portlet

24

Page 25: Recent Developments With ZopeSkel

bin/zopeskel --help

$ bin/zopeskel --help

This script allows you to create basic skeletons for plone and zope

products and buildouts based on best-practice templates.

It is a wrapper around PasteScript ("paster"), providing an easier

syntax for invoking and better help.

Invoking this script

--------------------

Basic usage::

zopeskel <template>

(To get a list of the templates, run the script without any arguments;

25

Page 26: Recent Developments With ZopeSkel

bin/zopeskel --list

$ bin/zopeskel --list

Plone Development

-----------------

archetype: A Plone project that uses Archetypes content types

This creates a Plone project that uses Archetypes content types. It

has local commands that will allow you to add content types and to

add fields to your new content types.

kss_plugin: A project for a KSS plugin

This creates a project for a KSS plugins ('Kinetic Style Sheets', a

Plone 3 framwork for JavaScript/AJAX).

plone: A project for Plone products

26

Page 27: Recent Developments With ZopeSkel

Pre-run Template Help

$ bin/zopeskel plone3_buildout

plone3_buildout: A buildout for Plone 3 installation­

This template creates a Plone 3 buildout (for most users, a preferredway to get an installation of Plone 3 is to use the appropriate installer,as these are all buildout-based since Plone 3.1)

If at any point, you need additional help for a question, you can enter'?' and press RETURN.

Enter project name:

27

Page 28: Recent Developments With ZopeSkel

Template question help

Enter project name: ?

****************************************************************************   *** NOTE: You probably don't want to use this template!

**  Since Plone 3.1, the preferred way to get a buildout-based setup**  for Plone is to use the standard installer for your operating**  system (the Windows installer, the Mac installer, or the Unified**  Installer for Linux/Unix/BSD). These give you a best-practice,**  widely-used setup with an isolated Python and a well-documented**  buildout. This template is here for older versions of Plone and**  for experts who explicitly want a raw, non-installer-based**  installation.

**  (This message is particularly aimed at people following out-of-**  date books/documentation that suggest this is the right way to get**  a Plone-based buildout. This is no longer the case.)**************************************************************************

Enter project name:

28

Page 29: Recent Developments With ZopeSkel

Template question help

Expert Mode? (What question mode would you like? (easy/expert/all)?) ['easy']: ?

|  In easy mode, you will be asked fewer, more common questions.

|  In expert mode, you will be asked to answer more advanced,|  technical questions.

|  In all modes, no questions will be skipped--even things like|  author_email, which would normally be a default set in a|  $HOME/.zopeskel file.

Expert Mode? (What question mode would you like? (easy/expert/all)?) ['easy']:

29

Page 30: Recent Developments With ZopeSkel

Nested Package Names: Expert Mode

This template expects a project name with 2 dots in it (a 'nestednamespace', like 'foo.bar.baz').

Enter project name: plone.app.example

If at any point, you need additional help for a question, you can enter'?' and press RETURN.

Expert Mode? (What question mode would you like? (easy/expert/all)?) ['easy']: expertNamespace Package Name (Name of outer namespace package) ['plone']:Namespace 2 Package Name (Name of inner namespace package) ['app']:Package Name (Name of the inner namespace package) ['example']:Version (Version number for project) ['1.0']:

30

Page 31: Recent Developments With ZopeSkel

Nested Package Names: Easy Mode

This template expects a project name with 2 dots in it (a 'nestednamespace', like 'foo.bar.baz').

Enter project name: plone.app.example

If at any point, you need additional help for a question, you can enter'?' and press RETURN.

Expert Mode? (What question mode would you like? (easy/expert/all)?) ['easy']:Version (Version number for project) ['1.0']:

31

Page 32: Recent Developments With ZopeSkel

ndot Attribute

This template expects a project name with 2 dots in it (a 'nestednamespace', like 'foo.bar.baz').

Enter project name: plone.app

ERROR: Project name expected 2 dots, supplied 'plone.app' has 1 dots

This template expects a project name with 2 dots in it (a 'nestednamespace', like 'foo.bar.baz').

Enter project name:

32

Page 33: Recent Developments With ZopeSkel

Post-run Template Help

$ bin/zopeskel plone3_buildout sexy

plone3_buildout: A buildout for Plone 3 installation

This template creates a Plone 3 buildout (for most users, a preferred[...snip...]Verbose Security? (Should verbose security be "on" or "off"?) ['off']:

****************************************************************************   Generation finished.

**  You probably want to run python bootstrap.py and then edit**  buildout.cfg before running bin/buildout -v".

**  See README.txt for details.**************************************************************************

$

33

Page 34: Recent Developments With ZopeSkel

zopeskel.doctools.graph: ZopeSkel 2.13

34

Page 35: Recent Developments With ZopeSkel

zopeskel.doctools.graph: ZopeSkel 2.14dev

35

Page 36: Recent Developments With ZopeSkel

Command Line Answers

$ bin/zopeskel plone3_buildout sexy expert_mode=expert plone_version=3.3.1 zope2_install='' plone_products_install='' zope_user=admin zope_password=admin http_port=8080 debug_mode=on verbose_security=on

plone3_buildout: A buildout for Plone 3 installation

[..snip...]

Creating directory ./sexy

36

Page 37: Recent Developments With ZopeSkel

bin/zopeskel --make-config-file

# This file can contain preferences for zopeskel. # To do so, uncomment the lines that look like: # variable_name = Default Value

[DEFAULT]

[archetype]

# Expert Mode? (What question mode would you like? (easy/expert/all)?) # expert_mode = easy

# Project Title (Title of the project) # title = Example Name

# Namespace Package Name (Name of outer namespace package) # namespace_package = plone

37

Page 38: Recent Developments With ZopeSkel

bin/zopeskel --make-config-file > ~/.zopeskel

# This file can contain preferences for zopeskel. # To do so, uncomment the lines that look like: # variable_name = Default Value

[DEFAULT] expert_mode = expert

[archetype]

# Expert Mode? (What question mode would you like? (easy/expert/all)?) # expert_mode = easy

# Project Title (Title of the project) # title = Example Name

# Namespace Package Name (Name of outer namespace package) # namespace_package = plone

38

Page 39: Recent Developments With ZopeSkel

zopeskel.doctools.html_doc

Plone Development

archetype

A Plone project that uses Archetypes content types

This creates a Plone project that uses Archetypes content types. It has local commands that will allow you to add content types and to add fields to your new content types.

Fields:

• Expert Mode? (What question mode would you like? (easy/expert/all)?) • Project Title (Title of the project) • Namespace Package Name (Name of outer namespace package) • Package Name (Name of the inner namespace package) • Version (Version number for project) • Description (One-line description of the project) • Long Description (Multi-line description (in ReST)) • Author (Name of author for project) • Author Email (Email of author for project) • Keywords (List of keywords, space-separated) • Project URL (URL of the homepage for this project) • Project License (Name of license for the project) • Zip-Safe? (Can this project be used as a zipped egg? (true/false)) • Zope2 Product? (Are you created a Zope2 product?)

Local Commands:

• i18nlocale (An i18n locale directory structure) Local Command Fields:

◦ language_code (The iso-code of the language) • contenttype (A content type skeleton) Local Command Fields:

◦ contenttype_name (Content type name ) ◦ contenttype_description (Content type description ) ◦ folderish (True/False: Content type is Folderish )

39

Page 40: Recent Developments With ZopeSkel

zopeskel.webgui

40

Page 41: Recent Developments With ZopeSkel

zopeskel.webgui

41

Page 42: Recent Developments With ZopeSkel

zopeskel.webgui

42

Page 43: Recent Developments With ZopeSkel

zopeskel.webgui

43

Page 44: Recent Developments With ZopeSkel

zopeskel.webgui

44

Page 45: Recent Developments With ZopeSkel

zopeskel.webgui

45

Page 46: Recent Developments With ZopeSkel

zopeskel.webgui

46

Page 47: Recent Developments With ZopeSkel

http://pasteweb.joelburton.com/

47

Page 48: Recent Developments With ZopeSkel

Other Details

•title attribute

•All tests now run

•More tests

48

Page 49: Recent Developments With ZopeSkel

Road Ahead

•2.14 release

•Refactor templates into subpackages:

✴zopeskel.base

✴zopeskel.zope

✴zopeskel.plone

✴zopeskel.silva

•Move out of Collective?

•Release manager

49

Page 50: Recent Developments With ZopeSkel

ZopeSkel Email Listhttp://lists.plone.org/mailman/listinfo/zopeskel

50

Page 51: Recent Developments With ZopeSkel

Thanks

nouri hannosch optilude davconvent wichert fschulze mustap MatthewWilkes tarek

51