Commit c80eb9b4 authored by Christian Rohlfing's avatar Christian Rohlfing
Browse files

small clean up in README

parent c99e0d44
......@@ -52,7 +52,7 @@ Exemplary outputs can be downloaded:
python ./watermark.sh --help
```
The current version of code was tested on Windows10, Ubuntu 20.04.1 LTS and macOS 10.14 Mojave to ensure platform independance.The code has the following software dependencies which needs to installed before the programs can be run successfully. Specific version numbers along with categorisation based on script requirement is available [here](Dependancies.md):
The current version of code was tested on Windows10, Ubuntu 20.04.1 LTS and macOS 10.14 Mojave to ensure platform independence.The code has the following software dependencies which needs to installed before the programs can be run successfully. Specific version numbers along with categorisation based on script requirement is available [here](Dependancies.md):
* Imagemagick
* Ghostscript
* Python 3.8/3.9
......@@ -91,7 +91,7 @@ docker run --name examscan --rm -v $(pwd):$(pwd) -w $(pwd) examscan:latest batch
Run `preparepdf.py` (if you have submissions in a zip and not as scans), `supplements.py` (if you want to add watermarked sample solutions as well), `watermark.py`, `encrypt.py`, and `preparemoodle.py` (or run `batch.py` which runs all) as described in the sections below. In summary, these steps will
1. unzip all PDF files from the zip and rename them according to the schema `<Matriculationnumber>_<Lastname>`
1. unzip all PDF files from the zip and rename them according to the schema `<Matriculation number>_<Lastname>`
1. prepare sample solution for each students
1. watermark each page of each PDF with the corresponding matriculation number,
1. encrypt each PDF with a password (global or per-student) and
......@@ -129,24 +129,13 @@ Folder `supplements_out` contains copies of the sample solutions for each studen
We assume that the folder `./pdfs` holds the scans of the exams and .
The filename of each PDF should start with the matriculation number of the student, e.g. `./pdfs/123456_Lastname.pdf`.
Arguments:
1. infolder (MANDATORY): Folder from which the pdfs to be watermarked will be taken from
1. outfolder (MANDATORY): Folder where the watermarked pdfs will be stored
1. fontsize (OPTIONAL) : Font size of watermark text in points. Denoted by `--fontsize`. Default is 75
1. cores (OPTIONAL) : Number of cores for parallel processing. Denoted by `--cores`. Default is 1
1. tmp (OPTIONAL) : Temporary folder where intermediate files will be stored and later deleted. Denoted by `--tmp`. Default is './tmp'
1. dpi (OPTIONAL) : Dots per inch resolution parameter for the PDF. Denoted by `--dpi`. Default is 150.
1. quality (OPTIONAL) : Compression quality of the image of each page of the PDF. Denoted by `--quality`. Default is 75
```bash
python watermark.py --in ./pdfs --out ./pdfs_watermarked --cores 2
```
Folder `pdfs_watermarked` contains watermarked PDFs, with each page watermarked with the matriculation number of the student.
**TIP:** Play around with `dpi` and `quality` parameters according to your requirements. Higher values for these two will result in high resolution PDFs of bigger size(ideal for when the number of files is low). Lower values will result in PDFs having lower filesize and low resolution (ideal when the number of files is high)
**TIP:** Play around with `dpi` and `quality` parameters according to your requirements. Higher values for these two will result in high resolution PDFs of bigger size (ideal for when the number of files is low). Lower values will result in PDFs having lower file size and low resolution (ideal when the number of files is high)
#### Watermark Sample solution copies
......@@ -158,7 +147,7 @@ python watermark.py --in ./supplements_out --out ./pdfs_watermarked --cores 2
#### Encrypt the files
Use either a global password by specifying it with the `--password` option or per-student passwords by ommiting `--password`.
Use either a global password by specifying it with the `--password` option or per-student passwords by omitting `--password`.
```bash
python encrypt.py --in ./pdfs_watermarked --out ./pdfs_encrypted --password ganzgeheim
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment