Re: [Zope-dev] Re: weak examples, weak exploits

2003-06-24 Thread PieterB
 Evan Simpson wrote:
  Casey Duncan wrote:
  
  I would be in favor of making the Examples opt-in like the Zope 
  tutorial. It seems silly to have it in evey ZODB by default. Make 
  people add it if they want it.
 This seems like a fine idea, but what action would the user take to 
 install examples and extras?
I think the best way would be using a python script/Makefile that
installs a .zexp file (or use http-upload with httplib). Configure
should grow a --install-tutorial option.

Pieter

--
http://zwiki.org/PieterB

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: weak examples, weak exploits

2003-06-24 Thread Shane Hathaway
PieterB wrote:
Evan Simpson wrote:

Casey Duncan wrote:


I would be in favor of making the Examples opt-in like the Zope 
tutorial. It seems silly to have it in evey ZODB by default. Make 
people add it if they want it.
This seems like a fine idea, but what action would the user take to 
install examples and extras?
I think the best way would be using a python script/Makefile that
installs a .zexp file (or use http-upload with httplib). Configure
should grow a --install-tutorial option.
Mmmm... I need to clarify my question.  Let's say you make and install 
Zope.  You fire it up and don't know what to do next.  You look for some 
button or control in the UI for displaying documentation and examples. 
What do you find?  An entry in the add list?  Will you still find the 
help link, but clicking it only tells you how to install the 
documentation?  Zope needs to help the user find the docs.

Shane

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: weak examples, weak exploits

2003-06-24 Thread Chris McDonough
On Tue, 2003-06-24 at 10:09, Shane Hathaway wrote:
 PieterB wrote:
 Evan Simpson wrote:
 
 Casey Duncan wrote:
 
 
 I would be in favor of making the Examples opt-in like the Zope 
 tutorial. It seems silly to have it in evey ZODB by default. Make 
 people add it if they want it.
 
 This seems like a fine idea, but what action would the user take to 
 install examples and extras?
  
  I think the best way would be using a python script/Makefile that
  installs a .zexp file (or use http-upload with httplib). Configure
  should grow a --install-tutorial option.
  
 
 Mmmm... I need to clarify my question.  Let's say you make and install 
 Zope.  You fire it up and don't know what to do next.  You look for some 
 button or control in the UI for displaying documentation and examples. 
 What do you find?  An entry in the add list?  Will you still find the 
 help link, but clicking it only tells you how to install the 
 documentation?  Zope needs to help the user find the docs.

Jamie Heilman came up with a reasonable way to do this.  The Zope Quick
Start page instructs the user to import the examples and gives him a
link which does so by calling manage_import.

I've merged this into the HEAD and the 2.6 branch.

- C



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: weak examples, weak exploits

2003-06-24 Thread Evan Simpson
Shane Hathaway wrote:
This seems like a fine idea, but what action would the user take to 
install examples and extras?
In my initial implementation, there was a separate page that listed the 
names and descriptions of the various examples, with links to install 
them.  If I recall correctly, this page was reached from a link on 
Folder views, much like the current Help link.  Also linking from the 
Quick Start sounds like a fine idea.

Cheers,

Evan @ 4-am

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Re: weak examples, weak exploits

2003-06-23 Thread Evan Simpson
Casey Duncan wrote:
I would be in favor of making the Examples opt-in like the Zope tutorial. It 
seems silly to have it in evey ZODB by default. Make people add it if they 
want it.
Many, many moons ago I created evan-examples-branch, which allows 
individual Products to offer sample code without (magically or 
otherwise) forcing them upon the user.  I'd love to see it revived, 
perhaps as Examples/Optional Extras in order to cover the Hurt system 
as well.

The basic idea is to look for an XML manifest file 'examples/index.xml' 
in each Product.  It probably wouldn't be very hard to use ZConfig 
instead of XML.  Here is the PageTemplates index.xml:

example name=Assorted Examples
  description
This is a set of examples of the use of page templates.
It includes examples of batching, macros, and trees.
  /description
  payload
import file=zpt_examples.zexp/
  /payload
  view url=zpt_examples/
/example
!-- This file can contain any number of examples.

Each one consists of an example with a 'name' attribute,
containing exactly one description.  The name and description
are displayed in the Examples page.  description can have a
'format' attribute set to 'plain' (the default), 'stx' (structured
text), or 'html'.
An example can contain payload elements.  Each payload can
contain any number of import, execute, and call elements.
These are processed in order when an example is selected from the
Examples page.  import must have a 'file' attribute that names
a file in the 'examples' directory to be imported.  execute must
have a 'file' attribute that names a file to be run with execfile.
call must have a 'path' attribute that gives the path to a Zope
object to be called.
An example can contain at most one view element.  The 'url'
attribute of a view is the URL to view after all payload elements have
been processed. This URL can be relative to the current folder.
--

Cheers,

Evan @ 4-am

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )