Using AMC in command line only

These instructions should help you use AMC in command line only without having to open the graphical user interface.
These instructions work with version 1.1.0 of AMC.

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.

Additionnaly, if you ever need to open the GUI, the commands described here are all compatible with

Creating a new project

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:

# file name:

mkdir $PROJECT_DIR/$1
mkdir $PROJECT_DIR/$1/cr
mkdir $PROJECT_DIR/$1/cr/corrections
mkdir $PROJECT_DIR/$1/cr/corrections/jpg
mkdir $PROJECT_DIR/$1/cr/corrections/pdf
mkdir $PROJECT_DIR/$1/cr/diagnostic
mkdir $PROJECT_DIR/$1/cr/zooms
mkdir $PROJECT_DIR/$1/data
mkdir $PROJECT_DIR/$1/exports
mkdir $PROJECT_DIR/$1/scans
mkdir $PROJECT_DIR/$1/copies

then you can create a new poject by typing:

$ ./ my-new-project1

Prepare tests

You need to have your .tex file created before following with the instructions below.
In the following examples, we will suppose that your latex file name is test.tex

Creating the PDFs

The next step consists of creating the subject file, the correction file and the position file. By typing:

$ cd ~/MC-Projects/my-new-project1/
$ auto-multiple-choice prepare --mode s --prefix ./ ./test.tex \
    --out-sujet DOC-subject.pdf \
    --out-corrige DOC-correction.pdf \
    --out-calage DOC-calage.xy
This command will create 3 files:
  • DOC-subject.pdf is a file containing all copies.
  • DOC-correction.pdf is a file with the correct answer checked so you can review the answers.
  • DOC-calage.xy is the position file.

You also need to extract the scroing data from the source file. Typing from your project directory:

$ auto-multiple-choice prepare --mode b --prefix ./ ./test.tex --data ./data/

This command will create various SQLite files in the data directory.

Prepare the layout information

The following command will get the layout information from the working document to the layout database:

$ auto-multiple-choice meptex --src $PROJECT_DIR/$1/DOC-calage.xy --data $PROJECT_DIR/$1/data

Printing your documents

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:

$ auto-multiple-choice imprime --sujet ./DOC-subject.pdf \ 
    --data ./data/ \ 
    --methode file \ 
    --output ./copies/test-%e.pdf

Analyzing the copies

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.

$ auto-multiple-choice analyse --projet ./ ./scans/*

You can also have certain files analyzed using the --list-fichiers option. Read AMC-analyse's manpage for more information.

$ man AMC-analyse

Compute marks

Using the following command will compute the marks:

$ auto-multiple-choice note --data ./data --seuil 0.15

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.
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.

$ man AMC-note

Automatic association - Students and copies

This command will associate every copy with the student who answered.

$ auto-multiple-choice association-auto --data ./data --notes-id numero-etudiant --liste ./students-list.csv --liste-key no

The "--notes-id" option specifies the identification string used in your latex file with the \AMCcode command.
The "--liste" option specifies the comma separated file with your student's name. Read AMC's documentation to know the format of that file

Associating a copy (sheet) with a student's id

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:

auto-multiple-choice association --data ./data --list
auto-multiple-choice association --data ./data --set --student 12 --id 3177

This would associate sheet 12 with student ID 3177.

Annote scan papers

The following command will annotate the copies in the copies/ directory for all questions:

$ auto-multiple-choice annote --projet ./ --data ./data --fich-noms students-list.csv

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:

$ auto-multiple-choice regroupe --projet ./ --sujet DOC-subject.pdf --fich-noms students-list.csv --tex-src test.tex --compose

This will create files in the cr/corrections/pdf/ directory. One file per student.
Read AMC-regroupe manpage for other options.

Export marks

If you want a spreadsheet with the marks, you can type the following command:

auto-multiple-choice export --data ./data \
  --module ods \
  --fich-noms students-list.csv \
  --o output-note.ods

Other commands

If you want to mail PDF annotated answer sheets to students, look at the AMC-mailing command:

$ man AMC-mailing

Miscellaneous Remarks

  1. For the option "--debug ./debug.log", note the "./" preceding the name of log file
  2. 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)
  3. For the analyse command:
    auto-multiple-choice analyse full-path-to-project/scans/* --other-options...
    is advised as AMC registers the location of scans. If you go to project directory and run:
    auto-multiple-choice analyse scans/*
    you will discover later that AMC-annotate will have problems in locating the scans.
  4. For the annotate command:
    auto-multiple-choice annotate --subject full-path-to-project-dir/DOC-sujet.pdf --corrected full-path-to-project-dir/DOC-corrige.pdf --others
    is advised as poppler has difficulties if you use --subject ./DOC-sujet.pdf even if you are in project directory while running the command.
  5. For a reasonable interface to AMC-* commands, unzip the attached and read README.txt (513.7 kB) shreikant kv, 01/30/2016 01:25 pm