A tool to automate printing signature sheets.
Project description
Yoann's Automatic Signature Sheet (YASS)
I am an associate professor at Sorbonne Université (France), and it is not uncommon that I have to print signature sheet (for exams or mandatory sessions).
At my disposal: the Moodle tool, where I can download a list of the students in several format (.ods, .csv, .pdf, etc...). Until recently, I was using libreoffice calc with the .ods file and reformatting it. But this was not the most efficient: first because the operations were always the same (add borders, add blank space, adjust column width to use full width of the page, etc...) and not automatized, and second, because it has happened several times that libreoffice just bugged and was printing blank pdf pages (although the information was still here).
Hence, I decided to code a small tool that would take a list of students/people as a (csv) input and output a pdf file for the signature, using LaTeX. The process is fully automated and can be used with a command-line interface that is described later.
Installation
Yass may be installed from the PyPi repository:
pip install automatic-signature-sheet
For ArchLinux users, a PKGBUILD file is available in the archlinux folder. Hence the package can be installed with the following commands:
git clone https://github.com/nanoy42/yass
cd yass/archlinux
makepkg -si
Examples
Examples can be found in the examples folder.
Templates
YASS is shipped with 3 templates:
default.texwhich has 4 columns: last name, first name, id and signature (empty).rank.texwhich has 5 columns: last name, first name, id, rank (empty) and signature (empty).no-id.texwhich has 3 columns: last name, first name and signature (empty).
Command line interface
The command line interface allows for a simple use of the tool. In its simplest form, the CLI can be used as follows:
yass file.csv
By default, this will output the generated file to file.pdf. If the file already exists, yass will prevent the generation unless the -f/--force flag is passed. It is also possible to change the output filename with the -o/--output flag:
yass file.csv -o output.pdf
The title of the signature sheet can be changed with -t/--title,
yass file.csv -t "Some exam"
The vertical size of the signature (defaults to 50pt) can be changed with the -s/--size flag. Note that the unit may not be omitted.
The template can be changed with the -T/--template flag.
yass file.csv -T rank.tex
It is possible to force yass to use the same order in the CSV file (and not perform sorting on the last name) by providing the --no-sort flag.
Finally, the user may use -i/--ignore-lines, --first-name-column, --last-name-column and --person-id-column to change which column is used in the CSV.
Here is the documentation of the command line
usage: yass [-h] [--version] [-t TITLE] [-s SIZE] [-f] [--no-sort] [-i IGNORE_LINES] [--first-name-column FIRST_NAME_COLUMN] [--last-name-column LAST_NAME_COLUMN] [--person-id-column PERSON_ID_COLUMN]
[-T {default.tex,no-id.tex,rank.tex}] [-o OUTPUT]
filename
positional arguments:
filename
options:
-h, --help show this help message and exit
--version show program's version number and exit
-t, --title TITLE Title of the signature sheet
-s, --size SIZE Size, in pt, of the signature box (default 50pt). Unit may not be omitted.
-f, --force Force the generation of the file even if the output file exists.
--no-sort Prevent sorting using the alphabetical order on the last name.
-i, --ignore-lines IGNORE_LINES
Number of lines to ignore in the CSV (header(s)). Default: 1.
--first-name-column FIRST_NAME_COLUMN
Column of the first name. Default: 0.
--last-name-column LAST_NAME_COLUMN
Column of the last name. Default: 1.
--person-id-column PERSON_ID_COLUMN
Column of the person id.. Use a negative value to ignore person id. Default: 2.
-T, --template {default.tex,no-id.tex,rank.tex}
LaTeX template to use. Default: default.tex
-o, --output OUTPUT Force the output name. Default: input name with .pdf
License
This software is released under the MIT license. For more details, check the LICENSE file or visit https://opensource.org/licenses/MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file automatic_signature_sheet-0.2.1.tar.gz.
File metadata
- Download URL: automatic_signature_sheet-0.2.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Linux/6.18.13-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11f940c7187d0bd7c1dcda8528e998be0e8c53bfce19821889d418deb8082a9e
|
|
| MD5 |
2e99eba88f55dcbe38efb7eddd2cf639
|
|
| BLAKE2b-256 |
5d5e92d04cb257bf4d61562f59c7466f8ea147fd9a4aa84ce8ce7b735ae2f052
|
File details
Details for the file automatic_signature_sheet-0.2.1-py3-none-any.whl.
File metadata
- Download URL: automatic_signature_sheet-0.2.1-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.14.3 Linux/6.18.13-arch1-1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81d1871176e91f0ee50a705f352e2886222494b227a424cebea4787c1c6c5fb6
|
|
| MD5 |
85d9054d0d73d6ce04700a19afc0c72d
|
|
| BLAKE2b-256 |
160a4528b4fdda3ddf926e60b85637bd43ae473af3404f1ef1396f74ea99d3aa
|