From: Rok G. <svn...@pl...> - 2008-11-09 02:45:55
|
Author: garbas Date: Sun Nov 9 02:45:48 2008 New Revision: 75328 Added: collective.sphinx.plonedocs/trunk/README.txt collective.sphinx.plonedocs/trunk/bootstrap.py collective.sphinx.plonedocs/trunk/buildout.cfg collective.sphinx.plonedocs/trunk/collective/ collective.sphinx.plonedocs/trunk/collective/__init__.py collective.sphinx.plonedocs/trunk/collective/__init__.pyc (contents, props changed) collective.sphinx.plonedocs/trunk/collective/sphinx/ collective.sphinx.plonedocs/trunk/collective/sphinx/__init__.py collective.sphinx.plonedocs/trunk/collective/sphinx/__init__.pyc (contents, props changed) collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/ collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/__init__.py collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/configure.zcml collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/tests.py collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/version.txt collective.sphinx.plonedocs/trunk/docs/ collective.sphinx.plonedocs/trunk/docs/source/ collective.sphinx.plonedocs/trunk/docs/source/archetypes.txt collective.sphinx.plonedocs/trunk/docs/source/changes.txt collective.sphinx.plonedocs/trunk/docs/source/content-rules.txt collective.sphinx.plonedocs/trunk/docs/source/content-types.txt collective.sphinx.plonedocs/trunk/docs/source/glossary.txt collective.sphinx.plonedocs/trunk/docs/source/index.txt collective.sphinx.plonedocs/trunk/docs/source/static/ collective.sphinx.plonedocs/trunk/docs/source/templates/ collective.sphinx.plonedocs/trunk/setup.cfg collective.sphinx.plonedocs/trunk/setup.py Log: importing code Added: collective.sphinx.plonedocs/trunk/README.txt ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/README.txt Sun Nov 9 02:45:48 2008 @@ -0,0 +1,4 @@ +Introduction +============ + + Added: collective.sphinx.plonedocs/trunk/bootstrap.py ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/bootstrap.py Sun Nov 9 02:45:48 2008 @@ -0,0 +1,55 @@ +############################################################################## +# +# Copyright (c) 2006 Zope Corporation and Contributors. +# All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. +# +############################################################################## +"""Bootstrap a buildout-based project + +Simply run this script in a directory containing a buildout.cfg. +The script accepts buildout command-line options, so you can +use the -c option to specify an alternate configuration file. + +$Id$ +""" + +import os, shutil, sys, tempfile, urllib2 + +tmpeggs = tempfile.mkdtemp() + +try: + import pkg_resources +except ImportError: + ez = {} + exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' + ).read() in ez + ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) + + import pkg_resources + +cmd = 'from setuptools.command.easy_install import main; main()' +if sys.platform == 'win32': + cmd = '"%s"' % cmd # work around spawn lamosity on windows + +ws = pkg_resources.working_set +assert os.spawnle( + os.P_WAIT, sys.executable, sys.executable, + '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout', + dict(os.environ, + PYTHONPATH= + ws.find(pkg_resources.Requirement.parse('setuptools')).location + ), + ) == 0 + +ws.add_entry(tmpeggs) +ws.require('zc.buildout') +import zc.buildout.buildout +zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap']) +shutil.rmtree(tmpeggs) Added: collective.sphinx.plonedocs/trunk/buildout.cfg ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/buildout.cfg Sun Nov 9 02:45:48 2008 @@ -0,0 +1,33 @@ +[buildout] +develop = + /home/rok/Projects/collective.recipe.sphinxbuilder + /home/rok/Projects/collective.sphinx.autoatschema + . +parts = + zope2 + plonedocs +extends = http://dist.plone.org/release/3.2a1/versions.cfg +versions = versions + +[zope2] +recipe = plone.recipe.zope2install +url = http://www.zope.org/Products/Zope/2.10.6/Zope-2.10.6-final.tgz +fake-zope-eggs = true +additional-fake-eggs = + ZConfig + pytz + +[plonedocs] +recipe = collective.recipe.sphinxbuilder +extra_paths = ${zope2:location}/lib/python +eggs = + collective.sphinx.plonedocs + collective.sphinx.autoatschema + Plone +extensions = + 'sphinx.ext.doctest', + 'collective.sphinx.autoatschema' +version = 3.2 +release = 3.2a1 +project = Plone + Added: collective.sphinx.plonedocs/trunk/collective/__init__.py ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/collective/__init__.py Sun Nov 9 02:45:48 2008 @@ -0,0 +1,6 @@ +# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages +try: + __import__('pkg_resources').declare_namespace(__name__) +except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) Added: collective.sphinx.plonedocs/trunk/collective/__init__.pyc ============================================================================== Binary file. No diff available. Added: collective.sphinx.plonedocs/trunk/collective/sphinx/__init__.py ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/collective/sphinx/__init__.py Sun Nov 9 02:45:48 2008 @@ -0,0 +1,6 @@ +# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages +try: + __import__('pkg_resources').declare_namespace(__name__) +except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) Added: collective.sphinx.plonedocs/trunk/collective/sphinx/__init__.pyc ============================================================================== Binary file. No diff available. Added: collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/__init__.py ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/__init__.py Sun Nov 9 02:45:48 2008 @@ -0,0 +1 @@ + Added: collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/configure.zcml ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/configure.zcml Sun Nov 9 02:45:48 2008 @@ -0,0 +1,7 @@ +<configure + xmlns="http://namespaces.zope.org/zope" + xmlns:five="http://namespaces.zope.org/five" + i18n_domain="collective.sphinx.plonedocs"> + + +</configure> Added: collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/tests.py ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/tests.py Sun Nov 9 02:45:48 2008 @@ -0,0 +1,54 @@ +import unittest + +from zope.testing import doctestunit +from zope.component import testing +from Testing import ZopeTestCase as ztc + +from Products.Five import zcml +from Products.Five import fiveconfigure +from Products.PloneTestCase import PloneTestCase as ptc +from Products.PloneTestCase.layer import PloneSite +ptc.setupPloneSite() + +import collective.sphinx.plonedocs + +class TestCase(ptc.PloneTestCase): + class layer(PloneSite): + @classmethod + def setUp(cls): + fiveconfigure.debug_mode = True + zcml.load_config('configure.zcml', + collective.sphinx.plonedocs) + fiveconfigure.debug_mode = False + + @classmethod + def tearDown(cls): + pass + + +def test_suite(): + return unittest.TestSuite([ + + # Unit tests + #doctestunit.DocFileSuite( + # 'README.txt', package='collective.sphinx.plonedocs', + # setUp=testing.setUp, tearDown=testing.tearDown), + + #doctestunit.DocTestSuite( + # module='collective.sphinx.plonedocs.mymodule', + # setUp=testing.setUp, tearDown=testing.tearDown), + + + # Integration tests that use PloneTestCase + #ztc.ZopeDocFileSuite( + # 'README.txt', package='collective.sphinx.plonedocs', + # test_class=TestCase), + + #ztc.FunctionalDocFileSuite( + # 'browser.txt', package='collective.sphinx.plonedocs', + # test_class=TestCase), + + ]) + +if __name__ == '__main__': + unittest.main(defaultTest='test_suite') Added: collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/version.txt ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/collective/sphinx/plonedocs/version.txt Sun Nov 9 02:45:48 2008 @@ -0,0 +1 @@ +0.1 \ No newline at end of file Added: collective.sphinx.plonedocs/trunk/docs/source/archetypes.txt ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/docs/source/archetypes.txt Sun Nov 9 02:45:48 2008 @@ -0,0 +1,6 @@ +========== +Archetypes +========== + + + Added: collective.sphinx.plonedocs/trunk/docs/source/changes.txt ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/docs/source/changes.txt Sun Nov 9 02:45:48 2008 @@ -0,0 +1,16 @@ +=============== +What's Changed? +=============== + + +3.2 Release +============= + + * This and that ... + +3.2a1 Release +============= + + * Plone produtcs eggified + + Added: collective.sphinx.plonedocs/trunk/docs/source/content-rules.txt ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/docs/source/content-rules.txt Sun Nov 9 02:45:48 2008 @@ -0,0 +1,58 @@ +Content Rules -- :mod:`plone.contentrules` +========================================== + +.. module:: plone.contentrules + :synopsis: Content Rules Engine + +.. moduleauthor:: wayworn +.. moduleauthor:: optilude +.. moduleauthor:: wichert +.. moduleauthor:: hannosch + + +.. note:: all doctests here were taken from README.txt, DERECTIVES.txt and zcml.txt + +.. doctest:: +============================= + Plone ContentRules Engine +============================= + +plone.contentrules is a pure Zope 3 implementation of a content rules engine. +Content rules are managed by the user, and may be likened to email filter +rules or Apple's Automator. A user creates a Rule, and composes a sequence +of rule elements, specifically Conditions and Actions. Rules are assigned to +a context via a Rule Assignment Manager. + +An event handler in the application layer (such as the complementary +plone.app.contentrules package) will query a Rule Manager for all applicable +rules for this event, in this context, and execute them. + +The architecture is pluggable - it is easy to provide new rule elements, which +can be registered via the <plone:ruleAction /> and <plone:ruleCondition /> +ZCML directives (or manually as utilities providing IRuleElement). + +Note that this package does not contain any UI for actual real-world rule +elements. plone.app.contentrules provides Zope 2 acrobatics and Plone-specific +elements and UI. + +Defining new rule elements +-------------------------- + +Rules are composed of rule elements - actions and conditions. These will be +executed one by one when a rule is invoked. + +First, we create some rule elements. + +Lets start with some basic imports: + + >>> from zope.interface import Interface, implements + >>> from zope.component import adapts + >>> from zope.component import getUtility, getAllUtilitiesRegisteredFor + >>> from zope import schema + + >>> from zope.component import provideUtility + >>> from zope.component import provideAdapter + + >>> from plone.contentrules.rule.interfaces import IRuleCondition, IRuleAction + >>> from plone.contentrules.rule.interfaces import IRuleElementData + >>> from plone.contentrules.rule.element import RuleCondition, RuleAction Added: collective.sphinx.plonedocs/trunk/docs/source/content-types.txt ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/docs/source/content-types.txt Sun Nov 9 02:45:48 2008 @@ -0,0 +1,45 @@ +============= +Content Types +============= + +Plone's content types are builduppon Archetypes. You can find them in +Products.ATContentTypes package + +Document +======== +.. autoatschema:: Products.ATContentTypes.content.document.ATDocumentSchema + +News Item +========= +.. autoatschema:: Products.ATContentTypes.content.newsitem.ATNewsItemSchema + + +Event +===== +.. autoatschema:: Products.ATContentTypes.content.event.ATEventSchema + +Collection (Topic) +================== +.. autoatschema:: Products.ATContentTypes.content.topic.ATTopicSchema + +Folder +====== +.. autoatschema:: Products.ATContentTypes.content.folder.ATFolderSchema + +Large Folder +============ +.. autoatschema:: Products.ATContentTypes.content.folder.ATBTreeFolderSchema + +Image +===== +.. autoatschema:: Products.ATContentTypes.content.image.ATImageSchema + +File +==== +.. autoatschema:: Products.ATContentTypes.content.file.ATFileSchema + +Link +==== +.. autoatschema:: Products.ATContentTypes.content.link.ATLinkSchema + + Added: collective.sphinx.plonedocs/trunk/docs/source/glossary.txt ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/docs/source/glossary.txt Sun Nov 9 02:45:48 2008 @@ -0,0 +1,10 @@ +.. _glossary: + +Glossary +======== + +.. glossary:: + + Content Rule + Is a thing that does a thing... + Added: collective.sphinx.plonedocs/trunk/docs/source/index.txt ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/docs/source/index.txt Sun Nov 9 02:45:48 2008 @@ -0,0 +1,32 @@ +.. _contents: + +================================== +Plone Developers Guide / Reference +================================== + +.. warning:: + Plone Developers Guide / Reference is under construction! + +:Reference for Plone version: |version| (|release|) +:Document last updated: |today| + +Table Of Contents +----------------- + +.. toctree:: + :maxdepth: 3 + + archetypes + content-types + content-rules + + changes + glossary + +Indices and tables +------------------ + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + Added: collective.sphinx.plonedocs/trunk/setup.cfg ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/setup.cfg Sun Nov 9 02:45:48 2008 @@ -0,0 +1,3 @@ +[egg_info] +tag_build = dev +tag_svn_revision = true Added: collective.sphinx.plonedocs/trunk/setup.py ============================================================================== --- (empty file) +++ collective.sphinx.plonedocs/trunk/setup.py Sun Nov 9 02:45:48 2008 @@ -0,0 +1,33 @@ +from setuptools import setup, find_packages +import os + +version = '0.1' + +setup(name='collective.sphinx.plonedocs', + version=version, + description="", + long_description=open("README.txt").read() + "\n" + + open(os.path.join("docs", "HISTORY.txt")).read(), + # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers + classifiers=[ + "Framework :: Plone", + "Programming Language :: Python", + "Topic :: Software Development :: Libraries :: Python Modules", + ], + keywords='plone sphinx zope documentation', + author='Rok Garbas', + author_email='rok...@gm...', + url='http://svn.plone.org/svn/collective/collective.sphinx.plonedocs', + license='GPL', + packages=find_packages(exclude=['ez_setup']), + namespace_packages=['collective', 'collective.sphinx'], + include_package_data=True, + zip_safe=False, + install_requires=[ + 'setuptools', + # -*- Extra requirements: -*- + ], + entry_points=""" + # -*- Entry points: -*- + """, + ) |