<commit_before>#!/bin/bash

# This script creates a single html file of all the .bib files
# passed in the year_names array below.  Make sure there is a
# corresponding entry in the year_numbers array as well.  Why
# not just name the bib files 2009.bib etc?  For some reason
# multibib can't handle filenames with numbers in them.

# This script requires bibtex2html (see associated Makefile and
# libmesh_html rule)
if [ "x`which bibtex2html`" == "x" ]; then
  echo "bibtex2html is required to create the website!";
  exit 1;
fi

# Declare array of year names and numbers.  Zero-based indexing!
year_names=( libmesh theses preprints fifteen fourteen thirteen twelve eleven ten nine eight seven six five four )
year_numbers=( 'Please use the following citation to reference libMesh' 'Dissertations & Theses' Preprints 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2004 )
link_names=( 'skip me' 'Dissertations' 'Preprints' 'Articles' )

# Length of the arrays
N=${#year_names[@]}
# echo "N=$N"

# Remove previous file, if it exists
if [ -f master.html ]; then
  rm master.html
fi

for ((i=0; i < $N ; i++))
do
  # echo $i
  make libmesh_html SOURCE=${year_names[$i]}.bib

  # Add header
  # echo "<h2>${year_numbers[$i]}</h2>" >> master.html

  # Ben added links to some of these headers so they can
  # be accessed from the left navigation pane on the actual
  # site...
  if [ $i -gt 0 ]; then
    if [ $i -lt 4 ]; then
      echo "<a name=\"${link_names[$i]}\"></a>" >> master.html
    fi
  fi

  echo "<h2>${year_numbers[$i]}</h2>" >> master.html

  # Combine
  cat ${year_names[$i]}.html >> master.html
done

# The name of the final file that we will produce
final_file=publications.html

# Create publications.html by adding header/footer
if [ -f $final_file ]; then
  rm $final_file
fi

# Paste the contents of doc/html/src/simple_header.html here
cat ../html/src/simple_header.html >> $final_file

# Inject all the references
cat master.html >> $final_file

# Paste the contents of doc/html/src/simple_footer.html here
cat ../html/src/simple_footer.html >> $final_file<commit_msg>rely on common header for src/foo.html<commit_after>#!/bin/bash

# This script creates a single html file of all the .bib files
# passed in the year_names array below.  Make sure there is a
# corresponding entry in the year_numbers array as well.  Why
# not just name the bib files 2009.bib etc?  For some reason
# multibib can't handle filenames with numbers in them.

# This script requires bibtex2html (see associated Makefile and
# libmesh_html rule)
if [ "x`which bibtex2html`" == "x" ]; then
  echo "bibtex2html is required to create the website!";
  exit 1;
fi

# Declare array of year names and numbers.  Zero-based indexing!
year_names=( libmesh theses preprints fifteen fourteen thirteen twelve eleven ten nine eight seven six five four )
year_numbers=( 'Please use the following citation to reference libMesh' 'Dissertations & Theses' Preprints 2015 2014 2013 2012 2011 2010 2009 2008 2007 2006 2005 2004 )
link_names=( 'skip me' 'Dissertations' 'Preprints' 'Articles' )

# Length of the arrays
N=${#year_names[@]}
# echo "N=$N"

# Remove previous file, if it exists
if [ -f master.html ]; then
  rm master.html
fi

for ((i=0; i < $N ; i++))
do
  # echo $i
  make libmesh_html SOURCE=${year_names[$i]}.bib

  # Add header
  # echo "<h2>${year_numbers[$i]}</h2>" >> master.html

  # Ben added links to some of these headers so they can
  # be accessed from the left navigation pane on the actual
  # site...
  if [ $i -gt 0 ]; then
    if [ $i -lt 4 ]; then
      echo "<a name=\"${link_names[$i]}\"></a>" >> master.html
    fi
  fi

  echo "<h2>${year_numbers[$i]}</h2>" >> master.html

  # Combine
  cat ${year_names[$i]}.html >> master.html
done

# The name of the final file that we will produce
final_file=src/publications.html

# Create publications.html
if [ -f $final_file ]; then
  rm $final_file
fi

# Inject all the references
cat master.html >> $final_file
{'fraction_non_alphanumeric': 0.11169811320754718, 'fraction_numerical': 0.03169811320754717, 'mean_word_length': 3.878527607361963, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3843965', 'n_tokens_mistral': 1406, 'n_tokens_neox': 1250, 'n_words': 509}