Commit 73aef12e authored by Romain Courteaud's avatar Romain Courteaud

erp5_corporate_identity*: activate coding style

parent 807b1fe0
......@@ -90,9 +90,6 @@ book_title = html_quote(override_document_title) if override_document_title else
if isinstance(book_content, unicode):
book_content = book_content.encode("UTF-8")
# backcompat
book_history_section_list = re.findall('<section*?>.+?</section>', book_content, re.S)
# override for tests
if override_batch_mode:
book_modification_date = DateTime("1976-11-04")
......
......@@ -48,8 +48,8 @@ def getDetails(my_content):
def getDetailsList(my_slide):
return re.findall(r'<details.*?>.*?<\/details>', my_slide, re.S)
def getNestedSection(my_content):
return my_content.find("<section") > -1
#def getNestedSection(my_content):
# return my_content.find("<section") > -1
def splitMultipleDetails(my_content):
for slide in getSlideDetailsList(my_content):
......@@ -63,13 +63,13 @@ def splitMultipleDetails(my_content):
my_content = my_content.replace(detail, ''.join([detail, details_separator]))
return my_content
def removeSlidesWithoutDetailsFromNotes(my_content):
for slide in getSlideList(my_content):
if getNestedSection(slide) == False:
my_content = my_content.replace(slide, blank)
content = my_content.replace('<section></section>', blank)
content = re.sub(r'<section class="[^"]*"></section>', blank, content)
return content
#def removeSlidesWithoutDetailsFromNotes(my_content):
# for slide in getSlideList(my_content):
# if getNestedSection(slide) == False:
# my_content = my_content.replace(slide, blank)
# content = my_content.replace('<section></section>', blank)
# content = re.sub(r'<section class="[^"]*"></section>', blank, content)
# return content
#def removeSectionTags(my_content):
# content = re.sub(r'<section class="[^"]*">', blank, my_content)
......
......@@ -22,8 +22,10 @@ def getUid(publication_section):
publication_section_smallcaps = publication_section.lower()
return portal.portal_categories.publication_section[publication_section_smallcaps].getUid()
if len(publication_section_list) > 0:
publication_section_uid_list = map(lambda x:getUid(x), publication_section_list)
if publication_section_list is None:
publication_section_uid_list = []
else:
publication_section_uid_list = [getUid(x) for x in publication_section_list]
# beware of different dates: modificatio_date, creation_date, effective_date
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>upper_limit=4, publication_section_list=[]</string> </value>
<value> <string>upper_limit=4, publication_section_list=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
"""
================================================================================
Add this script to custom skin selection to update test comparison files
================================================================================
"""
# parameters (* default)
# ------------------------------------------------------------------------------
return True
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>xxxZuite_setSkipSave</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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