Module generate

Module generate 

Source
Expand description

§Generation Sub-command

This module implements the gen sub-command used to quickly produce sample data for the various generators in lib_efo. The command has no side-effects beyond printing the generated data; it is intended for interactive use or for embedding in scripts.

§Available sub-commands

Sub‑commandWhat it printsTypical output
characterCharacter names (short or long)Eldric the Bold
eventRandom event ideasA mysterious fog descends over the town
townTown namesGlimmerdale
exoticExotic character namesZar‑nith the Wanderer
calamityCalamity namesGreat Plague of 1743
blockerBlocker namesStone Wall of the North

All sub‑commands share the same options:

  • -n / --number – how many items to generate (default = 1)
  • --short – print the short form when applicable (ignored for event, exotic, calamity, blocker)
  • --name – output only the name string, no extra formatting (good for scripting)

§Usage

# 3 long character names
gen character -n 3

# 1 short town name
gen town -n 1 --short

# 5 event ideas, only the names
gen event -n 5 --name

# A single exotic character name
gen exotic -n 1

# 2 calamity names
gen calamity -n 2

# 4 blocker names, short form
gen blocker -n 4 --short

Tip – redirect or pipe the output:
gen character -n 10 > chars.txt


§Summary

Sub‑commandUsage exampleWhat it does
charactergen character -n 5 --shortPrints 5 short (or long if --short omitted) character names
eventgen event -n 3 --namePrints 3 event names only
towngen town -n 2Prints 2 town names (short form by default)
exoticgen exotic -n 1Prints 1 exotic character name
calamitygen calamity -n 2Prints 2 calamity names
blockergen blocker -n 4 --shortPrints 4 blocker names (short form)

All sub‑commands simply output the generated data; they do not alter any files or state.

Structs§

Qty
Common arguments for the generation subcommands.

Enums§

GenCmd
The types of examples to generate.

Functions§

gen_handler
Handles the subcommand for generating various kinds of entities.
handle_blocker 🔒
Print a blocker name
handle_calamity 🔒
Print a calamity name
handle_chr 🔒
Print a character name
handle_event 🔒
Print events
handle_exotic 🔒
Prints exotic name
handle_town 🔒
Prints town