parameters: (self, REQUEST=None, csv=0, all=0)
return_statement: return msg
docstring: Check if the name of each skin follows the naming convention.
docstring_summary: Check if the name of each skin follows the naming convention.
docstring_tokens: Check if the name of each skin follows the naming convention .
function: def checkSkinNames(self, REQUEST=None, csv=0, all=0):
    """
      Check if the name of each skin follows the naming convention.
    """
    if csv:
      msg = 'Folder,Name,New Name,Meta Type\n'
    else:
      msg = '<html><body>'
    rexp = re.compile('^[A-Z][a-zA-Z0-9]*_[a-z][a-zA-Z0-9]*$')
    rexp_zsql = re.compile('^[A-Z][a-zA-Z0-9]*_z[A-Z][a-zA-Z0-9]*$')
    path_list = getSkinPathList(self)
    bad_list = []
    for path in path_list:
      name = path.split('/')[-1]
      skin = self.portal_skins.restrictedTraverse(path)
      if skin.meta_type in ('Filesystem Z SQL Method', 'Z SQL Method'):
        r = rexp_zsql
      else:
        r = rexp
      if all or r.search(name) is None:
        bad_list.append((path, skin.meta_type))
    if len(bad_list) == 0:
      if not csv:
        msg += '<p>Everything is fine.</p>\n'
    else:
      bad_list.sort()
      if not csv:
        msg += '<p>These %d skins do not follow the naming convention:</p><table width="100%%">\n' % len(bad_list)
        msg += '<tr><td>Folder</td><td>Skin Name</td><td>Meta Type</td></tr>\n'
      i = 0
      for path,meta_type in bad_list:
        name = path.split('/')[-1]
        suggested_name = suggestName(name, meta_type)
        folder = path[:-len(name)-1]
        if (i % 2) == 0:
          c = '#88dddd'
        else:
          c = '#dddd88'
        i += 1
        if csv:
          msg += '%s,%s,%s,%s\n' % (folder, name, suggested_name, meta_type)
        else:
          msg += '<tr bgcolor="%s"><td>%s</td><td>%s</td><td>%s</td></tr>\n' % (c, folder, name, meta_type)
      if not csv:
        msg += '</table>\n'
    if not csv:
      msg += '</body></html>'
    return msg
function_tokens: def checkSkinNames ( self , REQUEST = None , csv = 0 , all = 0 ) : if csv : msg = 'Folder,Name,New Name,Meta Type\n' else : msg = '<html><body>' rexp = re . compile ( '^[A-Z][a-zA-Z0-9]*_[a-z][a-zA-Z0-9]*$' ) rexp_zsql = re . compile ( '^[A-Z][a-zA-Z0-9]*_z[A-Z][a-zA-Z0-9]*$' ) path_list = getSkinPathList ( self ) bad_list = [ ] for path in path_list : name = path . split ( '/' ) [ - 1 ] skin = self . portal_skins . restrictedTraverse ( path ) if skin . meta_type in ( 'Filesystem Z SQL Method' , 'Z SQL Method' ) : r = rexp_zsql else : r = rexp if all or r . search ( name ) is None : bad_list . append ( ( path , skin . meta_type ) ) if len ( bad_list ) == 0 : if not csv : msg += '<p>Everything is fine.</p>\n' else : bad_list . sort ( ) if not csv : msg += '<p>These %d skins do not follow the naming convention:</p><table width="100%%">\n' % len ( bad_list ) msg += '<tr><td>Folder</td><td>Skin Name</td><td>Meta Type</td></tr>\n' i = 0 for path , meta_type in bad_list : name = path . split ( '/' ) [ - 1 ] suggested_name = suggestName ( name , meta_type ) folder = path [ : - len ( name ) - 1 ] if ( i % 2 ) == 0 : c = '#88dddd' else : c = '#dddd88' i += 1 if csv : msg += '%s,%s,%s,%s\n' % ( folder , name , suggested_name , meta_type ) else : msg += '<tr bgcolor="%s"><td>%s</td><td>%s</td><td>%s</td></tr>\n' % ( c , folder , name , meta_type ) if not csv : msg += '</table>\n' if not csv : msg += '</body></html>' return msg