<commit_before>#!/usr/bin/env bash

GITHUB_CLIENT_ID=<client_id>
GITHUB_CLIENT_SECRET=<client_secret>
GITHUB_REPOSITORY="Mobivoc/Mobivoc"
INTERVAL=1  # (minutes) in which the repository is checked


# generate Issues, if new errors exist
python validator/issueGenerator.py -c $GITHUB_CLIENT_ID -r $GITHUB_REPOSITORY -s $GITHUB_CLIENT_SECRET -i $INTERVAL

# generate a new vocabulary version, if it is valid & necessary (=new changes)
python validator/vocabularyGenerator.py -c $GITHUB_CLIENT_ID -s $GITHUB_CLIENT_SECRET -r $GITHUB_REPOSITORY -i $INTERVAL


LAST_VOCAB_MODIFICATION_DATE=`date -r deploy/Mobivoc.ttl +%s`
DATE_NOW=`date +%s`
DIFF_IN_MINUTES=$((($DATE_NOW-$LAST_VOCAB_MODIFICATION_DATE)/60))


# is there a new version? 
if [ $DIFF_IN_MINUTES -lt $INTERVAL ]
then
    # publish new version
    java -cp  .:jena-arq-2.12.1.jar:jena-core-2.12.1.jar:jena-iri-1.1.1.jar:log4j-1.2.17.jar:slf4j-api-1.7.6.jar:xercesImpl-2.11.0.jar:xml-apis-1.4.01.jar HtmlGenerator deploy/Mobivoc.ttl deploy/Mobivoc.rdfa HtmlGenerator/Templates/template.html deploy/Mobivoc.html HtmlGenerator/Templates/schemasTemplate.html <commit_msg>minor improvements<commit_after>#!/usr/bin/env bash

GITHUB_CLIENT_ID=<client_id>
GITHUB_CLIENT_SECRET=<client_secret>
GITHUB_REPOSITORY="Mobivoc/Mobivoc"
INTERVAL=1  # (minutes) in which the repository is checked


# generate Issues, if new errors exist
python validator/issueGenerator.py -c "$GITHUB_CLIENT_ID" -r "$GITHUB_REPOSITORY" -s "$GITHUB_CLIENT_SECRET" -i "$INTERVAL"

# generate a new vocabulary version, if it is valid & necessary (=new changes)
python validator/vocabularyGenerator.py -c "$GITHUB_CLIENT_ID" -s "$GITHUB_CLIENT_SECRET" -r "$GITHUB_REPOSITORY" -i "$INTERVAL"

LAST_VOCAB_MODIFICATION_DATE=$(date -r deploy/Mobivoc.ttl +%s)
DATE_NOW=$(date +%s)
DIFF_IN_MINUTES=$((($DATE_NOW-$LAST_VOCAB_MODIFICATION_DATE)/60))


# is there a new version? 
if [[ $DIFF_IN_MINUTES -lt $INTERVAL ]]
then
    # publish new version
    java -cp  .:jena-arq-2.12.1.jar:jena-core-2.12.1.jar:jena-iri-1.1.1.jar:log4j-1.2.17.jar:slf4j-api-1.7.6.jar:xercesImpl-2.11.0.jar:xml-apis-1.4.01.jar HtmlGenerator deploy/Mobivoc.ttl deploy/Mobivoc.rdfa HtmlGenerator/Templates/template.html deploy/Mobivoc.html HtmlGenerator/Templates/schemasTemplate.html 
{'fraction_non_alphanumeric': 0.12917398945518455, 'fraction_numerical': 0.027240773286467488, 'mean_word_length': 5.45042492917847, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '445541', 'n_tokens_mistral': 978, 'n_tokens_neox': 949, 'n_words': 161}