forked from simongrossi/anonyfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_cli.sh
More file actions
27 lines (22 loc) · 719 Bytes
/
test_cli.sh
File metadata and controls
27 lines (22 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -e
echo "🧪 Création du fichier de test..."
mkdir -p tests mappings log
cat <<EOF > tests/sample.txt
Jean Dupont est né à Paris et travaille chez ACME Corp. Son email est jean.dupont@email.com
EOF
echo "🚀 Lancement de l’anonymisation..."
anonyfiles-cli anonymize tests/sample.txt \
--output tests/result.txt \
--config anonyfiles_core/config/config.yaml
echo ""
echo "📄 Résultat anonymisé :"
cat tests/result.txt
echo ""
echo "📁 Fichier de mapping généré :"
latest_mapping=$(ls -t mappings/sample_mapping_*.csv | head -n 1)
cat "$latest_mapping"
echo ""
echo "📊 Log des entités détectées :"
latest_log=$(ls -t log/sample_entities_*.csv | head -n 1)
cat "$latest_log"