#+title: Script #+author: Sébastien Miquel #+date: 14-03-2026 # Time-stamp: <22-04-26 10:54> #+OPTIONS: NEEDS : - `export GEMINI_API_KEY=…` - fichier `names` in the directory. * Prétraitement 1. Rotate every single page 180 `./rotate_all.sh Interro14` 2. `./rename_to_copie.sh Interro14` 3. `python page_splitter.py Interro`. Fix issues with `python page_splitter.py Interro14/Copie01.pdf` 4. `python cutleft.py Interro` Rerun on a single file with `python cutleft.py Interro/Copie01.pdf` 5. `python enonce_info.py Interro` * Labelisation et regroupement Set proxy with `export HTTPS_PROXY="http://192.168.241.1:3128"` 7. `python gemini_for_labels.py Interro`, avec éventuellement `--overwrite` 8. Vérification visuelle : `python plotting.py Interro` `python plotting.py InterroTest/Copie01.pdf` It also generates les `Copie01.json`, à partir des `Copie01_01.json` In case of issue, you may need to - Reorder the pdf - Run `python cutleft.py Interro/Copie` - Run `python gemini_dir_batching.py Interro/Copie` 9. `python splitting_int.py Interro` 10. `python grouping.py Interro` * Correction et annotation Success! Batch Job Name: batches/0hc83m3anayrs5iljygg2v6ozsvxz58k6a5r Processing batch_requests_pro.jsonl for model gemini-3.1-pro-preview... Uploading file... Uploaded successfully! File ID: files/oasj4aty5kco Starting batch job... Success! Batch Job Name: batches/8pk4m2snr17n31pun3vwzn646qvtkj8ao192 Set proxy with `export HTTPS_PROXY="http://10.0.0.1:3128"` 1. Il faut créer des persp, pour indication de comment corriger, et relancer `enonce_info.py` 2. `python correction.py Interro --limit 240` OU `python correction.py Interro/Ex\ 2/Group_1.jpg` OU `python correction.py Interro --overwrite` Will it resume ? It seems so. Best to wait a bit. To batch it : + `python correction.py Interro --batch` + `python submit_batches.py Interro` + `python batch_status.py` + `python fetch_batched_results.py DS08VB` + `python correction.py DS08VB --deal-with-batched` 3. Try `python post-correction.py Interro` ; It makes a `fixed_correction.json`, to check. 4. Facultatif : `python annotating.py Interro` dans `Anot`, pass `--overwrite` 5. + `python annotating_with_checks.py Interro` dans `Bnot`, pass `--overwrite` OU + `python annotating_by_label.py Interro` dans `BGnot` _Needs_ : label_groups file. (made automatically by this function) 6. `python to_tablette.py Interro` Cela déplace les groupes dans `SyncCopies/À Annoter`. - Les mettre dans le dossier racine de la tablette, et renommer en `aaa`. - Vider `Syncthing/Annotées` sur la tablette et localement. À automatiser, aussi c'est lent… * Lecture de la correction manuelle 16. Manually : delete `~/SyncCopies/Annotées`, copy from the tablette to here. Then `python from_tablette.py Interro` 17. + `python reading_annotations.py Interro` OU + `python reading_grouped_annotations.py Interro` 18. `python giving_names.py InterroTest BGnot` It will make `A Rendre` with symlink to the Concat.jpg file either in Anot or Bnot, and score.json. + In case of Unknown : rename both directory and file inside. + Here, you can change `score.json` manually. 19. + `gestion_classe ne` pour créer l'interro puis + `gestion_classe we` (set barème here) + `python update_ods.py Interro` + `gestion_classe re` + `gestion_classe wsent` + `python add_final_score.py Interro21` (this makes files in `Server/copies`) 20. + Deploy `miqmacs-copies-assets`, and + update the copies from `miqmacs.fr/admin`. * Recorrection d'une seule copie !! Attention, refaire ne marchera pas si tu fais une annotation non groupée into refaire !! 1. Redécoupage + `python plotting.py InterroTest/Copie01.pdf` + `python splitting_int.py InterroTest/Copie20.pdf` 2. Créer `refaire.json`, avec un contenu comme [["Copie01", []], ["Copie01", ["Ex 1 : 1)"]]] 3. Appeler `correction` avec --refaire. Il doit créer des groupes individuels, faire des requêtes, et remplacer les corrections précédentes (à sauver ailleurs). Ou non, si tu veux le faire à la main. 4. ?? Si je fais refaire, avant d'avoir créer les annotating with checks, que se passe-t-il ??? 5. Appeler `annotating_with_checks.py --refaire --overwrite` avec --refaire. 6. `python to_tablette.py --refaire Interro24` 6. `python from_tablette.py --refaire Interro24` 7. `python reading_grouped_annotations.py --refaire Interro24` * Install #+BEGIN_SRC bash pip install highlight-text --break-system-packages #+END_SRC