[Checkins] SVN: z3ext.cssregistry/tags/1.5.0/ release tag
Nikolay Kim
fafhrd91 at gmail.com
Tue Aug 11 05:41:30 EDT 2009
Log message for revision 102666:
release tag
Changed:
A z3ext.cssregistry/tags/1.5.0/
D z3ext.cssregistry/tags/1.5.0/CHANGES.txt
A z3ext.cssregistry/tags/1.5.0/CHANGES.txt
D z3ext.cssregistry/tags/1.5.0/bootstrap.py
A z3ext.cssregistry/tags/1.5.0/bootstrap.py
D z3ext.cssregistry/tags/1.5.0/setup.py
A z3ext.cssregistry/tags/1.5.0/setup.py
D z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/command.py
A z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/command.py
D z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/interfaces.py
A z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/interfaces.py
D z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/property.py
A z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/property.py
D z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/registry.py
A z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/registry.py
D z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/tests.py
A z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/tests.py
D z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/zcml.py
A z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/zcml.py
-=-
Deleted: z3ext.cssregistry/tags/1.5.0/CHANGES.txt
===================================================================
--- z3ext.cssregistry/trunk/CHANGES.txt 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.cssregistry/tags/1.5.0/CHANGES.txt 2009-08-11 09:41:29 UTC (rev 102666)
@@ -1,93 +0,0 @@
-=======
-CHANGES
-=======
-
-
-1.4.1 (2009-04-??)
-------------------
-
-- Do not use z3c.autoinclude
-
-
-1.4.0 (2008-11-25)
-------------------
-
-- z3ext.controlpanel configlet moved to z3ext.ui.cssregistry package
-
-
-1.3.2 (2008-11-24)
-------------------
-
-- Include z3ext.controlpanel if installed
-
-
-1.3.1 (2008-11-13)
-------------------
-
-- Added property title
-
-- Property description is i18n aware
-
-- Fix Persistent property management
-
-- Added translations: ru, nl
-
-
-1.3.0 (2008-10-10)
-------------------
-
-- Update i18n
-
-- Do not use Persistent for registry and property
-
-
-1.2.2 (2008-04-01)
-------------------
-
-- Configlet declaration moved to seperate zcml file
-
-
-1.2.1 (2008-03-31)
-------------------
-
-- Fix wrong import
-
-
-1.2.0 (2008-03-21)
-------------------
-
-- tests updated
-
-- move to svn.zope.org
-
-
-1.1.3 (2008-02-11)
-------------------
-
-- Fixed control panel configlet
-
-
-1.1.2 (2008-02-08)
-------------------
-
-- Security declarations fixed
-
-
-1.1.1 (2008-02-08)
-------------------
-
-- Remove support cssregistry as utility
-
-
-1.1.0 (2008-02-08)
-------------------
-
-- Added controlpanel configlet
-
-- Code cleanup
-
-
-1.0.0 (2007-12-01)
-------------------
-
-- Initial release.
Copied: z3ext.cssregistry/tags/1.5.0/CHANGES.txt (from rev 102665, z3ext.cssregistry/trunk/CHANGES.txt)
===================================================================
--- z3ext.cssregistry/tags/1.5.0/CHANGES.txt (rev 0)
+++ z3ext.cssregistry/tags/1.5.0/CHANGES.txt 2009-08-11 09:41:29 UTC (rev 102666)
@@ -0,0 +1,95 @@
+=======
+CHANGES
+=======
+
+
+1.5.0 (2009-08-11)
+------------------
+
+- Do not use z3c.autoinclude
+
+- Copyright holder changed
+
+
+1.4.0 (2008-11-25)
+------------------
+
+- z3ext.controlpanel configlet moved to z3ext.ui.cssregistry package
+
+
+1.3.2 (2008-11-24)
+------------------
+
+- Include z3ext.controlpanel if installed
+
+
+1.3.1 (2008-11-13)
+------------------
+
+- Added property title
+
+- Property description is i18n aware
+
+- Fix Persistent property management
+
+- Added translations: ru, nl
+
+
+1.3.0 (2008-10-10)
+------------------
+
+- Update i18n
+
+- Do not use Persistent for registry and property
+
+
+1.2.2 (2008-04-01)
+------------------
+
+- Configlet declaration moved to seperate zcml file
+
+
+1.2.1 (2008-03-31)
+------------------
+
+- Fix wrong import
+
+
+1.2.0 (2008-03-21)
+------------------
+
+- tests updated
+
+- move to svn.zope.org
+
+
+1.1.3 (2008-02-11)
+------------------
+
+- Fixed control panel configlet
+
+
+1.1.2 (2008-02-08)
+------------------
+
+- Security declarations fixed
+
+
+1.1.1 (2008-02-08)
+------------------
+
+- Remove support cssregistry as utility
+
+
+1.1.0 (2008-02-08)
+------------------
+
+- Added controlpanel configlet
+
+- Code cleanup
+
+
+1.0.0 (2007-12-01)
+------------------
+
+- Initial release.
Deleted: z3ext.cssregistry/tags/1.5.0/bootstrap.py
===================================================================
--- z3ext.cssregistry/trunk/bootstrap.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.cssregistry/tags/1.5.0/bootstrap.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -1,52 +0,0 @@
-##############################################################################
-#
-# 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()
-
-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)
Copied: z3ext.cssregistry/tags/1.5.0/bootstrap.py (from rev 102665, z3ext.cssregistry/trunk/bootstrap.py)
===================================================================
--- z3ext.cssregistry/tags/1.5.0/bootstrap.py (rev 0)
+++ z3ext.cssregistry/tags/1.5.0/bootstrap.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Foundation 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()
+
+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)
Deleted: z3ext.cssregistry/tags/1.5.0/setup.py
===================================================================
--- z3ext.cssregistry/trunk/setup.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.cssregistry/tags/1.5.0/setup.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -1,71 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-"""Setup for z3ext.cssregistry package
-
-$Id$
-"""
-import os
-from setuptools import setup, find_packages
-
-def read(*rnames):
- return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
-
-version = '1.4.1dev'
-
-
-setup(name='z3ext.cssregistry',
- version=version,
- description="CSS Registry - zrt-cssregistry command for z3c.zrtresource",
- long_description=(
- 'Detailed Dcoumentation\n' +
- '======================\n'
- + '\n\n' +
- read('src', 'z3ext', 'cssregistry', 'README.txt')
- + '\n\n' +
- read('CHANGES.txt')
- ),
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: Zope Public License',
- 'Programming Language :: Python',
- 'Natural Language :: English',
- 'Operating System :: OS Independent',
- 'Topic :: Internet :: WWW/HTTP',
- 'Framework :: Zope3'],
- author='Nikolay Kim',
- author_email='fafhrd91 at gmail.com',
- url='http://z3ext.net/',
- license='ZPL 2.1',
- packages=find_packages('src'),
- package_dir = {'':'src'},
- namespace_packages=['z3ext'],
- install_requires = ['setuptools',
- 'zope.schema',
- 'zope.proxy',
- 'zope.interface',
- 'zope.component',
- 'zope.i18nmessageid',
- 'zope.configuration',
- 'z3c.zrtresource',
- ],
- extras_require = dict(test=['zope.app.testing',
- 'zope.testing',
- 'zope.publisher',
- 'zope.traversing',
- ]),
- include_package_data = True,
- zip_safe = False,
- )
Copied: z3ext.cssregistry/tags/1.5.0/setup.py (from rev 102665, z3ext.cssregistry/trunk/setup.py)
===================================================================
--- z3ext.cssregistry/tags/1.5.0/setup.py (rev 0)
+++ z3ext.cssregistry/tags/1.5.0/setup.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -0,0 +1,71 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation 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.
+#
+##############################################################################
+"""Setup for z3ext.cssregistry package
+
+$Id$
+"""
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+version = '1.5.0'
+
+
+setup(name='z3ext.cssregistry',
+ version=version,
+ description="CSS Registry - zrt-cssregistry command for z3c.zrtresource",
+ long_description=(
+ 'Detailed Dcoumentation\n' +
+ '======================\n'
+ + '\n\n' +
+ read('src', 'z3ext', 'cssregistry', 'README.txt')
+ + '\n\n' +
+ read('CHANGES.txt')
+ ),
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: Zope Public License',
+ 'Programming Language :: Python',
+ 'Natural Language :: English',
+ 'Operating System :: OS Independent',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Framework :: Zope3'],
+ author='Nikolay Kim',
+ author_email='fafhrd91 at gmail.com',
+ url='http://z3ext.net/',
+ license='ZPL 2.1',
+ packages=find_packages('src'),
+ package_dir = {'':'src'},
+ namespace_packages=['z3ext'],
+ install_requires = ['setuptools',
+ 'zope.schema',
+ 'zope.proxy',
+ 'zope.interface',
+ 'zope.component',
+ 'zope.i18nmessageid',
+ 'zope.configuration',
+ 'z3c.zrtresource',
+ ],
+ extras_require = dict(test=['zope.app.testing',
+ 'zope.testing',
+ 'zope.publisher',
+ 'zope.traversing',
+ ]),
+ include_package_data = True,
+ zip_safe = False,
+ )
Deleted: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/command.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/command.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/command.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -1,55 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-""" z3c.zrtresource zrt-cssregistry command implementation
-
-$Id$
-"""
-import re
-from zope import interface
-from zope.proxy import removeAllProxies
-from zope.component import factory, queryUtility, queryMultiAdapter
-
-from z3c.zrtresource.interfaces import IZRTCommand, IZRTCommandFactory
-
-from interfaces import Layer, ICSSRegistry
-
-
-class CSSRegistryCommand(object):
- interface.implements(IZRTCommand)
-
- isAvailable = True
-
- def __init__(self, args, start, end):
- self.start = start
- self.end = end
- self.name = args.strip()
-
- def process(self, text, context, request):
- registry = queryMultiAdapter(
- (Layer, request), ICSSRegistry, name=self.name)
-
- if registry is None:
- registry = queryMultiAdapter(
- (Layer, Layer, request), ICSSRegistry, name=self.name)
-
- if registry is None:
- return text
- for property in removeAllProxies(registry).values():
- text = property.process(text)
-
- return text
-
-
-cssregistry_factory = factory.Factory(CSSRegistryCommand, 'cssregistry')
-interface.directlyProvides(cssregistry_factory, IZRTCommandFactory)
Copied: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/command.py (from rev 102665, z3ext.cssregistry/trunk/src/z3ext/cssregistry/command.py)
===================================================================
--- z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/command.py (rev 0)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/command.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -0,0 +1,55 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation 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.
+#
+##############################################################################
+""" z3c.zrtresource zrt-cssregistry command implementation
+
+$Id$
+"""
+import re
+from zope import interface
+from zope.proxy import removeAllProxies
+from zope.component import factory, queryUtility, queryMultiAdapter
+
+from z3c.zrtresource.interfaces import IZRTCommand, IZRTCommandFactory
+
+from interfaces import Layer, ICSSRegistry
+
+
+class CSSRegistryCommand(object):
+ interface.implements(IZRTCommand)
+
+ isAvailable = True
+
+ def __init__(self, args, start, end):
+ self.start = start
+ self.end = end
+ self.name = args.strip()
+
+ def process(self, text, context, request):
+ registry = queryMultiAdapter(
+ (Layer, request), ICSSRegistry, name=self.name)
+
+ if registry is None:
+ registry = queryMultiAdapter(
+ (Layer, Layer, request), ICSSRegistry, name=self.name)
+
+ if registry is None:
+ return text
+ for property in removeAllProxies(registry).values():
+ text = property.process(text)
+
+ return text
+
+
+cssregistry_factory = factory.Factory(CSSRegistryCommand, 'cssregistry')
+interface.directlyProvides(cssregistry_factory, IZRTCommandFactory)
Deleted: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/interfaces.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/interfaces.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -1,80 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-""" z3ext.cssregistry interfaces
-
-$Id$
-"""
-from zope import schema, interface
-from zope.interface.common.mapping import IMapping
-from zope.i18nmessageid import MessageFactory
-
-_ = MessageFactory('z3ext.cssregistry')
-
-
-class ICSSRegistry(IMapping):
-
- properties = interface.Attribute('css properties')
-
- name = schema.TextLine(
- title = _(u'Name'),
- description = _(u'CSS Registry name'),
- default = u'',
- required = False)
-
- title = schema.TextLine(
- title = _(u'Title'),
- description = _(u'CSS Registry title'),
- default = u'',
- required = False)
-
-
-class ICSSProperty(interface.Interface):
-
- name = schema.TextLine(
- title = _(u'Name'),
- description = _(u'Property name'),
- required = True)
-
- title = schema.TextLine(
- title = _(u'Title'),
- description = _(u'Property title'),
- required = False)
-
- description = schema.TextLine(
- title = _(u'Description'),
- description = _(u'Property description'),
- required = False)
-
- value = schema.TextLine(
- title = _(u'Value'),
- description = _(u'Property value'),
- required = True)
-
- type = schema.TextLine(
- title = _(u'Type'),
- description = _(u'Property type. (color, font, size)'),
- required = False)
-
- def process(text):
- """ replace property in text """
-
-
-class ICSSRegistryLayer(interface.Interface):
- """ marker interface """
-
-
-class Layer(object):
- interface.implements(ICSSRegistryLayer)
-
-Layer = Layer()
Copied: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/interfaces.py (from rev 102665, z3ext.cssregistry/trunk/src/z3ext/cssregistry/interfaces.py)
===================================================================
--- z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/interfaces.py (rev 0)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/interfaces.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -0,0 +1,80 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation 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.
+#
+##############################################################################
+""" z3ext.cssregistry interfaces
+
+$Id$
+"""
+from zope import schema, interface
+from zope.interface.common.mapping import IMapping
+from zope.i18nmessageid import MessageFactory
+
+_ = MessageFactory('z3ext.cssregistry')
+
+
+class ICSSRegistry(IMapping):
+
+ properties = interface.Attribute('css properties')
+
+ name = schema.TextLine(
+ title = _(u'Name'),
+ description = _(u'CSS Registry name'),
+ default = u'',
+ required = False)
+
+ title = schema.TextLine(
+ title = _(u'Title'),
+ description = _(u'CSS Registry title'),
+ default = u'',
+ required = False)
+
+
+class ICSSProperty(interface.Interface):
+
+ name = schema.TextLine(
+ title = _(u'Name'),
+ description = _(u'Property name'),
+ required = True)
+
+ title = schema.TextLine(
+ title = _(u'Title'),
+ description = _(u'Property title'),
+ required = False)
+
+ description = schema.TextLine(
+ title = _(u'Description'),
+ description = _(u'Property description'),
+ required = False)
+
+ value = schema.TextLine(
+ title = _(u'Value'),
+ description = _(u'Property value'),
+ required = True)
+
+ type = schema.TextLine(
+ title = _(u'Type'),
+ description = _(u'Property type. (color, font, size)'),
+ required = False)
+
+ def process(text):
+ """ replace property in text """
+
+
+class ICSSRegistryLayer(interface.Interface):
+ """ marker interface """
+
+
+class Layer(object):
+ interface.implements(ICSSRegistryLayer)
+
+Layer = Layer()
Deleted: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/property.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/property.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -1,44 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-""" ICSSProperty implementation
-
-$Id$
-"""
-import re
-from zope import interface
-from persistent import Persistent
-
-from interfaces import ICSSProperty
-
-
-class Property(object):
- interface.implements(ICSSProperty)
-
- title = u''
- description = u''
-
- def __init__(self, name, value, title='', description='', type=''):
- self.name = name
- self.value = value
- self.title = title
- self.description = description
- self.type = type
-
- def process(self, text):
- regex = re.compile(re.escape(self.name))
- return regex.subn(self.value, text)[0]
-
-
-class CSSProperty(Property, Persistent):
- pass
Copied: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/property.py (from rev 102665, z3ext.cssregistry/trunk/src/z3ext/cssregistry/property.py)
===================================================================
--- z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/property.py (rev 0)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/property.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -0,0 +1,44 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation 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.
+#
+##############################################################################
+""" ICSSProperty implementation
+
+$Id$
+"""
+import re
+from zope import interface
+from persistent import Persistent
+
+from interfaces import ICSSProperty
+
+
+class Property(object):
+ interface.implements(ICSSProperty)
+
+ title = u''
+ description = u''
+
+ def __init__(self, name, value, title='', description='', type=''):
+ self.name = name
+ self.value = value
+ self.title = title
+ self.description = description
+ self.type = type
+
+ def process(self, text):
+ regex = re.compile(re.escape(self.name))
+ return regex.subn(self.value, text)[0]
+
+
+class CSSProperty(Property, Persistent):
+ pass
Deleted: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/registry.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/registry.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/registry.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -1,63 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-"""
-
-$Id$
-"""
-from zope import interface
-from interfaces import ICSSRegistry
-
-registries = {}
-
-
-class CSSRegistry(object):
- interface.implements(ICSSRegistry)
-
- @property
- def properties(self):
- try:
- return self._properties
- except AttributeError:
- self._properties = {}
- return self._properties
-
- def keys(self):
- return self.properties.keys()
-
- def __iter__(self):
- return iter(self.properties)
-
- def values(self):
- return self.properties.values()
-
- def items(self):
- return self.properties.items()
-
- def __len__(self):
- return len(self.properties)
-
- def __setitem__(self, key, value):
- self.properties[key] = value
-
- def __getitem__(self, key):
- return self.properties[key]
-
- def __delitem__(self, key):
- del self.properties[key]
-
- def get(self, key, default=None):
- return self.properties.get(key, default)
-
- def __contains__(self, key):
- return key in self.properties
Copied: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/registry.py (from rev 102665, z3ext.cssregistry/trunk/src/z3ext/cssregistry/registry.py)
===================================================================
--- z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/registry.py (rev 0)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/registry.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -0,0 +1,63 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation 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.
+#
+##############################################################################
+"""
+
+$Id$
+"""
+from zope import interface
+from interfaces import ICSSRegistry
+
+registries = {}
+
+
+class CSSRegistry(object):
+ interface.implements(ICSSRegistry)
+
+ @property
+ def properties(self):
+ try:
+ return self._properties
+ except AttributeError:
+ self._properties = {}
+ return self._properties
+
+ def keys(self):
+ return self.properties.keys()
+
+ def __iter__(self):
+ return iter(self.properties)
+
+ def values(self):
+ return self.properties.values()
+
+ def items(self):
+ return self.properties.items()
+
+ def __len__(self):
+ return len(self.properties)
+
+ def __setitem__(self, key, value):
+ self.properties[key] = value
+
+ def __getitem__(self, key):
+ return self.properties[key]
+
+ def __delitem__(self, key):
+ del self.properties[key]
+
+ def get(self, key, default=None):
+ return self.properties.get(key, default)
+
+ def __contains__(self, key):
+ return key in self.properties
Deleted: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/tests.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/tests.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/tests.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -1,44 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-""" z3ext.cssregistry tests
-
-$Id$
-"""
-__docformat__ = "reStructuredText"
-
-import unittest, doctest
-from zope import interface, schema
-from zope.component import provideAdapter
-from zope.app.testing import setup
-from zope.traversing.namespace import view
-from zope.traversing.interfaces import ITraversable
-
-
-def setUp(test):
- setup.placelessSetUp()
- setup.setUpTraversal()
- provideAdapter(view, (None, None), ITraversable, name="view")
-
-
-def tearDown(test):
- setup.placelessTearDown()
-
-
-def test_suite():
- return unittest.TestSuite((
- doctest.DocFileSuite(
- 'README.txt',
- setUp=setUp, tearDown=tearDown,
- optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
- ))
Copied: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/tests.py (from rev 102665, z3ext.cssregistry/trunk/src/z3ext/cssregistry/tests.py)
===================================================================
--- z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/tests.py (rev 0)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/tests.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -0,0 +1,44 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation 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.
+#
+##############################################################################
+""" z3ext.cssregistry tests
+
+$Id$
+"""
+__docformat__ = "reStructuredText"
+
+import unittest, doctest
+from zope import interface, schema
+from zope.component import provideAdapter
+from zope.app.testing import setup
+from zope.traversing.namespace import view
+from zope.traversing.interfaces import ITraversable
+
+
+def setUp(test):
+ setup.placelessSetUp()
+ setup.setUpTraversal()
+ provideAdapter(view, (None, None), ITraversable, name="view")
+
+
+def tearDown(test):
+ setup.placelessTearDown()
+
+
+def test_suite():
+ return unittest.TestSuite((
+ doctest.DocFileSuite(
+ 'README.txt',
+ setUp=setUp, tearDown=tearDown,
+ optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
+ ))
Deleted: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/zcml.py
===================================================================
--- z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py 2009-08-10 17:22:44 UTC (rev 102631)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/zcml.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -1,142 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2007 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.
-#
-##############################################################################
-""" `browser:cssregistry` directive
-
-$Id$
-"""
-
-from zope import schema, interface
-from zope.component.zcml import handler
-from zope.configuration.fields import MessageID, GlobalObject
-
-from property import Property
-from registry import CSSRegistry, registries
-
-from interfaces import _, ICSSRegistry, ICSSRegistryLayer
-
-
-class ICSSRegistryDirective(interface.Interface):
-
- name = schema.TextLine(
- title = u'Name',
- description = u'Registry name',
- required = False)
-
- title = schema.TextLine(
- title = u'Title',
- required = False)
-
- layer = GlobalObject(
- title = u"The layer the css registry should be found in",
- required = False)
-
-
-class ICSSPropertySubDirective(interface.Interface):
-
- name = schema.TextLine(
- title = u'Name',
- description = u'Property name',
- required = True)
-
- value = schema.TextLine(
- title = u'Value',
- description = u'Property value',
- required = True)
-
- title = MessageID(
- title = u'Title',
- description = u'Property title',
- required = False)
-
- description = MessageID(
- title = u'Description',
- description = u'Property description',
- required = False)
-
- type = schema.TextLine(
- title = u'Type',
- description = u'Property type. (color, font, size)',
- required = False)
-
-
-class ICSSPropertyDirective(interface.Interface):
-
- registry = schema.TextLine(
- title = u'Registry',
- required = False)
-
- layer = GlobalObject(
- title = u"The layer the css registry should be found in",
- required=False)
-
- name = schema.TextLine(
- title = u'Name',
- required = True)
-
- value = schema.TextLine(
- title = u'Value',
- required = True)
-
- description = schema.TextLine(
- title = u'Description',
- description = u'Property description',
- required = False)
-
- type = schema.TextLine(
- title = u'Type',
- description = u'Property type. (color, font, size)',
- required = False)
-
-
-class Factory(object):
-
- def __init__(self, registry):
- self.registry = registry
-
- def __call__(self, layer1, layer2, request):
- return self.registry
-
-
-class cssregistryHandler(object):
-
- def __init__(self, _context, name='', title='', layer=interface.Interface):
- self.name = name
- self.layer = layer
-
- self.registry = CSSRegistry()
- self.registry.name = name
- self.registry.title = title
-
- registries[(name, layer)] = self.registry
-
- # we can't use just 'layer', because registry will be registered as resource
- _context.action(
- discriminator = ('CSSRegistry', name, layer),
- callable = handler,
- args = ('registerAdapter',
- Factory(self.registry),
- (ICSSRegistryLayer, ICSSRegistryLayer, layer),
- ICSSRegistry, name, _context.info),
- )
-
- def property(self, _context, name, value,
- title=u'', description='', type=''):
- self.registry[name] = Property(name, value, title, description, type)
-
-
-def csspropertyHandler(_context, name, value, registry='',
- layer=interface.Interface,
- title='', description='', type=''):
- registry = registries[(registry, layer)]
- registry[name] = Property(name, value, title, description, type)
Copied: z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/zcml.py (from rev 102665, z3ext.cssregistry/trunk/src/z3ext/cssregistry/zcml.py)
===================================================================
--- z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/zcml.py (rev 0)
+++ z3ext.cssregistry/tags/1.5.0/src/z3ext/cssregistry/zcml.py 2009-08-11 09:41:29 UTC (rev 102666)
@@ -0,0 +1,142 @@
+##############################################################################
+#
+# Copyright (c) 2009 Zope Foundation 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.
+#
+##############################################################################
+""" `browser:cssregistry` directive
+
+$Id$
+"""
+
+from zope import schema, interface
+from zope.component.zcml import handler
+from zope.configuration.fields import MessageID, GlobalObject
+
+from property import Property
+from registry import CSSRegistry, registries
+
+from interfaces import _, ICSSRegistry, ICSSRegistryLayer
+
+
+class ICSSRegistryDirective(interface.Interface):
+
+ name = schema.TextLine(
+ title = u'Name',
+ description = u'Registry name',
+ required = False)
+
+ title = schema.TextLine(
+ title = u'Title',
+ required = False)
+
+ layer = GlobalObject(
+ title = u"The layer the css registry should be found in",
+ required = False)
+
+
+class ICSSPropertySubDirective(interface.Interface):
+
+ name = schema.TextLine(
+ title = u'Name',
+ description = u'Property name',
+ required = True)
+
+ value = schema.TextLine(
+ title = u'Value',
+ description = u'Property value',
+ required = True)
+
+ title = MessageID(
+ title = u'Title',
+ description = u'Property title',
+ required = False)
+
+ description = MessageID(
+ title = u'Description',
+ description = u'Property description',
+ required = False)
+
+ type = schema.TextLine(
+ title = u'Type',
+ description = u'Property type. (color, font, size)',
+ required = False)
+
+
+class ICSSPropertyDirective(interface.Interface):
+
+ registry = schema.TextLine(
+ title = u'Registry',
+ required = False)
+
+ layer = GlobalObject(
+ title = u"The layer the css registry should be found in",
+ required=False)
+
+ name = schema.TextLine(
+ title = u'Name',
+ required = True)
+
+ value = schema.TextLine(
+ title = u'Value',
+ required = True)
+
+ description = schema.TextLine(
+ title = u'Description',
+ description = u'Property description',
+ required = False)
+
+ type = schema.TextLine(
+ title = u'Type',
+ description = u'Property type. (color, font, size)',
+ required = False)
+
+
+class Factory(object):
+
+ def __init__(self, registry):
+ self.registry = registry
+
+ def __call__(self, layer1, layer2, request):
+ return self.registry
+
+
+class cssregistryHandler(object):
+
+ def __init__(self, _context, name='', title='', layer=interface.Interface):
+ self.name = name
+ self.layer = layer
+
+ self.registry = CSSRegistry()
+ self.registry.name = name
+ self.registry.title = title
+
+ registries[(name, layer)] = self.registry
+
+ # we can't use just 'layer', because registry will be registered as resource
+ _context.action(
+ discriminator = ('CSSRegistry', name, layer),
+ callable = handler,
+ args = ('registerAdapter',
+ Factory(self.registry),
+ (ICSSRegistryLayer, ICSSRegistryLayer, layer),
+ ICSSRegistry, name, _context.info),
+ )
+
+ def property(self, _context, name, value,
+ title=u'', description='', type=''):
+ self.registry[name] = Property(name, value, title, description, type)
+
+
+def csspropertyHandler(_context, name, value, registry='',
+ layer=interface.Interface,
+ title='', description='', type=''):
+ registry = registries[(registry, layer)]
+ registry[name] = Property(name, value, title, description, type)
More information about the Checkins
mailing list