<commit_before>#!/bin/bash

codeFolder="../public_html/code/";
outputFolder="../public_html/versions/"

versions="";

# iterate over all version dirs
for DIR in $(ls ${codeFolder} -p | grep "/" | grep -v "^0.")
    do

        versions=${versions}`echo \"${DIR}\", | tr -d "/"`;

        fileList=""
        # iterate over all files in %version%/api/*
        for FILE in $(ls ${outputFolder}${DIR}docs/partials/api/ | sed -e 's/"/\\"/g')
            do
                fileList=${fileList}\"${FILE}\",
            done
        echo [${fileList%?}] > ${outputFolder}${DIR%?}.api.json

    done

echo [${versions%?}] > ${outputFolder}index.json<commit_msg>bugfix: wring input folder variable for inner ls command<commit_after>#!/bin/bash

codeFolder="../public_html/code/";
outputFolder="../public_html/versions/"

versions="";

# iterate over all version dirs
for DIR in $(ls ${codeFolder} -p | grep "/" | grep -v "^0.")
    do

        versions=${versions}`echo \"${DIR}\", | tr -d "/"`;

        fileList=""
        # iterate over all files in %version%/api/*
        for FILE in $(ls ${codeFolder}${DIR}docs/partials/api/ | sed -e 's/"/\\"/g')
            do
                fileList=${fileList}\"${FILE}\",
            done
        echo [${fileList%?}] > ${outputFolder}${DIR%?}.api.json

    done

echo [${versions%?}] > ${outputFolder}index.json
{'fraction_non_alphanumeric': 0.20799407846039972, 'fraction_numerical': 0.0014803849000740192, 'mean_word_length': 2.4935400516795867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3375255', 'n_tokens_mistral': 455, 'n_tokens_neox': 431, 'n_words': 105}