<commit_before>#!/bin/bash
if [ ! -z "$1" ]; then
    if [ "$1" == '--update' ]; then
        echo "Dont't know how to update yet :(";
        exit
    fi

    name=$1
    rx="^([a-zA-Z]{3,})$"
    if ! [[ "$name" =~ $rx ]] ; then
        echo "Bad name, use letters in the range [A-Za-z]!"
        exit
    fi

    rm -Rf ./.git/ &&
    rm -f ./.gitignore &&
    echo "Git files has been removed"

    sed "s/cometwpp_plugin_fw/$name/g" ./config.example.php &&
    sed "s/cometwpp_plugin_fw_prefix/$name-prefix/g" ./config.example.php &&
    mv ./config.example.php ./config.php &&
    echo "* Config done"

    find ./ -type f -name "*.php" -print0 | xargs -0 sed -i "s/Cometwpp/$name/g"
    echo "* Namespace done"

    sed "s/PluginName/$name/g" ./pl_plugin_name.php &&
    mv ./pl_plugin_name.php ./"$name".php &&
    echo "* Plugin Name done"<commit_msg>install script<commit_after>#!/bin/bash
if [ ! -z "$1" ]; then
    if [ "$1" == '--update' ]; then
        echo "Don't know how to update yet :(";
        exit
    fi

    name=$1
    rx="^([a-zA-Z]{3,})$"
    if ! [[ "$name" =~ $rx ]] ; then
        echo "Bad name, use letters in the range [A-Za-z]!"
        exit
    fi

    rm -Rf ./.git/ &&
    rm -f ./.gitignore &&
    echo "Git files has been removed"

    cat ./config.example.php | sed --quiet "s/cometwpp_plugin_fw/$name/g" > ./config.example.php &&
    cat ./config.example.php | sed --quiet "s/cometwpp_plugin_fw_prefix/$name-prefix/g" > ./config.example.php &&
    mv ./config.example.php ./config.php &&
    echo "* Config done"

    find ./ -type f -name "*.php" -print0 | xargs -0 sed -i --quiet "s/Cometwpp/$name/g"
    echo "* Namespace done"

    cat ./pl_plugin_name.php | sed --quiet "s/PluginName/$name/g" > ./pl_plugin_name.php  &&
    mv ./pl_plugin_name.php ./"$name".php &&
    echo "* Plugin Name done"
{'fraction_non_alphanumeric': 0.19510869565217392, 'fraction_numerical': 0.006521739130434782, 'mean_word_length': 2.0993265993265995, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '2033739', 'n_tokens_mistral': 715, 'n_tokens_neox': 682, 'n_words': 176}