[Erp5-report] r10533 - in /erp5/trunk/bt5/erp5_web: SkinTemplateItem/portal_skins/erp5_web_...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Oct 4 15:13:04 CEST 2006


Author: kevin
Date: Wed Oct  4 15:13:01 2006
New Revision: 10533

URL: http://svn.erp5.org?rev=10533&view=rev
Log:
New ERP5Web_getNiceURI script to transform any string to a Search Engine friendly URI.

Added:
    erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getNiceURI.xml
Modified:
    erp5/trunk/bt5/erp5_web/bt/change_log
    erp5/trunk/bt5/erp5_web/bt/revision
    erp5/trunk/bt5/erp5_web/bt/version

Added: erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getNiceURI.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getNiceURI.xml?rev=10533&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getNiceURI.xml (added)
+++ erp5/trunk/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/ERP5Web_getNiceURI.xml Wed Oct  4 15:13:01 2006
@@ -1,0 +1,171 @@
+<?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>__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 encoding="cdata"><![CDATA[
+
+"""\n
+  This little script transform any string to a nice URI, optimized for Search Engines.\n
+  Transformation example:\n
+    "New Document - 2006 Edition" -> "new-document-2006-edition"\n
+"""\n
+if string == None:\n
+  return None\n
+\n
+nice_uri = \'\'\n
+\n
+for char in string:\n
+  if char.isalnum():\n
+    nice_uri += char.lower()\n
+  elif len(nice_uri) > 0 and nice_uri[-1] != \'-\':\n
+    nice_uri += \'-\'\n
+\n
+return nice_uri\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>_params</string> </key>
+            <value> <string>string=None</string> </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>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>string</string>
+                            <string>None</string>
+                            <string>nice_uri</string>
+                            <string>_getiter_</string>
+                            <string>char</string>
+                            <string>_getattr_</string>
+                            <string>len</string>
+                            <string>_getitem_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <none/>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>ERP5Web_getNiceURI</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_web/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/change_log?rev=10533&r1=10532&r2=10533&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/change_log (original)
+++ erp5/trunk/bt5/erp5_web/bt/change_log Wed Oct  4 15:13:01 2006
@@ -1,3 +1,6 @@
+2006-10-04 Kevin
+* New ERP5Web_getNiceURI script to transform any string to a Search Engine friendly URI.
+
 2006-09-25 Kevin
 * Fix web page web view editable fields.
 * Factorize editable_mode management.

Modified: erp5/trunk/bt5/erp5_web/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/revision?rev=10533&r1=10532&r2=10533&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/revision (original)
+++ erp5/trunk/bt5/erp5_web/bt/revision Wed Oct  4 15:13:01 2006
@@ -1,1 +1,1 @@
-481
+484

Modified: erp5/trunk/bt5/erp5_web/bt/version
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web/bt/version?rev=10533&r1=10532&r2=10533&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web/bt/version (original)
+++ erp5/trunk/bt5/erp5_web/bt/version Wed Oct  4 15:13:01 2006
@@ -1,1 +1,1 @@
-0.3.43
+0.3.44




More information about the Erp5-report mailing list