Script your slides in YAML file and show it in terminal.
Project description
TermSlides
Script your slides in YAML file and show it in terminal.
Install
pip install termslides
Show Slides
termslides your_slides.yaml
Compose Slides
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
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 currnt terminal window. The rest of key-value pairs are treated as slide name-content pairs.
The slide content is another key-value pairs. content
is compulsory. The following are optional.
notes
: Notes for current slide which is shown in slides list mode.duration
: The time in frames before switching to next slide. There are 20 frames per second.startAnimation
: Slide starting animation.scroll
only.endAnimation
: Slide ending animation.scroll
ormatrix
.star
: A whole screen effect. The value is number of stars.snow
: A whole screen effect. Set value totrue
to enable.
The value of content
is yet another key-value pairs. type
and content
are compulsory. Following are the available type
s.
-
text
: Text, the most common type.- Other compulsory attributes:
- None
- Optional attributes:
animation
:typing
ormirage
.afterStart
: Set value totrue
to start text animation after slide starting animation.colour
:black
,red
,green
,yellow
,blue
,magenta
,cyan
,white
,rainbow
orcycle
.cycle
doesn'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
,reverse
orunderline
bg
: The background colour.black
,red
,green
,yellow
,blue
,magenta
,cyan
orwhite
.
- Other compulsory attributes:
-
figlet
: pyfiglet- Other compulsory attributes:
font
: Font examples
- Optional attributes:
animation
:typing
,mirage
orfire
.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 totrue
to 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:
Key Binding
- 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
Example
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.