Skip to main content

funny-passphrase

This is the repository of a library and command line tools to index text files, and generate passphrases from sets of them.

Passphrase generator

The passphrase generator takes one or more sets of indexed text files, and it generates one or more passphrases composed by the number of specified words. The program keeps rotating on the sets, choosing a word from all the words in the indexed files composing the set. being specified

usage: funny-passphrase [-h] --wg WGS [WGS ...] -w WORDS [-n NUM] [-o OUTPUT]

Funny passphrase generator

optional arguments:
  -h, --help            show this help message and exit
  --wg WGS [WGS ...]    The indexed files which integrate this group (default: None)
  -w WORDS, --words WORDS
                        Number of words to generate in each passphrase (default: None)
  -n NUM, --num NUM     Number of passphrases to generate (default: 1)
  -o OUTPUT, --output OUTPUT
                        Output file (default stdout) (default: -)

Text indexer

The indexed text files consumed by the passphrase generator are generated through the text indexer. A indexed text file is a seekable xz file with two streams: the first one is the text itself; and the second stream contains the offsets to the different lines in the text.

usage: fp-indexer [-h] input output

Funny passphrase indexer

positional arguments:
  input       Input file. If the name is '-', standard input will be used
  output      Output file

optional arguments:
  -h, --help  show this help message and exit

Command line usage

Usual pattern is indexing at least one text file (for instance, the list English adjectives and nouns and Spanish adjectives from Wiktionary), and then use the passphrase generator as many times as needed:

wiktionary-fetcher --lang en --terms nouns en-nouns.txt
wiktionary-fetcher --lang en --terms adjectives en-adjectives.txt
wiktionary-fetcher --lang es --terms adjectives es-adjectives.txt

fp-indexer en-nouns.txt en_nouns.txt.xz_idx
fp-indexer en-adjectives.txt en_adjectives.txt.xz_idx
fp-indexer es-adjectives.txt es_adjectives.txt.xz_idx

# Generate 10 passphrases of 6 words each,
# rotating between adjectives and nouns
funny-passphrase --wg en_adjectives.txt.xz_idx es_adjectives.txt.xz_idx --wg en_nouns.txt.xz_idx -w 6 -n 10

Release files for funny-passphrase 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for funny-passphrase 0.2.3
File Size Uploaded
funny-passphrase-0.2.3.tar.gz 17.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for funny-passphrase 0.2.3
File Interpreter ABI Platform
funny_passphrase-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 37.3 kB

Release files / funny-passphrase-0.2.3.tar.gz

Download URL funny-passphrase-0.2.3.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fbf333e8d909584ee3ecbec5cb1f525f216eb8df35e9a0892e6fcbcc4defb8af
BLAKE2b-256 checksum
How to use checksums
5308e4238f72b12772d840f85c76c3a2d196a0157696baed7641dfa797a9ba79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release files / funny_passphrase-0.2.3-py3-none-any.whl

Download URL funny_passphrase-0.2.3-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e484361afc8498fdfb13476e6bcc3c00f0d795d374c624c386885e2887c39a7c
BLAKE2b-256 checksum
How to use checksums
cc1cba5273b5e11515b04d83125e169dd510f7ec43b18f9989f570b648dbd936
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.13

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page