Using AMC in command line only
Version 19 (Alex Alex, 03/07/2021 12:05 am)
1 | 1 | h1. Using AMC in command line only |
|
---|---|---|---|
2 | 1 | ||
3 | 1 | These instructions should help you use AMC in command line only without having to open the graphical user interface. |
|
4 | 1 | These instructions work with version 1.1.0 of AMC. |
|
5 | 1 | ||
6 | 12 | Alex Alex | Note that when you 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. |
7 | 1 | ||
8 | 12 | Alex Alex | Additionnaly, if you ever need to open the GUI, the commands described here are all compatible with AMC-gui.pl. |
9 | 12 | 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 | 18 | Alex Alex | --data ./data \ |
52 | 4 | Alex Alex | --out-calage DOC-calage.xy |
53 | 1 | </pre> |
|
54 | 4 | Alex Alex | |
55 | 4 | Alex Alex | This command will create 3 files: |
56 | 4 | Alex Alex | * DOC-subject.pdf is a file containing all copies. |
57 | 4 | Alex Alex | * DOC-correction.pdf is a file with the correct answer checked so you can review the answers. |
58 | 4 | Alex Alex | * DOC-calage.xy is the position file. |
59 | 1 | ||
60 | 19 | Alex Alex | You also need to extract the scoring data from the source file. Typing from your project directory: |
61 | 1 | ||
62 | 2 | Alex Alex | <pre> |
63 | 6 | Alex Alex | $ auto-multiple-choice prepare --mode b --prefix ./ ./test.tex --data ./data/ |
64 | 1 | </pre> |
|
65 | 5 | Alex Alex | |
66 | 6 | Alex Alex | This command will create various SQLite files in the data directory. |
67 | 1 | ||
68 | 6 | Alex Alex | h3. Prepare the layout information |
69 | 2 | Alex Alex | |
70 | 6 | Alex Alex | The following command will get the layout information from the working document to the layout database: |
71 | 6 | Alex Alex | |
72 | 2 | Alex Alex | <pre> |
73 | 19 | Alex Alex | $ auto-multiple-choice meptex --src DOC-calage.xy --data ./data/ |
74 | 1 | </pre> |
|
75 | 1 | ||
76 | 2 | Alex Alex | h3. Printing your documents |
77 | 2 | Alex Alex | |
78 | 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: |
79 | 6 | Alex Alex | |
80 | 1 | <pre> |
|
81 | 7 | Alex Alex | $ auto-multiple-choice imprime --sujet ./DOC-subject.pdf \ |
82 | 7 | Alex Alex | --data ./data/ \ |
83 | 7 | Alex Alex | --methode file \ |
84 | 7 | Alex Alex | --output ./copies/test-%e.pdf |
85 | 2 | Alex Alex | </pre> |
86 | 2 | Alex Alex | |
87 | 8 | Alex Alex | h2. Analyzing the copies |
88 | 2 | Alex Alex | |
89 | 8 | Alex Alex | Once you have scanned all the student's copies, place them in the scans/ directory. The next command will analyze all the files in the scans/ directory. |
90 | 1 | ||
91 | 8 | Alex Alex | <pre> |
92 | 8 | Alex Alex | $ auto-multiple-choice analyse --projet ./ ./scans/* |
93 | 8 | Alex Alex | </pre> |
94 | 8 | Alex Alex | |
95 | 8 | Alex Alex | You can also have certain files analyzed using the --list-fichiers option. Read AMC-analyse's manpage for more information. |
96 | 2 | Alex Alex | |
97 | 9 | Alex Alex | <pre> |
98 | 9 | Alex Alex | $ man AMC-analyse |
99 | 9 | Alex Alex | </pre> |
100 | 9 | Alex Alex | |
101 | 9 | Alex Alex | h2. Compute marks |
102 | 9 | Alex Alex | |
103 | 9 | Alex Alex | Using the following command will compute the marks: |
104 | 9 | Alex Alex | |
105 | 9 | Alex Alex | <pre> |
106 | 9 | Alex Alex | $ auto-multiple-choice note --data ./data --seuil 0.15 |
107 | 9 | Alex Alex | </pre> |
108 | 9 | Alex Alex | |
109 | 9 | Alex Alex | The "--seuil" option specifies the black ratio threshold to use. 0.15 is normally an acceptable value. If you use a separate answer sheet, you at least a 0.5 value. |
110 | 9 | Alex Alex | Read AMC-note's manpage for a list of other options that will help you with the rounding and the maximum and the minimum notes. |
111 | 9 | Alex Alex | |
112 | 9 | Alex Alex | <pre> |
113 | 10 | Alex Alex | $ man AMC-note |
114 | 9 | Alex Alex | </pre> |
115 | 1 | ||
116 | 10 | Alex Alex | h2. Automatic association - Students and copies |
117 | 10 | Alex Alex | |
118 | 10 | Alex Alex | This command will associate every copy with the student who answered. |
119 | 10 | Alex Alex | |
120 | 10 | Alex Alex | <pre> |
121 | 10 | Alex Alex | $ auto-multiple-choice association-auto --data ./data --notes-id numero-etudiant --liste ./students-list.csv --liste-key no |
122 | 10 | Alex Alex | </pre> |
123 | 10 | Alex Alex | |
124 | 10 | Alex Alex | The "--notes-id" option specifies the identification string used in your latex file with the \AMCcode command. |
125 | 17 | Alex Alex | The "--liste" option specifies the comma separated file with your student's name. "Read AMC's documentation to know the format of that file":https://www.auto-multiple-choice.net/auto-multiple-choice.en/graphical-interface.shtml#sec.students.id |
126 | 1 | ||
127 | 14 | Alex Alex | h2. Associating a copy (sheet) with a student's id |
128 | 14 | Alex Alex | |
129 | 14 | Alex Alex | From version 1.1.0 r1152 you can manually associate a copy with a student ID. If one of your student makes an error when she enters her student's ID, you can use the following commands: |
130 | 14 | Alex Alex | <pre> |
131 | 14 | Alex Alex | auto-multiple-choice association --data ./data --list |
132 | 14 | Alex Alex | auto-multiple-choice association --data ./data --set --student 12 --id 3177 |
133 | 14 | Alex Alex | </pre> |
134 | 14 | Alex Alex | |
135 | 14 | Alex Alex | This would associate sheet 12 with student ID 3177. |
136 | 14 | Alex Alex | |
137 | 11 | Alex Alex | h2. Annote scan papers |
138 | 1 | ||
139 | 11 | Alex Alex | The following command will annotate the copies in the copies/ directory for all questions: |
140 | 1 | ||
141 | 11 | Alex Alex | <pre> |
142 | 11 | Alex Alex | $ auto-multiple-choice annote --projet ./ --data ./data --fich-noms students-list.csv |
143 | 11 | Alex Alex | </pre> |
144 | 11 | Alex Alex | |
145 | 11 | Alex Alex | Then, you can also prepare a file for each of your student with its exam copy and answers. This command will merge your scans with a copy of your student's test: |
146 | 11 | Alex Alex | |
147 | 11 | Alex Alex | <pre> |
148 | 11 | Alex Alex | $ auto-multiple-choice regroupe --projet ./ --sujet DOC-subject.pdf --fich-noms students-list.csv --tex-src test.tex --compose |
149 | 11 | Alex Alex | </pre> |
150 | 11 | Alex Alex | |
151 | 11 | Alex Alex | This will create files in the cr/corrections/pdf/ directory. One file per student. |
152 | 11 | Alex Alex | Read AMC-regroupe manpage for other options. |
153 | 11 | Alex Alex | |
154 | 11 | Alex Alex | h2. Export marks |
155 | 11 | Alex Alex | |
156 | 11 | Alex Alex | If you want a spreadsheet with the marks, you can type the following command: |
157 | 11 | Alex Alex | |
158 | 11 | Alex Alex | <pre> |
159 | 11 | Alex Alex | auto-multiple-choice export --data ./data \ |
160 | 11 | Alex Alex | --module ods \ |
161 | 11 | Alex Alex | --fich-noms students-list.csv \ |
162 | 1 | --o output-note.ods |
|
163 | 12 | Alex Alex | </pre> |
164 | 12 | Alex Alex | |
165 | 12 | Alex Alex | h2. Other commands |
166 | 12 | Alex Alex | |
167 | 12 | Alex Alex | If you want to mail PDF annotated answer sheets to students, look at the AMC-mailing command: |
168 | 12 | Alex Alex | |
169 | 12 | Alex Alex | <pre> |
170 | 12 | Alex Alex | $ man AMC-mailing |
171 | 11 | Alex Alex | </pre> |
172 | 15 | Alex Alex | |
173 | 15 | Alex Alex | h2. Miscellaneous Remarks |
174 | 16 | Alex Alex | |
175 | 15 | Alex Alex | # For the option "--debug ./debug.log", note the "./" preceding the name of log file |
176 | 15 | Alex Alex | # For the option "--prefix directory", namely project directory, give full path. If required, run your AMC-* command in the project directory and use the unix command "pwd" (present working directory) |
177 | 15 | Alex Alex | # For the analyse command: |
178 | 15 | Alex Alex | auto-multiple-choice analyse full-path-to-project/scans/* --other-options... |
179 | 15 | Alex Alex | is advised as AMC registers the location of scans. If you go to project directory and run: |
180 | 15 | Alex Alex | auto-multiple-choice analyse scans/* |
181 | 15 | Alex Alex | you will discover later that AMC-annotate will have problems in locating the scans. |
182 | 15 | Alex Alex | # For the annotate command: |
183 | 15 | Alex Alex | auto-multiple-choice annotate --subject full-path-to-project-dir/DOC-sujet.pdf --corrected full-path-to-project-dir/DOC-corrige.pdf --others |
184 | 15 | Alex Alex | is advised as poppler has difficulties if you use --subject ./DOC-sujet.pdf even if you are in project directory while running the command. |
185 | 15 | Alex Alex | # For a reasonable interface to AMC-* commands, unzip the attached and read README.txt |