Index: quintagroup.canonicalpath/tags/0.2/README.txt
===================================================================
--- quintagroup.canonicalpath/tags/0.2/README.txt	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/README.txt	(revision 1263)
@@ -0,0 +1,4 @@
+Introduction
+============
+
+
Index: quintagroup.canonicalpath/tags/0.2/docs/HISTORY.txt
===================================================================
--- quintagroup.canonicalpath/tags/0.2/docs/HISTORY.txt	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/docs/HISTORY.txt	(revision 1263)
@@ -0,0 +1,14 @@
+Changelog
+=========
+
+0.2 (unreleased)
+----------------
+
+- Nothing changed yet.
+
+
+0.1 (2009-03-13)
+----------------
+
+* Initial release
+
Index: quintagroup.canonicalpath/tags/0.2/quintagroup.canonicalpath-configure.zcml
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup.canonicalpath-configure.zcml	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup.canonicalpath-configure.zcml	(revision 1263)
@@ -0,0 +1,1 @@
+<include package="canonicalpath" />
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/__init__.py
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/__init__.py	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/__init__.py	(revision 1263)
@@ -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__)
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/README.txt
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/README.txt	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/README.txt	(revision 1263)
@@ -0,0 +1,14 @@
+quintagroup.canonicalpath Package Readme
+=========================
+
+Overview
+--------
+
+Bring canonical path calculation functionality
+
+
+Your tests here
+---------------
+
+    >>> 1 + 1
+    3
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/__init__.py
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/__init__.py	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/__init__.py	(revision 1263)
@@ -0,0 +1,3 @@
+#
+
+import catalog
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/adapters.py
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/adapters.py	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/adapters.py	(revision 1263)
@@ -0,0 +1,21 @@
+from zope.interface import implements
+from zope.component import adapts
+
+from Products.CMFCore.utils import getToolByName
+from Products.Archetypes.interfaces import IBaseContent
+
+from interfaces import ICanonicalPath
+
+
+class canonicalPathAdapter(object):
+    """Adapts base content to canonical path.
+    """
+    adapts(IBaseContent)
+    implements(ICanonicalPath)
+
+    def __init__(self, context):
+        self.context = context
+
+    def canonical_path(self):
+        purl = getToolByName(self.context,'portal_url')
+        return '/'+'/'.join(purl.getRelativeContentPath(self.context))
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/catalog.py
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/catalog.py	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/catalog.py	(revision 1263)
@@ -0,0 +1,15 @@
+from zope.component import queryAdapter
+from Products.CMFPlone.CatalogTool import registerIndexableAttribute
+
+from interfaces import ICanonicalPath
+
+
+def canonical_path(obj, portal, **kwargs):
+    """Return canonical_path property for the object.
+    """
+    cpath = queryAdapter(obj, interface=ICanonicalPath)
+    if cpath:
+        return cpath.canonical_path()
+    return None
+
+registerIndexableAttribute('canonical_path', canonical_path)
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/configure.zcml
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/configure.zcml	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/configure.zcml	(revision 1263)
@@ -0,0 +1,21 @@
+<configure
+    xmlns="http://namespaces.zope.org/zope"
+    xmlns:five="http://namespaces.zope.org/five"
+    xmlns:genericsetup="http://namespaces.zope.org/genericsetup">
+
+  <!-- Include dependent packages -->
+  <include package="archetypes.schemaextender" />
+
+  <adapter
+	factory=".adapters.canonicalPathAdapter"
+	/>
+
+  <genericsetup:registerProfile
+      name="default"
+      title="Canonical Path product"
+      directory="profiles/default"
+      description="Load catalog support for Canonoical Path."
+      provides="Products.GenericSetup.interfaces.EXTENSION"
+      />
+
+</configure>
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/interfaces.py
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/interfaces.py	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/interfaces.py	(revision 1263)
@@ -0,0 +1,9 @@
+from zope.interface import Interface
+
+class ICanonicalPath(Interface):
+    """canonical_path provider interface
+    """
+
+    def canonical_path():
+        """Return canonical path for the object
+        """
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/profiles/default/catalog.xml
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/profiles/default/catalog.xml	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/profiles/default/catalog.xml	(revision 1263)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<object name="portal_catalog" meta_type="Plone Catalog Tool">
+ <column value="canonical_path"/>
+</object>
+
+
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/profiles/default/metadata.xml
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/profiles/default/metadata.xml	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/profiles/default/metadata.xml	(revision 1263)
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<metadata>
+  <version>0.1</version>
+</metadata>
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/tests.py
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/tests.py	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/tests.py	(revision 1263)
@@ -0,0 +1,30 @@
+import unittest
+
+from zope.testing import doctestunit
+from zope.component import testing
+from Testing import ZopeTestCase as ztc
+
+def test_suite():
+    return unittest.TestSuite([
+
+        # Unit tests for your API
+        doctestunit.DocFileSuite(
+            'README.txt', package='quintagroup.canonicalpath',
+            setUp=testing.setUp, tearDown=testing.tearDown),
+
+        #doctestunit.DocTestSuite(
+        #    module='quintagroup.canonicalpath.mymodule',
+        #    setUp=testing.setUp, tearDown=testing.tearDown),
+
+        # Integration tests that use ZopeTestCase
+        #ztc.ZopeDocFileSuite(
+        #    'README.txt', package='quintagroup.canonicalpath',
+        #    setUp=testing.setUp, tearDown=testing.tearDown),
+
+        #ztc.FunctionalDocFileSuite(
+        #    'browser.txt', package='quintagroup.canonicalpath'),
+
+        ])
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')
Index: quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/version.txt
===================================================================
--- quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/version.txt	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/quintagroup/canonicalpath/version.txt	(revision 1263)
@@ -0,0 +1,1 @@
+0.2
Index: quintagroup.canonicalpath/tags/0.2/setup.cfg
===================================================================
--- quintagroup.canonicalpath/tags/0.2/setup.cfg	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/setup.cfg	(revision 1263)
@@ -0,0 +1,3 @@
+[egg_info]
+tag_build = dev
+tag_svn_revision = true
Index: quintagroup.canonicalpath/tags/0.2/setup.py
===================================================================
--- quintagroup.canonicalpath/tags/0.2/setup.py	(revision 1263)
+++ quintagroup.canonicalpath/tags/0.2/setup.py	(revision 1263)
@@ -0,0 +1,33 @@
+from setuptools import setup, find_packages
+import os
+
+version = '0.2'
+
+setup(name='quintagroup.canonicalpath',
+      version=version,
+      description="Bring canonical path calculation functionality",
+      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=[
+        "Programming Language :: Python",
+        "Topic :: Software Development :: Libraries :: Python Modules",
+        ],
+      keywords='canonical path plone quintagroup',
+      author='Quintagroup',
+      author_email='support@quintagroup.com',
+      url='http://svn.quintagroup.com/products/quintagroup.canonicalpath',
+      license='GPL',
+      packages=find_packages(exclude=['ez_setup']),
+      namespace_packages=['quintagroup'],
+      include_package_data=True,
+      zip_safe=False,
+      install_requires=[
+          'setuptools',
+          'archetypes.schemaextender',
+      ],
+      entry_points="""
+      # -*- Entry points: -*-
+      """,
+      )
+ 
