zope.app.renderer-3.5.1/0000755000076400007640000000000011232115613015314 5ustar srichtersrichterzope.app.renderer-3.5.1/setup.cfg0000644000076400007640000000007311232115613017135 0ustar srichtersrichter[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 zope.app.renderer-3.5.1/src/0000755000076400007640000000000011232115613016103 5ustar srichtersrichterzope.app.renderer-3.5.1/src/zope.app.renderer.egg-info/0000755000076400007640000000000011232115613023136 5ustar srichtersrichterzope.app.renderer-3.5.1/src/zope.app.renderer.egg-info/SOURCES.txt0000644000076400007640000000147111232115613025025 0ustar srichtersrichterCHANGES.txt README.txt bootstrap.py buildout.cfg setup.py src/zope/__init__.py src/zope.app.renderer.egg-info/PKG-INFO src/zope.app.renderer.egg-info/SOURCES.txt src/zope.app.renderer.egg-info/dependency_links.txt src/zope.app.renderer.egg-info/namespace_packages.txt src/zope.app.renderer.egg-info/not-zip-safe src/zope.app.renderer.egg-info/requires.txt src/zope.app.renderer.egg-info/top_level.txt src/zope/app/__init__.py src/zope/app/renderer/__init__.py src/zope/app/renderer/configure.zcml src/zope/app/renderer/i18n.py src/zope/app/renderer/interfaces.py src/zope/app/renderer/plaintext.py src/zope/app/renderer/rest.py src/zope/app/renderer/stx.py src/zope/app/renderer/vocabulary.py src/zope/app/renderer/tests/__init__.py src/zope/app/renderer/tests/test_renderers.py src/zope/app/renderer/tests/test_vocabulary.pyzope.app.renderer-3.5.1/src/zope.app.renderer.egg-info/namespace_packages.txt0000644000076400007640000000001611232115613027466 0ustar srichtersrichterzope zope.app zope.app.renderer-3.5.1/src/zope.app.renderer.egg-info/PKG-INFO0000644000076400007640000000353011232115613024234 0ustar srichtersrichterMetadata-Version: 1.0 Name: zope.app.renderer Version: 3.5.1 Summary: Text Renderer Framework Home-page: http://pypi.python.org/pypi/zope.app.renderer Author: Zope Corporation and Contributors Author-email: zope-dev@zope.org License: ZPL 2.1 Description: This package provides a framework to convert a string from one format, such as Structured or Restructured Text, to another, such as HTML. Converters are looked up by adapter and uses other packages to implement the converters. ======= CHANGES ======= 3.5.1 (2009-07-21) ------------------ - Require the new `roman` package, since docutils does not install it correctly. 3.5.0 (2009-01-17) ------------------ - Adapted to docutils 0.5 for ReST rendering: get rid of the ZopeTranslator class, because docutils changed the way it uses translator so previous implementation doesn't work anymore. Instead, use publish_parts and join needed parts in the ``render`` method of the renderer itself. - Removed deprecated meta.zcml stuff and zpkg stuff. - Replaced __used_for__ with zope.component.adapts calls. 3.4.0 (2007-10-27) ------------------ - Initial release independent of the main Zope tree. Keywords: zope3 renderer text rest rst stx Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Zope Public License Classifier: Programming Language :: Python Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP Classifier: Framework :: Zope3 zope.app.renderer-3.5.1/src/zope.app.renderer.egg-info/requires.txt0000644000076400007640000000025211232115613025535 0ustar srichtersrichtersetuptools docutils>=0.5 roman zope.component zope.configuration zope.i18nmessageid zope.interface zope.publisher zope.schema zope.structuredtext [test] zope.app.testingzope.app.renderer-3.5.1/src/zope.app.renderer.egg-info/top_level.txt0000644000076400007640000000000511232115613025663 0ustar srichtersrichterzope zope.app.renderer-3.5.1/src/zope.app.renderer.egg-info/dependency_links.txt0000644000076400007640000000000111232115613027204 0ustar srichtersrichter zope.app.renderer-3.5.1/src/zope.app.renderer.egg-info/not-zip-safe0000644000076400007640000000000111221077621025370 0ustar srichtersrichter zope.app.renderer-3.5.1/src/zope/0000755000076400007640000000000011232115613017060 5ustar srichtersrichterzope.app.renderer-3.5.1/src/zope/app/0000755000076400007640000000000011232115613017640 5ustar srichtersrichterzope.app.renderer-3.5.1/src/zope/app/renderer/0000755000076400007640000000000011232115613021446 5ustar srichtersrichterzope.app.renderer-3.5.1/src/zope/app/renderer/rest.py0000644000076400007640000000715511232115227023006 0ustar srichtersrichter############################################################################## # # Copyright (c) 2003 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. # ############################################################################## """ReStructured Text Renderer Classes $Id: rest.py 94785 2009-01-17 12:54:26Z nadako $ """ __docformat__ = 'restructuredtext' import docutils.core from zope.component import adapts from zope.interface import implements from zope.publisher.browser import BrowserView from zope.publisher.interfaces.browser import IBrowserRequest from zope.app.renderer.i18n import ZopeMessageFactory as _ from zope.app.renderer.interfaces import ISource, IHTMLRenderer from zope.app.renderer import SourceFactory class IReStructuredTextSource(ISource): """Marker interface for a restructured text source. Note that an implementation of this interface should always derive from unicode or behave like a unicode class.""" ReStructuredTextSourceFactory = SourceFactory( IReStructuredTextSource, _("ReStructured Text (ReST)"), _("ReStructured Text (ReST) Source")) class ReStructuredTextToHTMLRenderer(BrowserView): r"""An Adapter to convert from Restructured Text to HTML. Examples:: >>> from zope.publisher.browser import TestRequest >>> source = ReStructuredTextSourceFactory(u''' ... This is source. ... ... Header 3 ... -------- ... This is more source. ... ''') >>> renderer = ReStructuredTextToHTMLRenderer(source, TestRequest()) >>> print renderer.render().strip()

This is source.

Header 3

This is more source.

""" implements(IHTMLRenderer) adapts(IReStructuredTextSource, IBrowserRequest) def render(self, settings_overrides={}): """See zope.app.interfaces.renderer.IHTMLRenderer Let's make sure that inputted unicode stays as unicode: >>> renderer = ReStructuredTextToHTMLRenderer(u'b\xc3h', None) >>> repr(renderer.render()) "u'

b\\\\xc3h

\\\\n'" >>> text = u''' ... ========= ... Heading 1 ... ========= ... ... hello world ... ... Heading 2 ... =========''' >>> overrides = {'initial_header_level': 2, ... 'doctitle_xform': 0 } >>> renderer = ReStructuredTextToHTMLRenderer(text, None) >>> print renderer.render(overrides)

Heading 1

hello world

Heading 2

""" # default settings for the renderer overrides = { 'halt_level': 6, 'input_encoding': 'unicode', 'output_encoding': 'unicode', 'initial_header_level': 3, } overrides.update(settings_overrides) parts = docutils.core.publish_parts( self.context, writer_name='html', settings_overrides=overrides, ) return u''.join((parts['body_pre_docinfo'], parts['docinfo'], parts['body'])) zope.app.renderer-3.5.1/src/zope/app/renderer/tests/0000755000076400007640000000000011232115613022610 5ustar srichtersrichterzope.app.renderer-3.5.1/src/zope/app/renderer/tests/test_vocabulary.py0000644000076400007640000000577511221077621026412 0ustar srichtersrichter############################################################################## # # Copyright (c) 2003 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. # ############################################################################## """Tests for Renderer Vocabulary. $Id: test_vocabulary.py 73674 2007-03-27 07:52:12Z dobe $ """ import unittest from zope.app.testing import ztapi from zope.app.renderer import SourceFactory from zope.app.renderer.interfaces import ISource from zope.app.renderer.vocabulary import SourceTypeVocabulary from zope.component.interfaces import IFactory from zope.app.testing.placelesssetup import PlacelessSetup from zope.schema.interfaces import IVocabulary, IVocabularyTokenized class IFoo(ISource): """Source marker interface""" FooFactory = SourceFactory(IFoo, 'Foo', 'Foo Source') class IFoo2(ISource): """Source marker interface""" Foo2Factory = SourceFactory(IFoo2, 'Foo2', 'Foo2 Source') # The vocabulary uses SimpleVocabulary now, so these tests are a bit # redundant. Leaving them in as confirmation that the replacement function # works identically to the old custom vocabulary. class SourceTypeVocabularyTest(PlacelessSetup, unittest.TestCase): def setUp(self): super(SourceTypeVocabularyTest, self).setUp() ztapi.provideUtility(IFactory, FooFactory, 'zope.source.Foo') ztapi.provideUtility(IFactory, Foo2Factory, 'zope.source.Foo2') self.vocab = SourceTypeVocabulary(None) def test_Interface(self): self.failUnless(IVocabulary.providedBy(self.vocab)) self.failUnless(IVocabularyTokenized.providedBy(self.vocab)) def test_contains(self): self.failUnless('zope.source.Foo' in self.vocab) self.failIf('zope.source.Foo3' in self.vocab) def test_iter(self): self.failUnless( 'zope.source.Foo' in [term.value for term in self.vocab]) self.failIf( 'zope.source.Foo3' in [term.value for term in iter(self.vocab)]) def test_len(self): self.assertEqual(len(self.vocab), 2) def test_getTerm(self): self.assertEqual(self.vocab.getTerm('zope.source.Foo').title, 'Foo') self.assertRaises( LookupError, self.vocab.getTerm, ('zope.source.Foo3',)) def test_getTermByToken(self): vocab = self.vocab self.assertEqual(vocab.getTermByToken('zope.source.Foo').title, 'Foo') self.assertRaises( LookupError, vocab.getTermByToken, ('zope.source.Foo3',)) def test_suite(): return unittest.TestSuite(( unittest.makeSuite(SourceTypeVocabularyTest), )) if __name__ == '__main__': unittest.main() zope.app.renderer-3.5.1/src/zope/app/renderer/tests/test_renderers.py0000644000076400007640000000205011221077621026213 0ustar srichtersrichter############################################################################## # # Copyright (c) 2003 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. # ############################################################################## """Renderer Tests $Id: test_renderers.py 25177 2004-06-02 13:17:31Z jim $ """ import unittest from zope.testing.doctestunit import DocTestSuite def test_suite(): return unittest.TestSuite(( DocTestSuite('zope.app.renderer.plaintext'), DocTestSuite('zope.app.renderer.rest'), DocTestSuite('zope.app.renderer.stx'), )) if __name__ == '__main__': unittest.main(defaultTest='test_suite') zope.app.renderer-3.5.1/src/zope/app/renderer/tests/__init__.py0000644000076400007640000000004011221077621024717 0ustar srichtersrichter# make this directory a package zope.app.renderer-3.5.1/src/zope/app/renderer/plaintext.py0000644000076400007640000000376411232115177024047 0ustar srichtersrichter############################################################################## # # Copyright (c) 2003 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. # ############################################################################## """Plain Text Renderer Classes $Id: plaintext.py 94785 2009-01-17 12:54:26Z nadako $ """ __docformat__ = 'restructuredtext' import cgi from zope.component import adapts from zope.interface import implements from zope.publisher.browser import BrowserView from zope.publisher.interfaces.browser import IBrowserRequest from zope.app.renderer.i18n import ZopeMessageFactory as _ from zope.app.renderer.interfaces import ISource, IHTMLRenderer from zope.app.renderer import SourceFactory class IPlainTextSource(ISource): """Marker interface for a plain text source. Note that an implementation of this interface should always derive from unicode or behave like a unicode class.""" PlainTextSourceFactory = SourceFactory( IPlainTextSource, _("Plain Text"), _("Plain Text Source")) class PlainTextToHTMLRenderer(BrowserView): r"""A view to convert from Plain Text to HTML. Example:: >>> from zope.publisher.browser import TestRequest >>> source = PlainTextSourceFactory(u'I hear that 1 > 2.\n') >>> renderer = PlainTextToHTMLRenderer(source, TestRequest()) >>> renderer.render() u'I hear that 1 > 2.
\n' """ implements(IHTMLRenderer) adapts(IPlainTextSource, IBrowserRequest) def render(self): "See zope.app.interfaces.renderer.IHTMLRenderer" return cgi.escape(self.context).replace('\n', '
\n') zope.app.renderer-3.5.1/src/zope/app/renderer/vocabulary.py0000644000076400007640000000226711221077621024202 0ustar srichtersrichter############################################################################## # # Copyright (c) 2002 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. # ############################################################################## """Vocabulary for the Source Type Registry $Id: vocabulary.py 67630 2006-04-27 00:54:03Z jim $ """ import zope.component from zope.interface import alsoProvides from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm from zope.schema.interfaces import IVocabularyFactory from zope.app.renderer.interfaces import ISource def SourceTypeVocabulary(context): return SimpleVocabulary( [SimpleTerm(name, title=factory.title) for name, factory in zope.component.getFactoriesFor(ISource)]) alsoProvides(SourceTypeVocabulary, IVocabularyFactory) zope.app.renderer-3.5.1/src/zope/app/renderer/interfaces.py0000644000076400007640000000271211221077621024151 0ustar srichtersrichter############################################################################## # # Copyright (c) 2003 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. # ############################################################################## """Renderer Interface Declarations The source renderer takes a special type of string, an ISource, and is able to produce $Id: interfaces.py 25177 2004-06-02 13:17:31Z jim $ """ from zope.interface import Interface class ISource(Interface): """Simple base interface for all possible Wiki Page Source types.""" class ISourceRenderer(Interface): """Object implementing this interface are responsible for rendering an ISource objects to an output format. This is the base class for all possible output types.""" def __init__(self, source): """Initialize the renderer. The source argument is the source code that needs to be converted. """ def render(): """Renders the source into another format.""" class IHTMLRenderer(ISourceRenderer): """Renders an ISource object to HTML.""" zope.app.renderer-3.5.1/src/zope/app/renderer/i18n.py0000644000076400007640000000165311221077621022610 0ustar srichtersrichter############################################################################## # # Copyright (c) 2003 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. # ############################################################################## """Customization of zope.i18n for the Zope application server $Id: i18n.py 73674 2007-03-27 07:52:12Z dobe $ """ __docformat__ = 'restructuredtext' # import this as _ to create i18n messages in the zope domain from zope.i18nmessageid import MessageFactory ZopeMessageFactory = MessageFactory('zope') zope.app.renderer-3.5.1/src/zope/app/renderer/configure.zcml0000644000076400007640000000226011221077621024322 0ustar srichtersrichter zope.app.renderer-3.5.1/src/zope/app/renderer/__init__.py0000644000076400007640000000255711221077621023574 0ustar srichtersrichter############################################################################## # # Copyright (c) 2003 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. # ############################################################################## """Plain Text Renderer Classes $Id: __init__.py 73674 2007-03-27 07:52:12Z dobe $ """ from zope.component.interfaces import IFactory from zope.interface import implements, directlyProvides, Declaration from interfaces import ISource, IHTMLRenderer class Source(unicode): __provides__ = None class SourceFactory(object): """Creates an ISource object.""" implements(IFactory) def __init__(self, iface, title='', description=''): self._iface = iface self.title = title self.description = description def getInterfaces(self): return Declaration(self._iface).flattened() def __call__(self, ustr): source = Source(ustr) directlyProvides(source, self._iface) return source zope.app.renderer-3.5.1/src/zope/app/renderer/stx.py0000644000076400007640000000515411232115177022650 0ustar srichtersrichter############################################################################## # # Copyright (c) 2003 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. # ############################################################################## """Structured Text Renderer Classes $Id: stx.py 94785 2009-01-17 12:54:26Z nadako $ """ __docformat__ = 'restructuredtext' import re from zope.component import adapts from zope.interface import implements from zope.structuredtext.document import Document from zope.structuredtext.html import HTML from zope.publisher.browser import BrowserView from zope.publisher.interfaces.browser import IBrowserRequest from zope.app.renderer.i18n import ZopeMessageFactory as _ from zope.app.renderer.interfaces import ISource, IHTMLRenderer from zope.app.renderer import SourceFactory class IStructuredTextSource(ISource): """Marker interface for a structured text source. Note that an implementation of this interface should always derive from unicode or behave like a unicode class.""" StructuredTextSourceFactory = SourceFactory( IStructuredTextSource, _("Structured Text (STX)"), _("Structured Text (STX) Source")) class StructuredTextToHTMLRenderer(BrowserView): r"""A view to convert from Plain Text to HTML. Example:: >>> from zope.publisher.browser import TestRequest >>> source = StructuredTextSourceFactory(u'This is source.') >>> renderer = StructuredTextToHTMLRenderer(source, TestRequest()) >>> renderer.render() u'

This is source.

\n' Make sure that unicode works as well:: >>> source = StructuredTextSourceFactory(u'This is \xc3\x9c.') >>> renderer = StructuredTextToHTMLRenderer(source, TestRequest()) >>> renderer.render() u'

This is \xc3\x9c.

\n' """ implements(IHTMLRenderer) adapts(IStructuredTextSource, IBrowserRequest) def render(self): "See zope.app.interfaces.renderer.IHTMLRenderer" encoded = self.context.encode('UTF-8') doc = Document()(encoded) html = HTML()(doc) # strip html & body added by some zope versions html = re.sub( r'(?sm)^\n(.*)\n\n',r'\1', html) return html.decode('UTF-8') zope.app.renderer-3.5.1/src/zope/app/__init__.py0000644000076400007640000000031011221077621021747 0ustar srichtersrichter# this is a namespace package try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) zope.app.renderer-3.5.1/src/zope/__init__.py0000644000076400007640000000031011221077621021167 0ustar srichtersrichter# this is a namespace package try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) zope.app.renderer-3.5.1/setup.py0000644000076400007640000000442011232115570017030 0ustar srichtersrichter############################################################################## # # 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. # ############################################################################## """Setup for zope.app.renderer package $Id: setup.py 102160 2009-07-23 17:18:47Z srichter $ """ import os from setuptools import setup, find_packages def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() setup(name='zope.app.renderer', version = '3.5.1', author='Zope Corporation and Contributors', author_email='zope-dev@zope.org', description='Text Renderer Framework', long_description=( read('README.txt') + '\n\n' + read('CHANGES.txt') ), keywords = "zope3 renderer text rest rst stx", 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'], url='http://pypi.python.org/pypi/zope.app.renderer', license='ZPL 2.1', packages=find_packages('src'), package_dir = {'': 'src'}, namespace_packages=['zope', 'zope.app'], extras_require = dict(test=['zope.app.testing']), install_requires=[ 'setuptools', 'docutils>=0.5', 'roman', 'zope.component', 'zope.configuration', 'zope.i18nmessageid', 'zope.interface', 'zope.publisher', 'zope.schema', 'zope.structuredtext', ], include_package_data = True, zip_safe = False, ) zope.app.renderer-3.5.1/buildout.cfg0000644000076400007640000000015211232112135017616 0ustar srichtersrichter[buildout] develop = . parts = test [test] recipe = zc.recipe.testrunner eggs = zope.app.renderer [test] zope.app.renderer-3.5.1/PKG-INFO0000644000076400007640000000353011232115613016412 0ustar srichtersrichterMetadata-Version: 1.0 Name: zope.app.renderer Version: 3.5.1 Summary: Text Renderer Framework Home-page: http://pypi.python.org/pypi/zope.app.renderer Author: Zope Corporation and Contributors Author-email: zope-dev@zope.org License: ZPL 2.1 Description: This package provides a framework to convert a string from one format, such as Structured or Restructured Text, to another, such as HTML. Converters are looked up by adapter and uses other packages to implement the converters. ======= CHANGES ======= 3.5.1 (2009-07-21) ------------------ - Require the new `roman` package, since docutils does not install it correctly. 3.5.0 (2009-01-17) ------------------ - Adapted to docutils 0.5 for ReST rendering: get rid of the ZopeTranslator class, because docutils changed the way it uses translator so previous implementation doesn't work anymore. Instead, use publish_parts and join needed parts in the ``render`` method of the renderer itself. - Removed deprecated meta.zcml stuff and zpkg stuff. - Replaced __used_for__ with zope.component.adapts calls. 3.4.0 (2007-10-27) ------------------ - Initial release independent of the main Zope tree. Keywords: zope3 renderer text rest rst stx Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Zope Public License Classifier: Programming Language :: Python Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP Classifier: Framework :: Zope3 zope.app.renderer-3.5.1/bootstrap.py0000644000076400007640000000337011221077621017712 0ustar srichtersrichter############################################################################## # # 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: bootstrap.py 73676 2007-03-27 07:54:27Z dobe $ """ 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) zope.app.renderer-3.5.1/README.txt0000644000076400007640000000034311221077621017016 0ustar srichtersrichterThis package provides a framework to convert a string from one format, such as Structured or Restructured Text, to another, such as HTML. Converters are looked up by adapter and uses other packages to implement the converters. zope.app.renderer-3.5.1/CHANGES.txt0000644000076400007640000000125311232115527017132 0ustar srichtersrichter======= CHANGES ======= 3.5.1 (2009-07-21) ------------------ - Require the new `roman` package, since docutils does not install it correctly. 3.5.0 (2009-01-17) ------------------ - Adapted to docutils 0.5 for ReST rendering: get rid of the ZopeTranslator class, because docutils changed the way it uses translator so previous implementation doesn't work anymore. Instead, use publish_parts and join needed parts in the ``render`` method of the renderer itself. - Removed deprecated meta.zcml stuff and zpkg stuff. - Replaced __used_for__ with zope.component.adapts calls. 3.4.0 (2007-10-27) ------------------ - Initial release independent of the main Zope tree.