Skip to main content

Script your slides in YAML file and show it in terminal.

Project description

TermSlides

Script your slides in YAML 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
  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. scroll only.
  • endAnimation: Slide ending animation. scroll, matrix, shoot, drop or wipe.
  • pageAnimation: The animation between starting and ending. stars, snow, explosion, fireworks or rain.

The value of content is yet another set of key-value pairs. type and content are common compulsory keys.

Available types:

  • text: Text, the most common type.

    • Other compulsory attributes:
      • None
    • Optional attributes:
      • animation: typing or mirage.
      • afterStart: Set value to true to start text animation after slide starting animation.
      • colour: black, red, green, yellow, blue, magenta, cyan, white, rainbow or cycle. cycle doesn't work with animation.
      • 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 or underline
      • bg: The background colour. black, red, green, yellow, blue, magenta, cyan or white.
  • figlet: pyfiglet

    • Other compulsory attributes:
    • Optional attributes:
      • animation: typing, mirage or fire.
      • afterStart: Same as text.
      • colour: Same as text.
      • y: Same as text.
      • x: Same as text.
      • attr: Same as text.
      • bg: Same as text.
  • uml: Sequence diagram by PlantUML

    • Other compulsory attributes:
      • None
    • Optional attributes:
      • animation: Same as text.
      • afterStart: Same as text.
      • colour: Same as text.
      • y: Same as text.
      • x: Same as text.
      • attr: Same as text.
      • bg: Same as text.
  • table: Table by python-tabulate

    • Other compulsory attributes:
      • None
    • Optional attributes:
      • hasHeader: Set value to true to interpret the first row of data as table header.
      • tablefmt: Table format.
      • numalign: Number alignment.
      • floatfmt: Number formating.
      • animation: Same as text.
      • afterStart: Same as text.
      • colour: Same as text.
      • y: Same as text.
      • x: Same as text.
      • attr: Same as text.
      • bg: Same as text.
  • image: Grey scale ascii text image

    • Other compulsory attributes:
      • None
    • Optional attributes:
      • height: Target image height
      • y: Same as text.
      • x: Same as text.
  • color-image: Block color image

    • Other compulsory attributes:
      • None
    • Optional attributes:
      • height: Target image height
      • y: Same as text.
      • x: Same as text.

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

sample.yaml

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termslides-1.10.tar.gz (7.9 MB view details)

Uploaded Source

Built Distribution

termslides-1.10-py3-none-any.whl (7.9 MB view details)

Uploaded Python 3

File details

Details for the file termslides-1.10.tar.gz.

File metadata

  • Download URL: termslides-1.10.tar.gz
  • Upload date:
  • Size: 7.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for termslides-1.10.tar.gz
Algorithm Hash digest
SHA256 dc54cc9f8b8bbe696f74f62ee9de82d1e44dc7aa91e885ce54fae8ddd9580b0b
MD5 4248fc0c14184cc72698526b8bbfa54a
BLAKE2b-256 0e502c98dcfeb9e1dfde7b873cfc7e76a057e908736161855905d048d149cea7

See more details on using hashes here.

File details

Details for the file termslides-1.10-py3-none-any.whl.

File metadata

  • Download URL: termslides-1.10-py3-none-any.whl
  • Upload date:
  • Size: 7.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for termslides-1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 82d0894fd6d4e9e88a44e434925e1962d68cb1e40f08f48e4c075a0e8710664a
MD5 5426603335b828ba778558c3f7884396
BLAKE2b-256 3f237b689be584abd57706dee4b0bbbc8b7ea6f76e04d32ac3de4c80e76d87af

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page