parameters: (filename,method,arg=None)
return_statement: return result
docstring: builds an html <li> element representing a file. 
      method is a script + a keyword, for ex. url.py?key=
docstring_summary: builds an html <li> element representing a file. 
      method is a script + a keyword, for ex. url.py?key=
docstring_tokens: builds an html <li > element representing a file . method is a script + a keyword for ex . url . py?key =
function: def buildCard(filename,method,arg=None):
  
      """builds an html <li> element representing a file. 
      method is a script + a keyword, for ex. url.py?key="""
  
      result = ""
      if os.path.exists(filename) and isOpenableByFreeCAD(filename):
          basename = os.path.basename(filename)
          if not arg:
              arg = basename
          finfo = getInfo(filename)
          if finfo:
              image = finfo[0]
              size = finfo[1]
              author = finfo[2]
              infostring = TranslationTexts.T_CREATIONDATE+": "+finfo[3] + "\n"
              infostring += TranslationTexts.T_LASTMODIFIED+": "+finfo[4]
              if finfo[5]:
                  infostring += "\n\n" + finfo[5]
              if size:
                  result += '<li class="icon">'
                  result += '<a href="'+method+urllib.parse.quote(arg)+'" title="'+infostring+'">'
                  result += '<img src="file:///'+image.replace('\\','/')+'" alt="'+basename+'">'
                  result += '<div class="caption">'
                  result += '<h4>'+basename+'</h4>'
                  result += '<p>'+author+'</p>'
                  result += '<p>'+size+'</p>'
                  result += '</div>'
                  result += '</a>'
                  result += '</li>'
      return result
function_tokens: def buildCard ( filename , method , arg = None ) : result = "" if os . path . exists ( filename ) and isOpenableByFreeCAD ( filename ) : basename = os . path . basename ( filename ) if not arg : arg = basename finfo = getInfo ( filename ) if finfo : image = finfo [ 0 ] size = finfo [ 1 ] author = finfo [ 2 ] infostring = TranslationTexts . T_CREATIONDATE + ": " + finfo [ 3 ] + "\n" infostring += TranslationTexts . T_LASTMODIFIED + ": " + finfo [ 4 ] if finfo [ 5 ] : infostring += "\n\n" + finfo [ 5 ] if size : result += '<li class="icon">' result += '<a href="' + method + urllib . parse . quote ( arg ) + '" title="' + infostring + '">' result += '<img src="file:///' + image . replace ( '\\' , '/' ) + '" alt="' + basename + '">' result += '<div class="caption">' result += '<h4>' + basename + '</h4>' result += '<p>' + author + '</p>' result += '<p>' + size + '</p>' result += '</div>' result += '</a>' result += '</li>' return result