storii
Build little ascii friends that can speak and move
^ ^ hello
(霉.霉 )___(
//||-//||
^ ^ world!
( 么.么)___(
//||-//||
Installation
python3 -m pip install storii
# storii [filename] [optional:speed] [optional:repeat]
Usage
Example:
ls -l stories/
... story1.yaml
... story2.yaml
... story3.yaml
storii stories/story1.yaml
Build stories
A story is a collection of states
A state is a single snapshot that describes a character
Example:
state:
ears : ' ^ ^'
face : ' (霉.霉 )___('
paws : ' ||\\-||\\'
A state is always part of a "states" root element
Example:
states:
- state:
top: " ^ ^ "
mid: " (霉.霉 )___( "
low: " //||-//|| "
- state:
top: " ^ ^ "
mid: " ( 么.么)___( "
low: " //||-//|| "
Add chit-chat in a state
Example:
env:
msg: "hello world!"
states:
- state:
sky: ' {msg}'
ears: ' ^ ^ / '
face: ' (霉.霉 )___( '
paws: ' ||\\-||\\ '
Repeat a story n times
Example:
repeat: 3
states:
- state:
top: " ^ ^ "
mid: " (霉.霉 )___( "
low: " //||-//|| "
- state:
top: " ^ ^ "
mid: " ( 么.么)___( "
low: " //||-//|| "
Speed up the story (1 to 10)
Example:
speed: 5
states:
- state:
top: " ^ ^ "
mid: " (霉.霉 )___( "
low: " //||-//|| "
- state:
top: " ^ ^ "
mid: " ( 么.么)___( "
low: " //||-//|| "
Develop
Build dist
git clone https://github.com/guillaumefe/storii
cd storii
# Edit setup.py
python3 -m pip install setuptools
python3 setup.py sdist
Install (local)
python3 -m pip install dist/storii-{version}
Push to pip (test)
python3 -m pip install twine
# Register at https://test.pypi.org
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Install from pip (test)
python3 -m pip install --index-url https://test.pypi.org/simple/ storii
Push to pip (prod)
python3 -m pip install twine
# Register at https://pypi.org
python3 -m twine upload dist/*
Install from pip (prod)
python3 -m pip install storii