original_docstring: Creates the header of the report
docstring: Creates the header of the report
docstring_tokens: Creates the header of the report
code: def create_header(model, no_moles, **kwargs):
      'Creates the header of the report'
  
      story = []
      if 'id' in kwargs and kwargs['id'] is not None:
          story.append(Paragraph('Synthesis ID: {0:d}'.format(kwargs['id']),
                                 styles['LeftJ']))
      date = datetime.datetime.now().strftime("%H:%M:%S %d.%m.%Y")
      story.append(Paragraph(date, styles['RightJ']))
      story.append(Paragraph(kwargs['title'], styles['BlueTitle']))
      story.append(Spacer(1, 16))
      if no_moles:
          story.append(Paragraph(r' : '.join(['{0}'.format(x.html_label()) for x in model.components]), styles['Compo']))
      else:
          story.append(Paragraph(r' : '.join(['{0}{1}'.format(x.moles, x.html_label()) for x in model.components]), styles['Compo']))
      story.append(Spacer(1, 12))
      story.append(Paragraph(kwargs['author'], styles['CenterJ']))
      return story
code_tokens: def create_header ( model , no_moles , ** kwargs ) : story = [ ] if 'id' in kwargs and kwargs [ 'id' ] is not None : story . append ( Paragraph ( 'Synthesis ID: {0:d}' . format ( kwargs [ 'id' ] ) , styles [ 'LeftJ' ] ) ) date = datetime . datetime . now ( ) . strftime ( "%H:%M:%S %d.%m.%Y" ) story . append ( Paragraph ( date , styles [ 'RightJ' ] ) ) story . append ( Paragraph ( kwargs [ 'title' ] , styles [ 'BlueTitle' ] ) ) story . append ( Spacer ( 1 , 16 ) ) if no_moles : story . append ( Paragraph ( r' : ' . join ( [ '{0}' . format ( x . html_label ( ) ) for x in model . components ] ) , styles [ 'Compo' ] ) ) else : story . append ( Paragraph ( r' : ' . join ( [ '{0}{1}' . format ( x . moles , x . html_label ( ) ) for x in model . components ] ) , styles [ 'Compo' ] ) ) story . append ( Spacer ( 1 , 12 ) ) story . append ( Paragraph ( kwargs [ 'author' ] , styles [ 'CenterJ' ] ) ) return story
short_docstring: Creates the header of the report
short_docstring_tokens: Creates the header of the report
comment: 'Creates the header of the report'