Using AMC in command line only
Version 2 (Alex Alex, 03/07/2021 12:05 am)
| 1 | 1 | h1. Using AMC in command line only |
|
|---|---|---|---|
| 2 | 1 | ||
| 3 | 1 | (under construction) |
|
| 4 | 1 | ||
| 5 | 1 | These instructions should help you use AMC in command line only without having to open the graphical user interface. |
|
| 6 | 1 | These instructions work with version 1.1.0 of AMC. |
|
| 7 | 1 | ||
| 8 | 1 | h2. Creating a new project |
|
| 9 | 1 | ||
| 10 | 1 | There is no AMC command to create a new project, so you will need to create directories "manually". I use the following bash script to create the needed directories: |
|
| 11 | 1 | ||
| 12 | 1 | <pre> |
|
| 13 | 1 | #!/bin/bash |
|
| 14 | 1 | # file name: new_project.sh |
|
| 15 | 1 | PROJECT_DIR=/home/me/MC-Projects |
|
| 16 | 1 | ||
| 17 | 1 | mkdir $PROJECT_DIR/$1 |
|
| 18 | 1 | mkdir $PROJECT_DIR/$1/cr |
|
| 19 | 1 | mkdir $PROJECT_DIR/$1/cr/corrections |
|
| 20 | 1 | mkdir $PROJECT_DIR/$1/cr/corrections/jpg |
|
| 21 | 1 | mkdir $PROJECT_DIR/$1/cr/corrections/pdf |
|
| 22 | 1 | mkdir $PROJECT_DIR/$1/cr/diagnostic |
|
| 23 | 1 | mkdir $PROJECT_DIR/$1/cr/zooms |
|
| 24 | 1 | mkdir $PROJECT_DIR/$1/data |
|
| 25 | 1 | mkdir $PROJECT_DIR/$1/exports |
|
| 26 | 1 | mkdir $PROJECT_DIR/$1/scans |
|
| 27 | 1 | </pre> |
|
| 28 | 1 | ||
| 29 | 1 | then you can create a new poject by typing: |
|
| 30 | 1 | <pre> |
|
| 31 | 1 | ./new_project.sh my-new-project1 |
|
| 32 | 1 | </pre> |
|
| 33 | 2 | Alex Alex | |
| 34 | 2 | Alex Alex | h2. Prepare tests |
| 35 | 2 | Alex Alex | |
| 36 | 2 | Alex Alex | You need to have your .tex file created before following with the instructions below. |
| 37 | 2 | Alex Alex | |
| 38 | 2 | Alex Alex | [continue writing here...] |
| 39 | 2 | Alex Alex | |
| 40 | 2 | Alex Alex | h3. Creating the PDFs |
| 41 | 2 | Alex Alex | <pre> |
| 42 | 2 | Alex Alex | /usr/bin/auto-multiple-choice prepare --mode s --prefix $PROJECT_DIR/$1/ $PROJECT_DIR/$1/$2.tex --out-sujet $PROJECT_DIR/$1/DOC-sujet.pdf --out-corrige $PROJECT_DIR/$1/DOC-corrige.pdf --out-calage $PROJECT_DIR/$1/DOC-calage.xy |
| 43 | 2 | Alex Alex | </pre> |
| 44 | 2 | Alex Alex | <pre> |
| 45 | 2 | Alex Alex | /usr/bin/auto-multiple-choice prepare --mode b --prefix $PROJECT_DIR/$1/ $PROJECT_DIR/$1/$2.tex --data $PROJECT_DIR/$1/data/ |
| 46 | 2 | Alex Alex | </pre> |
| 47 | 2 | Alex Alex | |
| 48 | 2 | Alex Alex | h3. MEPTEX |
| 49 | 2 | Alex Alex | |
| 50 | 2 | Alex Alex | <pre> |
| 51 | 2 | Alex Alex | /usr/bin/auto-multiple-choice meptex --src $PROJECT_DIR/$1/DOC-calage.xy --data $PROJECT_DIR/$1/data |
| 52 | 2 | Alex Alex | </pre> |
| 53 | 2 | Alex Alex | |
| 54 | 2 | Alex Alex | h3. Printing your documents |
| 55 | 2 | Alex Alex | |
| 56 | 2 | Alex Alex | <pre> |
| 57 | 2 | Alex Alex | /usr/bin/auto-multiple-choice imprime --sujet $PROJECT_DIR/$1/DOC-sujet.pdf --data $PROJECT_DIR/$1/data/ --methode file --output $PROJECT_DIR/$1/copies/examen$2-%e.pdf |
| 58 | 2 | Alex Alex | </pre> |
| 59 | 2 | Alex Alex | |
| 60 | 2 | Alex Alex | h2. Analysing the copies |
| 61 | 2 | Alex Alex | |
| 62 | 2 | Alex Alex | /usr/bin/auto-multiple-choice analyse --projet $PROJECT_DIR/$1/ $PROJECT_DIR/$1/scans/* |
| 63 | 2 | Alex Alex | |
| 64 | 2 | Alex Alex | |
| 65 | 2 | Alex Alex | # Note |
| 66 | 2 | Alex Alex | /usr/bin/auto-multiple-choice note -data $PROJECT_DIR/$1/data --seuil 0.15 |
| 67 | 2 | Alex Alex | |
| 68 | 2 | Alex Alex | # Association auto |
| 69 | 2 | Alex Alex | /usr/bin/auto-multiple-choice association-auto --data $PROJECT_DIR/$1/data --notes-id numero-etudiant --liste $PROJECT_DIR/$1/students-list.csv --liste-key no |
| 70 | 2 | Alex Alex | # Annoter les copies |
| 71 | 2 | Alex Alex | /usr/bin/auto-multiple-choice annote --projet $PROJECT_DIR/$1/ --data $PROJECT_DIR/$1/data --fich-noms $PROJECT_DIR/$1/students-list.csv --qualite 100 --indicatives 1 |
| 72 | 2 | Alex Alex | |
| 73 | 2 | Alex Alex | # Regroupe les annotations pour avoir un fichier par étudiant |
| 74 | 2 | Alex Alex | /usr/bin/auto-multiple-choice regroupe --projet $PROJECT_DIR/$1/ --sujet $PROJECT_DIR/$1/DOC-sujet.pdf --fich-noms $PROJECT_DIR/$1/students-list.csv --tex-src $PROJECT_DIR/$1/$2.tex --compose |
| 75 | 2 | Alex Alex | |
| 76 | 2 | Alex Alex | # Export les notes |
| 77 | 2 | Alex Alex | /usr/bin/auto-multiple-choice export --data $PROJECT_DIR/$1/data --module ods --fich-noms $PROJECT_DIR/$1/students-list.csv -o $PROJECT_DIR/$1/output-note.ods --option-out nom=NOM-DE-L_EXAMEN |