Generate questions from orgmode files
Project description
PyQGen
- Author: Giuseppe Lipari
- Email : giuseppe.lipari@univ-lille.fr
PyQGen is a command line script to generate a randomized list of questions taken from a orgmode file. It can be used to prepare exams for large classes.
What you need in addition to PyQGen :
- Emacs with org-mode;
- A LaTeX environment.
Overview
The original list of questions must be redacted according to the org-mode format. The first level heading in this file represent groups of questions; the second level headings represent the questions ; deeper level headings represent solutions.
An example of database of questions is available HERE.
PyQGen produces an org-mode file which contains the exams. This can later be transformed into a PDF file via LaTeX.
Installing
I recommend installing PyQGen using a virtual environnement and pip. For example :
virtualenv pyqgenenv
source ./pyqgenenv/bin/activate
pip install pyqgen
PyQGen depends on orgparse to parse the org-mode file, pip automatically takes care of the dependency.
Command line options
The command is :
pyqgen [OPTIONS] output
where output
the generated file that contains the exams. The
following options are possible :
-h
,--help
shows the help message-d DB
,--db DB
specifies an input file. By default, this is equal to filedb.org
.-t TITLE
,--title TITLE
Specifies the title of each exam sheet (default: "Examen")-i IFILE
,--ifile IFILE
Text file containing the instructions to be printed on each exam (default: none)-n NCOPIES
,--ncopies NCOPIES
Number of exams to generate (default: 1)-g [NG ...]
,--ng [NG ...]
Number of questions per group (default: [1, 1, 1]). Therefore, the default assumes that the input file defines 3 question groupes, and for each exam it will randomly select one question per group. Make sure that you specify at least one number per each group (see example below).-e HEADER
,--header HEADER
Org-mode file header. This is used to personnalize the output style. Typically, you can specify the size of the sheet (using the latex package geometry), the font, the font size, etc.
Full example
TODO
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
Built Distribution
Hashes for pyqgen-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e54ec69bcfd182272a4e8c2bc9abf20952d7a6b2bc41c7a5e01176a40de4daf3 |
|
MD5 | 0ff12f595bca93af46707eeb39fde19a |
|
BLAKE2b-256 | d148c1a62aa980971da1cb0d61fe2a6484115bc90595a9fc2527be940b0dace3 |