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‑command | What it prints | Typical output |
|---|---|---|
character | Character names (short or long) | Eldric the Bold |
event | Random event ideas | A mysterious fog descends over the town |
town | Town names | Glimmerdale |
exotic | Exotic character names | Zar‑nith the Wanderer |
calamity | Calamity names | Great Plague of 1743 |
blocker | Blocker names | Stone 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 forevent,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 --shortTip – redirect or pipe the output:
gen character -n 10 > chars.txt
§Summary
| Sub‑command | Usage example | What it does |
|---|---|---|
character | gen character -n 5 --short | Prints 5 short (or long if --short omitted) character names |
event | gen event -n 3 --name | Prints 3 event names only |
town | gen town -n 2 | Prints 2 town names (short form by default) |
exotic | gen exotic -n 1 | Prints 1 exotic character name |
calamity | gen calamity -n 2 | Prints 2 calamity names |
blocker | gen blocker -n 4 --short | Prints 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