<commit_before>#!/bin/bash
#
# Script to change links due to read-the-docs limitation in 2nd level sections

# arg1: search pattern
# arg2: replace string
# arg3: file in which replace
function changelink {
   grep "$1" $3 &> /dev/null
   if [ $? -eq 0 ]; then
     # echo "Replacing \"$1\" by \"$2\" in \"$3\""
     sed -i "s,$1,$2," $3
   fi
}

# ./build/html/mastering_kurento.html
changelink "#kurento-architecture" "mastering/kurento_architecture.html" "./build/html/mastering_kurento.html"
changelink "#kurento-api-reference" "mastering/kurento_API.html" "./build/html/mastering_kurento.html"
changelink "#kurento-protocol" "mastering/kurento_protocol.html" "./build/html/mastering_kurento.html"
changelink "#advanced-installation-guide" "mastering/advanced_installation_guide.html" "./build/html/mastering_kurento.html"
changelink "#working-with-nightly-builds" "mastering/kurento_development.html" "./build/html/mastering_kurento.html"
changelink "#kurento-modules" "mastering/kurento_modules.html" "./build/html/mastering_kurento.html"
changelink "#kurento-java-client-javadoc" "langdoc/javadoc/index.html" "./build/html/mastering_kurento.html"
changelink "#kurento-javascript-client-jsdoc" "langdoc/jsdoc/kurento-client-js/index.html" "./build/html/mastering_kurento.html"
changelink "#kurento-javascript-utils-jsdoc" "langdoc/jsdoc/kurento-utils-js/index.html" "./build/html/mastering_kurento.html"

# ./build/html/mastering/*.html
files=(kurento_architecture kurento_API kurento_protocol advanced_installation_guide kurento_development kurento_modules develop_kurento_modules)
for i in ${files[@]}
do
   changelink "mastering_kurento.html#kurento-architecture" "mastering/kurento_architecture.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-api-reference" "mastering/kurento_API.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-protocol" "mastering/kurento_protocol.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#advanced-installation-guide" "mastering/advanced_installation_guide.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#working-with-nightly-builds" "mastering/kurento_development.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-modules" "mastering/kurento_modules.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-java-client-javadoc" "langdoc/javadoc/index.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-javascript-client-jsdoc" "langdoc/jsdoc/kurento-client-js/index.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-javascript-utils-jsdoc" "langdoc/jsdoc/kurento-utils-js/index.html" "./build/html/mastering/${i}.html"
done<commit_msg>Added index.html links to fixlinks.sh script<commit_after>#!/bin/bash
#
# Script to change links due to read-the-docs limitation in 2nd level sections

# arg1: search pattern
# arg2: replace string
# arg3: file in which replace
function changelink {
   grep "$1" $3 &> /dev/null
   if [ $? -eq 0 ]; then
     # echo "Replacing \"$1\" by \"$2\" in \"$3\""
     sed -i "s,$1,$2," $3
   fi
}

# ./build/html/mastering_kurento.html
changelink "#kurento-architecture" "mastering/kurento_architecture.html" "./build/html/mastering_kurento.html"
changelink "#kurento-api-reference" "mastering/kurento_API.html" "./build/html/mastering_kurento.html"
changelink "#kurento-protocol" "mastering/kurento_protocol.html" "./build/html/mastering_kurento.html"
changelink "#advanced-installation-guide" "mastering/advanced_installation_guide.html" "./build/html/mastering_kurento.html"
changelink "#working-with-nightly-builds" "mastering/kurento_development.html" "./build/html/mastering_kurento.html"
changelink "#kurento-modules" "mastering/kurento_modules.html" "./build/html/mastering_kurento.html"
changelink "#kurento-java-client-javadoc" "langdoc/javadoc/index.html" "./build/html/mastering_kurento.html"
changelink "#kurento-javascript-client-jsdoc" "langdoc/jsdoc/kurento-client-js/index.html" "./build/html/mastering_kurento.html"
changelink "#kurento-javascript-utils-jsdoc" "langdoc/jsdoc/kurento-utils-js/index.html" "./build/html/mastering_kurento.html"

# ./build/html/index.html
changelink "mastering_kurento.html#kurento-architecture" "mastering/kurento_architecture.html" "./build/html/index.html"
changelink "mastering_kurento.html#kurento-api-reference" "mastering/kurento_API.html" "./build/html/index.html"
changelink "mastering_kurento.html#kurento-protocol" "mastering/kurento_protocol.html" "./build/html/index.html"
changelink "mastering_kurento.html#advanced-installation-guide" "mastering/advanced_installation_guide.html" "./build/html/index.html"
changelink "mastering_kurento.html#working-with-nightly-builds" "mastering/kurento_development.html" "./build/html/index.html"
changelink "mastering_kurento.html#kurento-modules" "mastering/kurento_modules.html" "./build/html/index.html"
changelink "mastering_kurento.html#kurento-java-client-javadoc" "langdoc/javadoc/index.html" "./build/html/index.html"
changelink "mastering_kurento.html#kurento-javascript-client-jsdoc" "langdoc/jsdoc/kurento-client-js/index.html" "./build/html/index.html"
changelink "mastering_kurento.html#kurento-javascript-utils-jsdoc" "langdoc/jsdoc/kurento-utils-js/index.html" "./build/html/index.html"

# ./build/html/mastering/*.html
files=(kurento_architecture kurento_API kurento_protocol advanced_installation_guide kurento_development kurento_modules develop_kurento_modules)
for i in ${files[@]}
do
   changelink "mastering_kurento.html#kurento-architecture" "mastering/kurento_architecture.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-api-reference" "mastering/kurento_API.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-protocol" "mastering/kurento_protocol.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#advanced-installation-guide" "mastering/advanced_installation_guide.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#working-with-nightly-builds" "mastering/kurento_development.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-modules" "mastering/kurento_modules.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-java-client-javadoc" "langdoc/javadoc/index.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-javascript-client-jsdoc" "langdoc/jsdoc/kurento-client-js/index.html" "./build/html/mastering/${i}.html"
   changelink "mastering_kurento.html#kurento-javascript-utils-jsdoc" "langdoc/jsdoc/kurento-utils-js/index.html" "./build/html/mastering/${i}.html"
done
{'fraction_non_alphanumeric': 0.15166497019049005, 'fraction_numerical': 0.003780718336483932, 'mean_word_length': 5.933467741935484, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6904092', 'n_tokens_mistral': 2548, 'n_tokens_neox': 2504, 'n_words': 307}