<commit_before>#! /bin/sh
#
# A shell script to post-process doxy-generated files; the purpose
# is to make the menu on the left in the file match the actually
# generated files (ie. leave out namespaces if there are none).
#
# Usage: doxyndex.sh <html-output-directory>

echo "Postprocessing files in $1"

MENU="<ul>"

# This is a list of pairs, with / separators so we can use basename
# and dirname (a crude shell hack) to split them into parts. For
# each, if the file part exists (as a html file) tack it onto the
# MENU variable as a <li> with link.
for i in "Main Page/index" \
	"Namespace List/namespaces" \
	"Class Hierarchy/hierarchy" \
	"Alphabetical List/classes" \
	"Class List/annotated" \
	"File List/files" \
	"Namespace Members/namespacemembers" \
	"Class Members/functions"
do
	NAME=`dirname "$i"`
	FILE=`basename "$i"`
	test -f "$1/$FILE.html" && MENU="$MENU<li><a href=\"$FILE.html\">$NAME</a></li>"
done

MENU="$MENU</ul>"

# Now substitute in the MENU in every file. This depends
# on HTML_HEADER (ie. header.html) containing the <!-- menu --> comment.
for i in "$1"/*.html
do
	sed -e "s+<!-- menu -->+$MENU+" < "$i" > "$i.new"
	mv "$i.new" "$i"
done
<commit_msg>Forgot modules<commit_after>#! /bin/sh
#
# A shell script to post-process doxy-generated files; the purpose
# is to make the menu on the left in the file match the actually
# generated files (ie. leave out namespaces if there are none).
#
# Usage: doxyndex.sh <html-output-directory>

echo "Postprocessing files in $1"

MENU="<ul>"

# This is a list of pairs, with / separators so we can use basename
# and dirname (a crude shell hack) to split them into parts. For
# each, if the file part exists (as a html file) tack it onto the
# MENU variable as a <li> with link.
for i in "Main Page/index" \
	"Modules/modules" \
	"Namespace List/namespaces" \
	"Class Hierarchy/hierarchy" \
	"Alphabetical List/classes" \
	"Class List/annotated" \
	"File List/files" \
	"Namespace Members/namespacemembers" \
	"Class Members/functions"
do
	NAME=`dirname "$i"`
	FILE=`basename "$i"`
	test -f "$1/$FILE.html" && MENU="$MENU<li><a href=\"$FILE.html\">$NAME</a></li>"
done

MENU="$MENU</ul>"

# Now substitute in the MENU in every file. This depends
# on HTML_HEADER (ie. header.html) containing the <!-- menu --> comment.
for i in "$1"/*.html
do
	sed -e "s+<!-- menu -->+$MENU+" < "$i" > "$i.new"
	mv "$i.new" "$i"
done

{'fraction_non_alphanumeric': 0.15301003344481606, 'fraction_numerical': 0.002508361204013378, 'mean_word_length': 3.719921104536489, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6771667', 'n_tokens_mistral': 860, 'n_tokens_neox': 839, 'n_words': 312}