Using AMC in command line only
Version 7 (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 | 3 | Alex Alex | Note that when ou run AMC graphical interface and begin a debugging session (from the Help menu), all AMC commands called by the graphical interface will be recorded in the log file. This can help you to figure out which exact command can do what you need. |
9 | 3 | Alex Alex | |
10 | 1 | h2. Creating a new project |
|
11 | 1 | ||
12 | 4 | Alex Alex | 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 directories: |
13 | 1 | ||
14 | 1 | <pre> |
|
15 | 1 | #!/bin/bash |
|
16 | 1 | # file name: new_project.sh |
|
17 | 3 | Alex Alex | PROJECT_DIR=$HOME/MC-Projects |
18 | 1 | ||
19 | 1 | mkdir $PROJECT_DIR/$1 |
|
20 | 1 | mkdir $PROJECT_DIR/$1/cr |
|
21 | 1 | mkdir $PROJECT_DIR/$1/cr/corrections |
|
22 | 1 | mkdir $PROJECT_DIR/$1/cr/corrections/jpg |
|
23 | 1 | mkdir $PROJECT_DIR/$1/cr/corrections/pdf |
|
24 | 1 | mkdir $PROJECT_DIR/$1/cr/diagnostic |
|
25 | 1 | mkdir $PROJECT_DIR/$1/cr/zooms |
|
26 | 1 | mkdir $PROJECT_DIR/$1/data |
|
27 | 1 | mkdir $PROJECT_DIR/$1/exports |
|
28 | 1 | mkdir $PROJECT_DIR/$1/scans |
|
29 | 6 | Alex Alex | mkdir $PROJECT_DIR/$1/copies |
30 | 1 | </pre> |
|
31 | 1 | ||
32 | 1 | then you can create a new poject by typing: |
|
33 | 1 | <pre> |
|
34 | 4 | Alex Alex | $ ./new_project.sh my-new-project1 |
35 | 1 | </pre> |
|
36 | 2 | Alex Alex | |
37 | 2 | Alex Alex | h2. Prepare tests |
38 | 1 | ||
39 | 1 | You need to have your .tex file created before following with the instructions below. |
|
40 | 4 | Alex Alex | In the following examples, we will suppose that your latex file name is test.tex |
41 | 1 | ||
42 | 1 | h3. Creating the PDFs |
|
43 | 4 | Alex Alex | |
44 | 4 | Alex Alex | The next step consists of creating the subject file, the correction file and the position file. By typing: |
45 | 4 | Alex Alex | |
46 | 1 | <pre> |
|
47 | 4 | Alex Alex | $ cd ~/MC-Projects/my-new-project1/ |
48 | 4 | Alex Alex | $ auto-multiple-choice prepare --mode s --prefix ./ ./test.tex \ |
49 | 4 | Alex Alex | --out-sujet DOC-subject.pdf \ |
50 | 4 | Alex Alex | --out-corrige DOC-correction.pdf \ |
51 | 4 | Alex Alex | --out-calage DOC-calage.xy |
52 | 1 | </pre> |
|
53 | 4 | Alex Alex | |
54 | 4 | Alex Alex | This command will create 3 files: |
55 | 4 | Alex Alex | * DOC-subject.pdf is a file containing all copies. |
56 | 4 | Alex Alex | * DOC-correction.pdf is a file with the correct answer checked so you can review the answers. |
57 | 4 | Alex Alex | * DOC-calage.xy is the position file. |
58 | 1 | ||
59 | 6 | Alex Alex | You also need to extract the scroing data from the source file. Typing from your project directory: |
60 | 1 | ||
61 | 2 | Alex Alex | <pre> |
62 | 6 | Alex Alex | $ auto-multiple-choice prepare --mode b --prefix ./ ./test.tex --data ./data/ |
63 | 1 | </pre> |
|
64 | 5 | Alex Alex | |
65 | 6 | Alex Alex | This command will create various SQLite files in the data directory. |
66 | 1 | ||
67 | 6 | Alex Alex | h3. Prepare the layout information |
68 | 2 | Alex Alex | |
69 | 6 | Alex Alex | The following command will get the layout information from the working document to the layout database: |
70 | 6 | Alex Alex | |
71 | 2 | Alex Alex | <pre> |
72 | 7 | Alex Alex | $ auto-multiple-choice meptex --src $PROJECT_DIR/$1/DOC-calage.xy --data $PROJECT_DIR/$1/data |
73 | 1 | </pre> |
|
74 | 1 | ||
75 | 2 | Alex Alex | h3. Printing your documents |
76 | 2 | Alex Alex | |
77 | 6 | Alex Alex | You can use the DOC-subject.pdf file and print it. However, if you want to create separate files for each students, type the following: |
78 | 6 | Alex Alex | |
79 | 1 | <pre> |
|
80 | 7 | Alex Alex | $ auto-multiple-choice imprime --sujet ./DOC-subject.pdf \ |
81 | 7 | Alex Alex | --data ./data/ \ |
82 | 7 | Alex Alex | --methode file \ |
83 | 7 | Alex Alex | --output ./copies/test-%e.pdf |
84 | 2 | Alex Alex | </pre> |
85 | 2 | Alex Alex | |
86 | 2 | Alex Alex | h2. Analysing the copies |
87 | 2 | Alex Alex | |
88 | 2 | Alex Alex | /usr/bin/auto-multiple-choice analyse --projet $PROJECT_DIR/$1/ $PROJECT_DIR/$1/scans/* |
89 | 2 | Alex Alex | |
90 | 2 | Alex Alex | |
91 | 2 | Alex Alex | # Note |
92 | 2 | Alex Alex | /usr/bin/auto-multiple-choice note -data $PROJECT_DIR/$1/data --seuil 0.15 |
93 | 2 | Alex Alex | |
94 | 2 | Alex Alex | # Association auto |
95 | 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 |
96 | 2 | Alex Alex | # Annoter les copies |
97 | 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 |
98 | 2 | Alex Alex | |
99 | 2 | Alex Alex | # Regroupe les annotations pour avoir un fichier par étudiant |
100 | 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 |
101 | 2 | Alex Alex | |
102 | 2 | Alex Alex | # Export les notes |
103 | 1 | /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 |