-
Notifications
You must be signed in to change notification settings - Fork 18
adventuresmith cli
adventuresmith-cli is a commandline application useful for creating and testing Adventuresmith generators. If you're working on a translation, or creating a new generator, you can use adventuresmith-cli rather than setting up an Android development environment.
I've run adventuresmith-cli on Windows and Linux (Ubuntu 16.04). Windows powershell/cmd have issues displaying UTF-8 characters in the console, use the --out FILE option to write generator output to a file if that matters for what you're testing.
The latest version of the cli will be available here https://github.com/stevesea/Adventuresmith/releases/latest
- download adventuresmith-cli.zip to your desktop
- Unzip it wherever is convenient for you
Contents of the zip file:
\---adventuresmith-cli
+---bin
| # shell and .bat scripts to run adventuresmith
|
| adventuresmith-cli
| adventuresmith-cli.bat
|
+---examples
| # sample adventuresmith generators
|
| items.meta.yml
| items.yml
| magic.meta.yml
| magic.yml
| spells.fr.yml
| spells.meta.fr.yml
| spells.meta.yml
| spells.yml
| wizard_names.yml
|
\---lib
# adventuresmith-cli and its dependencies
adventuresmith-cli.jar
adventuresmith-core.jar
.....
> .\adventuresmith-cli\bin\adventuresmith-cli -h
usage: adventuresmith-cli [-h] {core-exercise,core-list,run} ...
A CLI interface to test Adventuresmith YaML files
positional arguments:
{core-exercise,core-list,run}
additional help
core-exercise exercise all the generators in Adventuresmith-core
core-list list all the generators in Adventuresmith-core
run run a generator from the filesystem
optional arguments:
-h, --help show this help message and exit
Go to https://stevesea.github.io/Adventuresmith/ for more information
> .\adventuresmith-cli\bin\adventuresmith-cli run -h
usage: adventuresmith-cli run [-h] [-l L] [-i N] [-o OUT] FILE
positional arguments:
FILE generator input file
optional arguments:
-h, --help show this help message and exit
-l L, --locale L generator(s) will be run in the given locale
(default: en_US)
-i N, --iterations N number of iterations (default: 1)
-o OUT, --out OUT Output file to which generator output will be
written. If none given, will be output to console
Here is how I'd run one of the sample files bundled in adventuresmith-cli.zip
> .\adventuresmith-cli\bin\adventuresmith-cli run .\adventuresmith-cli\examples\spells.yml -i 5
INFO Running generator: adventuresmith-cli\examples\spells.yml
Call of Health
Hogana�s Fog Pillar
Brimstone Memory
Slooleius�s Energy Bond
Magnificent Oath of Zaltorr
If I want to specify the French (France) locale, I'd run it like:
> .\adventuresmith-cli\bin\adventuresmith-cli run .\adventuresmith-cli\examples\spells.yml -i 5 -l fr_FR
INFO Running generator: adventuresmith-cli\examples\spells.yml
Envie Invuln�rable de Juteria
Sph�re de/des/de de l'Amour
Mur du/de la D�sespoir Suintant
M�moire de Mensonge de Tolvalva
Tromperie Mal�fique
That worked because there's another spells*.yml file in that directory: spells.fr.yml, adventuresmith sees that you're requesting fr_FR locale and will attempt to find it for you.
I could have also just run spells.fr.yml directly:
> .\adventuresmith-cli\bin\adventuresmith-cli run .\adventuresmith-cli\examples\spells.fr.yml -i 5
INFO Running generator: adventuresmith-cli\examples\spells.fr.yml
Sceau de Brume de Mor-sira
Temp�te de/des/de de l'Connaissance
Globe du/de la Marteau �trange
Sang Transmutateur de Rhikang
Tissu Insoutenable de Cynaris
or, on Linux:
⟫ adventuresmith-cli/bin/adventuresmith-cli run adventuresmith-cli/examples/spells.yml -l fr -i 5
INFO Running generator: adventuresmith-cli/examples/spells.yml
Lame de/des/de de l'Vigueur
Verrou du/de la Pourriture Empoisonné
Vague de/des/de de l'Puissance
Bête Dévorant
Lance de Air de Indula
⟫ adventuresmith-cli/bin/adventuresmith-cli run adventuresmith-cli/examples/spells.yml -l fr -i 5
INFO Running generator: adventuresmith-cli/examples/spells.yml
Vent Omnipotent de Cynvalva
Poche Silencieux
Cupidité Démoniaque de Hernak
Serment Prismatique
Vapeur Empêtrant
This command lists the generators included in adventuresmith-core
> .\adventuresmith-cli\bin\adventuresmith-cli core-list -h
usage: adventuresmith-cli core-list [-h] [-l L]
optional arguments:
-h, --help show this help message and exit
-l L, --locale L generator(s) will be run in the given locale
(default: en_US)
This command allows you to run all the generators in adventuresmith-core
> .\adventuresmith-cli\bin\adventuresmith-cli core-exercise -h
usage: adventuresmith-cli core-exercise [-h] [-l L] [-i N] [-o OUT]
[--filter FILTER]
optional arguments:
-h, --help show this help message and exit
-l L, --locale L generator(s) will be run in the given locale
(default: en_US)
-i N, --iterations N number of iterations (default: 20)
-o OUT, --out OUT Output file to which generator output will be
written. If none given, will be output to console
--filter FILTER filter which generators to run
If I wanted to run each of the Freebooter on the Frontier generators a single time, and output in French:
> .\adventuresmith-cli\bin\adventuresmith-cli core-exercise -i 1 --filter freeboot -l fr_FR
INFO fr_FR - Freebooters on the Frontier (freebooters_on_the_frontier)
INFO -> Charme
D�mon du/de la Fl�chette Omniscient
INFO -> Personnage
<html>
<body>
<h4>
Livret - Clerc
</h4>
<h5>
Nom & H�ritage
</h5>
<p>
Delithran
<em>
Masculin
</em>
<br>
.....