<commit_before>#!/bin/bash

. $(dirname $0)/config.inc
LAST=""
curl -s $CIEL_URL_RETOURXML"/?from="$1 > /tmp/retrieveXML.$$.url

cat /tmp/retrieveXML.$$.url | sort -r | while read url ; do
  CURRENT=$(echo $url | sed -r 's/(.+)\/([0-9]{4}\/[0-9]{2}\/[0-9A-Z]+).*/\2/g');
  if [ "$CURRENT" == "$LAST" ]; then
    echo "L'xml d'url "$url" n'est pas la version la plus récente";
    continue;
  fi
	OUT=$(php symfony $SYMFONYTASKOPTIONS drm:storeXMLRetour --force-update="1" $url)
	RET=$?
	DRM=$(echo $OUT | sed 's/ .*//')
	echo $OUT
	if test $RET -eq 0 ; then
		php symfony $SYMFONYTASKOPTIONS drm:compareXMLs $DRM
	fi
  LAST=$(echo $url | sed -r 's/(.+)\/([0-9]{4}\/[0-9]{2}\/[0-9A-Z]+).*/\2/g')
done

if test "$2" && test -d $(dirname $2) ; then
    cat /tmp/retrieveXML.$$.url | awk -F '_' '{print $4}' | sort  | tail -n 1 | sed 's/\(....\)\(..\)\(..\).xml/\1-\2-\3/' > $2
fi<commit_msg>la date est la date de dépot et non la date de transfer (+ suppression du fichier tmp)<commit_after>#!/bin/bash

. $(dirname $0)/config.inc
LAST=""
curl -s $CIEL_URL_RETOURXML"/?from="$1 > /tmp/retrieveXML.$$.url

cat /tmp/retrieveXML.$$.url | sort -r | while read url ; do
  CURRENT=$(echo $url | sed -r 's/(.+)\/([0-9]{4}\/[0-9]{2}\/[0-9A-Z]+).*/\2/g');
  if [ "$CURRENT" == "$LAST" ]; then
    echo "L'xml d'url "$url" n'est pas la version la plus récente";
    continue;
  fi
	OUT=$(php symfony $SYMFONYTASKOPTIONS drm:storeXMLRetour --force-update="1" $url)
	RET=$?
	DRM=$(echo $OUT | sed 's/ .*//')
	echo $OUT
	if test $RET -eq 0 ; then
		php symfony $SYMFONYTASKOPTIONS drm:compareXMLs $DRM
	fi
  LAST=$(echo $url | sed -r 's/(.+)\/([0-9]{4}\/[0-9]{2}\/[0-9A-Z]+).*/\2/g')
done

if test "$2" && test -d $(dirname $2) ; then
    cat /tmp/retrieveXML.$$.url | awk -F '_' '{print $4 * 1 + 1}' | sort  | tail -n 1 | sed 's/\(....\)\(..\)\(..\)/\1-\2-\3/' > $2
fi
rm /tmp/retrieveXML.$$.url
{'fraction_non_alphanumeric': 0.2680851063829787, 'fraction_numerical': 0.03297872340425532, 'mean_word_length': 2.8466257668711656, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, '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': '5433236', 'n_tokens_mistral': 853, 'n_tokens_neox': 809, 'n_words': 201}