<commit_before>#!/bin/bash

if [ -z "$1" ]; then
    echo 'Please provide an app to deploy'
    exit 2
fi

if [ -z "$2" ]; then
    echo 'Please specify a command:'
    echo ' - update'
    echo ' - update_indexes'
    echo ' - vacuum_indexes'
    echo ' - update_queues'
    echo ' - update_cron'
    exit 2
fi

APP="$1"
COMMAND="$2"

echo "Performing '$COMMAND' on '$APP'"

case "$APP" in
    chilts)
        echo "Hi Chilts"
        APP=website-chilts-org
        ;;
    lollysite)
        echo "Main Lollysite site"
        ;;
    kohacon)
        echo "KohaCon website"
        ;;
    *)
       echo "Unknown site"
       exit 2
       ;;
esac

# setup the app.yaml for this application
sed -i.orig "1,1s/^application: lollysite$/application: $APP/" app.yaml

case "$COMMAND" in
    update|update_indexes|update_queues|update_cron)
        echo "Doing $COMMAND"
        google_appengine/appcfg.py $COMMAND ./
        ;;
    request-logs)
        echo "Doing update"
        google_appengine/appcfg.py request_logs ./ logs/access-$APP.log
        ;;
    *)
        echo "Unknown command"
        ;;
esac<commit_msg>Move the google_appengine out of the project dir (and therefore change where it tries to find it)<commit_after>#!/bin/bash

if [ -z "$1" ]; then
    echo 'Please provide an app to deploy'
    exit 2
fi

if [ -z "$2" ]; then
    echo 'Please specify a command:'
    echo ' - update'
    echo ' - update_indexes'
    echo ' - vacuum_indexes'
    echo ' - update_queues'
    echo ' - update_cron'
    exit 2
fi

APP="$1"
COMMAND="$2"

echo "Performing '$COMMAND' on '$APP'"

case "$APP" in
    chilts)
        echo "Hi Chilts"
        APP=website-chilts-org
        ;;
    lollysite)
        echo "Main Lollysite site"
        ;;
    kohacon)
        echo "KohaCon website"
        ;;
    *)
       echo "Unknown site"
       exit 2
       ;;
esac

# setup the app.yaml for this application
sed -i.orig "1,1s/^application: lollysite$/application: $APP/" app.yaml

case "$COMMAND" in
    update|update_indexes|update_queues|update_cron)
        echo "Doing $COMMAND"
        ~/google_appengine/appcfg.py $COMMAND ./
        ;;
    request-logs)
        echo "Doing update"
        ~/google_appengine/appcfg.py request_logs ./ logs/access-$APP.log
        ;;
    *)
        echo "Unknown command"
        ;;
esac
{'fraction_non_alphanumeric': 0.12037833190025796, 'fraction_numerical': 0.007738607050730868, 'mean_word_length': 2.0985352862849536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7261892', 'n_tokens_mistral': 810, 'n_tokens_neox': 784, 'n_words': 213}