def build_index(journal_list):
  """Create an index.html file for HTML output from journal list.

  Args:
    journal_list: [array of path] Path to the journal files to put in the index.
       Assumes that there is a corresponding .html file for each to link to.
  """
  document_manager = HtmlDocumentManager(title='Journal Summary')
  document_manager.has_key = False
  document_manager.has_global_expand = False

  processor = HtmlIndexRenderer(document_manager)
  for journal in journal_list:
    processor.process(journal)
  processor.terminate()

  tr = document_manager.make_tag_container(
      'tr',
      [document_manager.make_tag_text('th', name)
       for name in processor.output_column_names])
  table = document_manager.make_tag_container(
      'table', [tr], style='font-size:12pt')
  document_manager.wrap_tag(table)

  document_manager.build_to_path('index.html')
def build_index(journal_list, output_dir):
    """Create an index.html file for HTML output from journal list.

  Args:
    journal_list: [array of path] Path to the journal files to put in the index.
       Assumes that there is a corresponding .html file for each to link to.
  """
    document_manager = HtmlDocumentManager(title='Journal Summary')
    document_manager.has_key = False
    document_manager.has_global_expand = False

    processor = HtmlIndexRenderer(document_manager)
    for journal in journal_list:
        processor.process(StreamJournalNavigator.new_from_path(journal))
    processor.terminate()

    tr_tag = document_manager.make_tag_container('tr', [
        document_manager.make_tag_text('th', name)
        for name in processor.output_column_names
    ])
    table = document_manager.make_tag_container('table', [tr_tag],
                                                style='font-size:12pt')
    document_manager.wrap_tag(table)

    document_manager.build_to_path(os.path.join(output_dir, 'index.html'))
def build_table(journal_list, output_dir):
  document_manager = HtmlDocumentManager(title='Journal Summary')
  document_manager.has_key = False
  document_manager.has_global_expand = False

  HtmlIndexTableRenderer.process_all(document_manager, journal_list, output_dir)
  document_manager.build_to_path(os.path.join(output_dir, 'table_index.html'))
def build_table(journal_list, output_dir):
    document_manager = HtmlDocumentManager(title='Journal Summary')
    document_manager.has_key = False
    document_manager.has_global_expand = False

    HtmlIndexTableRenderer.process_all(document_manager, journal_list,
                                       output_dir)
    document_manager.build_to_path(os.path.join(output_dir,
                                                'table_index.html'))