Skip to main content

A PDF page/image randomizer, or flashcard quiz from a PDF.

Project description

pdf-shuffle

PyPI version shields.io PyPI license PyPI pyversions

A PDF page/image randomizer, or flashcard quiz from a PDF.

Installation

$ pip install pdf-shuffle

Usage

pdf-shuffle comes with 2 CLI applications:

$ pdf-shuffle --help
Usage: pdf-shuffle [OPTIONS] FILENAME

Options:
  --start INTEGER
  --end TEXT
  --step INTEGER
  --random / --no-random
  --host TEXT
  --port INTEGER
  --help                  Show this message and exit.
$ pdf-shuffle test.pdf

And,

$ pdf-quiz --help
Usage: pdf-quiz [OPTIONS] FILENAME

Options:
  --start INTEGER
  --end TEXT
  --step INTEGER
  --random / --no-random
  --host TEXT
  --port INTEGER
  --help                  Show this message and exit.
$ pdf-quiz quiz.pdf

Of course, you can invoke the app from a Python script as well.

from pdf_shuffle import init
init('test.pdf')

Or,

from pdf_shuffle import init_quiz
init_quiz('quiz.pdf')

Advanced usage

By default, quiz.pdf means, excluding the first slide, every first and second slides are front of the card and back of the card, respectively. You can change that, with:

import os, json
os.environ['PAGE_RANDOM'] = json.dumps([2, 3, 5, 9, 12])

Spaced-repetition system (SRS)

If you are looking into extending the app with SRS, you might try, srs-sqlite, which I currently use.

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

pdf-shuffle-0.1.2.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

pdf_shuffle-0.1.2-py2.py3-none-any.whl (13.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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