Skip to content
/ cli Public

(Moved to ghaiklor/kittik) CLI tool for starting Kittik presentations

License

Notifications You must be signed in to change notification settings

kittikjs/cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kittik-cli

Downloads Downloads npm version License

semantic-release Commitizen friendly dependencies dev dependencies

CLI tool for starting Kittik presentations.

Getting Started

Install it via npm:

npm install -g kittik-cli

Create your presentation:

kittik create my_presentation

Start your presentation:

kittik start my_presentation.yml

Walkthrough

Let me show you the process of creating a presentation step by step.

First of all, you need to create an empty YAML file. You can do this by touch my-presentation.yml or scaffold it via kittik create my-presentation. For educational purposes, I'll create an empty YAML file called my-presentation.yml.

Let's add our first slide declaration. Since our slides is an array of objects with slide declaration, we need to declare it as an array of objects:

slides:
  - shapes:
    animations:
    order:

It is our first slide, but it's empty for now. We need to declare some shape in it. You can achieve this by adding an item into shapes array. shapes is an array of objects with shapes declaration:

slides:
  - shapes:
    - name: "Our Shape Name"
      type: "FigText"
      options:
        text: "Hello, Kittik"
        x: "center"
        y: "middle"
        font: "Ghost"

    animations:
    order:

We have our first shape, which renders "Hello, Kittik" in the center of a terminal via Fig fonts. Now, we need to say that we want this shape renders in specified order. order is an array of strings where you specify the name of a shape and animations to play:

slides:
  - shapes:
    - name: "Our Shape Name"
      type: "FigText"
      options:
        text: "Hello, Kittik"
        x: "center"
        y: "middle"
        font: "Ghost"

    animations:
    order:
      - "Our Shape Name"

You can run the presentation via kittik start my-presentation.yml now. You will see our shape successfully rendered in a terminal.

kittik

What about animations?

Let's add some simple animation. My favorite one is printing a text. Add a similar declaration as in shapes, but in animations property. animations is an array of objects where animations declaration are live:

slides:
  - shapes:
      - name: "Our Shape Name"
        type: "FigText"
        options:
          text: "Hello, Kittik"
          x: "center"
          y: "middle"
          font: "Ghost"

    animations:
      - name: "Our Animation Name"
        type: "Print"
        options:
          duration: 4000
          easing: "outBounce"

    order:
      - "Our Shape Name::Our Animation Name"

Take an attention to how order property was changed. I've added :: and animation name that we declared previously. That way, I'm saying to Kittik I want to render Our Shape Name with animation Our Animation Name.

Run the presentation:

kittik

In this guide, I showed you how to create a simple presentation. If you want to go deeper here, I'd recommend you visit these guides in kittik repository.

License

The MIT License (MIT)

Copyright (c) 2015-2016 Eugene Obrezkov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

(Moved to ghaiklor/kittik) CLI tool for starting Kittik presentations

Resources

License

Stars

Watchers

Forks

Packages

No packages published