Skip to main content

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

Examples

Examples can be found in the examples folder.

Templates

YASS is shipped with 3 templates:

  • default.tex which has 4 columns: last name, first name, id and signature (empty).
  • rank.tex which has 5 columns: last name, first name, id, rank (empty) and signature (empty).
  • no-id.tex which 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

automatic_signature_sheet-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

automatic_signature_sheet-0.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file automatic_signature_sheet-0.1.0.tar.gz.

File metadata

  • Download URL: automatic_signature_sheet-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.11 Linux/6.17.9-arch1-1

File hashes

Hashes for automatic_signature_sheet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f865cce1691864f7d9421fa154e6c185468c751dbb4e3707e3a05b0f938441c1
MD5 dfb74f6d6da86f52100f067842668d89
BLAKE2b-256 2d56f31eeb35d19ecc2ed1f9dd031a4bc3ba1649079a79dfd7a005ff13386ead

See more details on using hashes here.

File details

Details for the file automatic_signature_sheet-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for automatic_signature_sheet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9fb2affb7e87d141c5a9f198abaf9aad296c6a614d2bc55923fe499018a91b1f
MD5 f95a3791cfdba1f46f36038d2788eee9
BLAKE2b-256 f85c8460e73ce52ebb4989204d8f64b1011c74864e5508cbb5129f5447ef9fef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page