Commit 53251f01 authored by Bartek Górny's avatar Bartek Górny

Added RSS support to document_folder (requires a change to...

Added RSS support to document_folder (requires a change to ERP5Type.Document.Folder.Folder - not committed yet, and enabling RSS support sitewide and for module)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11331 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 18ec7f8f
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_bindings_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_cache_settings_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_permissions_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_WebDAV_Locks_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_properties_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Take_ownership_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Undo_changes_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_View_management_screens_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Lock_items_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Unlock_items_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_access_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from ZTUtils import Batch\n
from ZTUtils import LazyFilter\n
from Products.CMFCore.utils import getToolByName\n
from Products.CMFDefault.utils import toUnicode\n
\n
req=context.REQUEST\n
login,password=(req.get(\'login\'),req.get(\'password\'))\n
if login is not None and password is not None:\n
context.REQUEST.set(\'__ac_name\',login)\n
context.REQUEST.set(\'__ac_password\',password)\n
context.portal_skins.updateSkinCookie()\n
context.setupCurrentSkin(context.REQUEST)\n
\n
context.log(context.portal_membership.isAnonymousUser())\n
ptool = getToolByName(script, \'portal_properties\')\n
stool = getToolByName(script, \'portal_syndication\')\n
\n
\n
if not stool.isSyndicationAllowed(context):\n
context.REQUEST.RESPONSE.redirect(context.absolute_url() +\n
\'/rssDisabled?portal_status_message=Syndication+is+Disabled\')\n
return\n
\n
\n
options = {}\n
\n
options[\'channel_info\'] = { \'base\': stool.getHTML4UpdateBase(context),\n
\'description\': context.Description(),\n
\'frequency\': stool.getUpdateFrequency(context),\n
\'period\': stool.getUpdatePeriod(context),\n
\'title\': context.Title(),\n
\'url\': context.absolute_url() }\n
\n
key, reverse = context.getDefaultSorting()\n
items = stool.getSyndicatableContent(context)\n
items = sequence.sort( items, ((key, \'cmp\', reverse and \'desc\' or \'asc\'),) )\n
items = LazyFilter(items, skip=\'View\')\n
b_size = stool.getMaxItems(context)\n
batch_obj = Batch(items, b_size, 0, orphan=0)\n
items = []\n
for item in batch_obj:\n
ptype=item.getPortalType()\n
if ptype==\'Memo\':state=item.getMemoState()\n
else:state=item.getSimulationState()\n
descr=\'\'\n
if item.getVersion(): descr+=\'version: %s;\' % item.getVersion()\n
if item.getLanguage(): descr+=\' language: %s; \' % item.getLanguage()\n
if item.getDescription(): descr+=item.getDescription()\n
items.append( { \'date\': item.modified().HTML4(),\n
\'description\': descr,\n
\'listCreators\': item.listCreators(),\n
\'listSubjects\': item.getSubject(),\n
\'publisher\': item.Publisher(),\n
\'rights\': item.Rights(),\n
\'title\': \'%s / %s (%s) - %s\' % (item.Title(),item.getReference() or item.getId(),ptype,state),\n
\'url\': item.absolute_url(),\n
\'portal_type\':item.getPortalType(),\n
\'id\':item.getId(),\n
} )\n
options[\'listItemInfos\'] = tuple(items)\n
\n
options = toUnicode( options, ptool.getProperty(\'default_charset\', None) )\n
return context.RSS_template(**options)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>ZTUtils</string>
<string>Batch</string>
<string>LazyFilter</string>
<string>Products.CMFCore.utils</string>
<string>getToolByName</string>
<string>Products.CMFDefault.utils</string>
<string>toUnicode</string>
<string>_getattr_</string>
<string>context</string>
<string>req</string>
<string>_getiter_</string>
<string>login</string>
<string>password</string>
<string>None</string>
<string>script</string>
<string>ptool</string>
<string>stool</string>
<string>options</string>
<string>_write_</string>
<string>key</string>
<string>reverse</string>
<string>items</string>
<string>sequence</string>
<string>b_size</string>
<string>batch_obj</string>
<string>item</string>
<string>ptype</string>
<string>state</string>
<string>descr</string>
<string>tuple</string>
<string>_apply_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>RSS</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PageTemplates.ZopePageTemplate</string>
<string>ZopePageTemplate</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_bindings_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_cache_settings_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Change_permissions_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_FTP_access_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_WebDAV_Locks_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Manage_properties_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Take_ownership_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_Undo_changes_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_View_management_screens_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Lock_items_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_Unlock_items_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>_WebDAV_access_Permission</string> </key>
<value>
<list>
<string>Manager</string>
</list>
</value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<?xml version="1.0"?>\n
<rdf:RDF\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n
xmlns:dc="http://purl.org/dc/elements/1.1/"\n
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"\n
xmlns="http://purl.org/rss/1.0/">\n
<channel rdf:about="URL"\n
tal:define="channel_info options/channel_info"\n
tal:attributes="rdf:about channel_info/url">\n
<title tal:content="channel_info/title">TITLE</title>\n
<link tal:content="channel_info/url">URL</link>\n
<description\n
tal:content="channel_info/description">DESCRIPTION</description>\n
<image rdf:resource="logo.png" />\n
<sy:updatePeriod\n
tal:content="channel_info/period">PERIOD</sy:updatePeriod>\n
<sy:updateFrequency\n
tal:content="channel_info/frequency">N</sy:updateFrequency>\n
<sy:updateBase\n
tal:content="channel_info/base">YYYY-MM-DDTHH:MM:SSZ</sy:updateBase>\n
<items>\n
<rdf:Seq>\n
<rdf:li resource="URL"\n
tal:repeat="item_info options/listItemInfos"\n
tal:attributes="resource item_info/url" />\n
</rdf:Seq>\n
</items>\n
</channel>\n
<item rdf:about="URL"\n
tal:repeat="item_info options/listItemInfos"\n
tal:attributes="rdf:about item_info/url">\n
<title tal:content="item_info/title">TITLE</title>\n
<link tal:content="item_info/url">URL</link>\n
<description\n
tal:condition="item_info/description"\n
tal:content="item_info/description">DESCRIPTION</description>\n
<dc:publisher\n
tal:condition="item_info/publisher"\n
tal:content="item_info/publisher">PUBLISHER</dc:publisher>\n
<dc:creator\n
tal:repeat="creator item_info/listCreators"\n
tal:content="creator">CREATOR</dc:creator>\n
<dc:rights\n
tal:condition="item_info/rights"\n
tal:content="item_info/rights">RIGHTS</dc:rights>\n
<dc:subject\n
tal:repeat="subject item_info/listSubjects"\n
tal:content="subject">SUBJECT</dc:subject>\n
<dc:date tal:content="item_info/date">YYYY-MM-DDTHH:MM:SSZ</dc:date>\n
</item>\n
</rdf:RDF>\n
]]></string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/xml; charset=utf-8</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>RSS_template</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2006-11-15
Added RSS support to document_folder
2006-11-08
Reading doc properties from content and from email text upon ingestion
......
337
\ No newline at end of file
341
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment