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

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.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.2.0.tar.gz (6.8 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.2.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: automatic_signature_sheet-0.2.0.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

Hashes for automatic_signature_sheet-0.2.0.tar.gz
Algorithm Hash digest
SHA256 277d51a3aa9220df5423085209e7b0882311a0661f14ea89cb9bb494c314eb43
MD5 7701a524860fce6ee49447fc5ad11a49
BLAKE2b-256 1d57c3f82b614be3be2743d8094e99d1acb1965dc37d6a81fb631f36b5a95bc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for automatic_signature_sheet-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85a905a4fdffab603727e315d8ff828fd14d2f482aedb11efa95e43d58e461db
MD5 e0f2618e7d5a9c69659f61315cbff50d
BLAKE2b-256 c3ca36db36ec7fc44e18919e676e1d61ebbc8178f650a4fec212d0aa4bafad03

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