<commit_before>#!/bin/bash
# This script will generate documentation for the current version


VERSION="2.3.1a" #`python3 -c "import json; f = open('./package.json', 'r'); v = json.loads(f.read())['version']; f.close(); print(v)"`

rm -R .typedoc

# Ensure we fail if any of these commands fail
set -e

yarn gendoc

git checkout gh-pages
mv .typedoc/ $VERSION/
sed "6i\n<li><a href=\"$VERSION/index.html\">$VERSION</a></li>" index.html > index.html.new
rm index.html
mv index.html.new index.html

git add "$VERSION/"
git add index.html
# git commit -m "Add documentation for $VERSION"
# git push<commit_msg>Finish up script<commit_after>#!/bin/bash
# This script will generate documentation for the current version

VERSION=`python3 -c "import json; f = open('./package.json', 'r'); v = json.loads(f.read())['version']; f.close(); print(v)"`

# Ensure we fail if any of these commands fail
set -e

yarn gendoc

git checkout gh-pages
mv .typedoc/ $VERSION/
sed "6i\    <li><a href=\"$VERSION/index.html\">$VERSION</a></li>" index.html > index.html.new
rm index.html
mv index.html.new index.html

git add "$VERSION/"
git add index.html
git commit -m "Add documentation for $VERSION"
git push
{'fraction_non_alphanumeric': 0.16063919259882253, 'fraction_numerical': 0.005887300252312868, 'mean_word_length': 4.1965065502183405, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '3186263', 'n_tokens_mistral': 410, 'n_tokens_neox': 404, 'n_words': 136}