<commit_before>#!/bin/bash

. bin/config.inc

mkdir $EXPORTDIR 2> /dev/null

php symfony export:etablissements-csv $SYMFONYTASKOPTIONS > $EXPORTDIR/etablissements.csv.part

sort $EXPORTDIR/etablissements.csv.part > $EXPORTDIR/etablissements.csv.part.sorted
mv $EXPORTDIR/etablissements.csv.part{.sorted,}

php symfony export:chais-csv $SYMFONYTASKOPTIONS > $EXPORTDIR/chais.csv.part

mv $EXPORTDIR/etablissements.csv{.part,}
mv $EXPORTDIR/chais.csv{.part,}

cat $EXPORTDIR/etablissements.csv | iconv -f UTF8 -t ISO88591//TRANSLIT > $EXPORTDIR/etablissements.iso8859.csv
cat $EXPORTDIR/chais.csv | iconv -f UTF8 -t ISO88591//TRANSLIT >$EXPORTDIR/chais.iso8859.csv
<commit_msg>on remet l'entete au bonne endroit pour l'export des etb<commit_after>#!/bin/bash

. bin/config.inc

mkdir $EXPORTDIR 2> /dev/null

php symfony export:etablissements-csv $SYMFONYTASKOPTIONS > $EXPORTDIR/etablissements.csv.part

sort $EXPORTDIR/etablissements.csv.part > $EXPORTDIR/etablissements.csv.part.sorted
mv $EXPORTDIR/etablissements.csv.part{.sorted,}

php symfony export:chais-csv $SYMFONYTASKOPTIONS > $EXPORTDIR/chais.csv.part

cat $EXPORTDIR/etablissements.csv.part | grep -E "^IdOp" > $EXPORTDIR/etablissements.csv
cat $EXPORTDIR/etablissements.csv.part | grep -Ev "^IdOp" >> $EXPORTDIR/etablissements.csv

mv $EXPORTDIR/chais.csv{.part,}

cat $EXPORTDIR/etablissements.csv | iconv -f UTF8 -t ISO88591//TRANSLIT > $EXPORTDIR/etablissements.iso8859.csv
cat $EXPORTDIR/chais.csv | iconv -f UTF8 -t ISO88591//TRANSLIT >$EXPORTDIR/chais.iso8859.csv

{'fraction_non_alphanumeric': 0.12915851272015655, 'fraction_numerical': 0.0273972602739726, 'mean_word_length': 5.286885245901639, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, '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': '5261901', 'n_tokens_mistral': 666, 'n_tokens_neox': 588, 'n_words': 101}