Script your slides in YAML and show it in terminal.
pip install termslides
termslides your_slides.yaml
termslides parses YAML file input for slides, which is expected to contain key-value pairs.
Following is an example YAML file with one slide.
title: TermSlides Example
Diagram:
notes: This is an example
startAnimation: scroll
pageAnimation: stars
endAnimation: matrix
content:
- type: text
content: Hello world!
animation: typing
afterStart: true
colour: rainbow
y: 2
x: 2
At the top level, title is reserved keyword. Its value will be set as the title of current terminal window. The rest of key-value pairs are treated as slide name-content pairs.
The slide content is another set of key-value pairs. content key is compulsory and the following are optional:
notes: Notes for current slide which is shown in slides list mode.duration: The show time in frames before switching to next slide. The frame rate is 20 frames/second.startAnimation: Slide starting animation.scrollonly.endAnimation: Slide ending animation.scroll,matrix,shoot,droporwipe.pageAnimation: The animation between starting and ending.stars,snow,explosion,fireworksorrain.
The value of content is yet another set of key-value pairs. type and content are common compulsory keys.
-
text: Text, the most common type.- Other compulsory attributes:
- None
- Optional attributes:
animation:typingormirage.afterStart: Set value totrueto start text animation after slide starting animation.colour:black,red,green,yellow,blue,magenta,cyan,white,rainboworcycle.cycledoesn't work withanimation.y: Default value is to put the text in the middle of y axis.x: Default value is to put the text in the middle of x axis.attr:bold,normal,reverseorunderlinebg: The background colour.black,red,green,yellow,blue,magenta,cyanorwhite.
- Other compulsory attributes:
-
figlet: pyfiglet- Other compulsory attributes:
font: Font examples
- Optional attributes:
animation:typing,mirageorfire.afterStart: Same astext.colour: Same astext.y: Same astext.x: Same astext.attr: Same astext.bg: Same astext.
- Other compulsory attributes:
-
uml: Sequence diagram by PlantUML- Other compulsory attributes:
- None
- Optional attributes:
animation: Same astext.afterStart: Same astext.colour: Same astext.y: Same astext.x: Same astext.attr: Same astext.bg: Same astext.
- Other compulsory attributes:
-
table: Table by python-tabulate- Other compulsory attributes:
- None
- Optional attributes:
hasHeader: Set value totrueto interpret the first row of data as table header.tablefmt: Table format.numalign: Number alignment.floatfmt: Number formating.animation: Same astext.afterStart: Same astext.colour: Same astext.y: Same astext.x: Same astext.attr: Same astext.bg: Same astext.
- Other compulsory attributes:
-
image: Grey scale ascii text image- Other compulsory attributes:
- None
- Optional attributes:
height: Target image heighty: Same astext.x: Same astext.
- Other compulsory attributes:
-
color-image: Block color image- Other compulsory attributes:
- None
- Optional attributes:
height: Target image heighty: Same astext.x: Same astext.
- Other compulsory attributes:
- Slides List Mode
- ↓: Next slide
- ↑: Previous slide
- Space: Play ending animation if any
- Enter: Switching to presentation mode
- q: Quit
- Presentation Mode
- →: Next slide
- ←: Previous slide
- Space: Play ending animation or next slide
- Enter or q: Switching to slides list mode
