Go to file
Sébastien Miquel 47ab69132b Readme.org 2026-04-25 09:29:28 +02:00
Readme.org Readme.org 2026-04-25 09:29:28 +02:00
add_final_score.py Initial support for _F output file 2026-04-25 09:17:48 +02:00
annotating.py Rudimentary support for --refaire 2026-04-01 22:20:11 +02:00
annotating_by_label.py miscs 2026-04-23 12:41:50 +02:00
annotating_with_checks.py Rudimentary support for --refaire 2026-04-01 22:20:11 +02:00
batch_status.py Script.org file and batching utilities 2026-04-25 09:18:32 +02:00
correction.py miscs 2026-04-23 12:41:50 +02:00
cutleft.py Caching cutlef.py 2026-03-17 14:26:32 +01:00
enonce_info.py Initial support for _F output file 2026-04-25 09:17:48 +02:00
fetch_batched_results.py Script.org file and batching utilities 2026-04-25 09:18:32 +02:00
from_tablette.py Rudimentary support for --refaire 2026-04-01 22:20:11 +02:00
gemini_for_labels.py Miscs 2026-04-18 11:11:56 +02:00
giving_names.py Initial support for _F output file 2026-04-25 09:17:48 +02:00
grouping.py Initial support for automatic fixing of additional and wrong label 2026-03-15 22:28:15 +01:00
liste_francais.txt Enonce info : generate pdf per question/solution 2026-04-24 08:22:42 +02:00
page_splitter.py page_splitter : support for 'as_is' 2026-03-11 07:46:13 +01:00
plotting.py Cut Text/Sol/Persp into smaller parts, and use them 2026-04-21 14:13:04 +02:00
post-correction.py miscs 2026-04-23 12:41:50 +02:00
reading_annotations.py 4.5 and clear checkboxes 2026-03-28 15:52:13 +01:00
reading_grouped_annotations.py Initial support for _F output file 2026-04-25 09:17:48 +02:00
rename_to_copie.sh Initial commit 2026-01-18 14:46:54 +01:00
rotate_all.sh Initial commit 2026-01-18 14:46:54 +01:00
splitting_int.py Rudimentary support for --refaire 2026-04-01 22:20:11 +02:00
submit_batches.py Script.org file and batching utilities 2026-04-25 09:18:32 +02:00
to_tablette.py Rudimentary support for --refaire 2026-04-01 22:20:11 +02:00
update_ods.py Initial support for automatic fixing of additional and wrong label 2026-03-15 22:28:15 +01:00
utils.py Initial support for automatic fixing of additional and wrong label 2026-03-15 22:28:15 +01:00

Readme.org

Script

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"`

  1. `python gemini_for_labels.py Interro`, avec éventuellement `overwrite`
  2. 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`
  3. `python splitting_int.py Interro`
  4. `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`
    • `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)
  5. `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

  1. Manually : delete `~/SyncCopies/Annotées`, copy from the tablette to here. Then `python from_tablette.py Interro`
    • `python reading_annotations.py Interro`

    OU

    • `python reading_grouped_annotations.py Interro`
  2. `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.
    • `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`)
    • 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 /sebastien/Copies/src/commit/47ab69132b32494897009929f8f957f25b990f33/"Copie01&%2334;,%20%5B, ["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`
  7. `python from_tablette.py refaire Interro24`
  8. `python reading_grouped_annotations.py refaire Interro24`

Install

pip install highlight-text --break-system-packages