Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Developer-Friendly, In-Browser Presentation Software with auto-resize and syntax highlighting

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rdoc

trickster

Trickster is a developer's in-browser presentation software.

Instead of focusing on flashy transitions, it focuses to encourage making a good presentation that looks good on the big screen. As such, each slide is dynamically sized to be as big as possible. Code slides have syntax highlighting, and you can call out lines of interest very easily, as well as create animated command-line slides.

It does this by compiling your presentation into an HTML file that, when loaded, will execute the Trickster JavaScript, which will dynamically resize each slide to the biggest it can be based on the browser's current size.

Presentation Format

Your presentation is stored in a text file. Each slide has the following format:

!<slide_type>: options
<content>
<content>
<content>

Where slide_type is one of the types listed below. options is a space-delimited key/value string of options. content is the content of the slide, interpreted based on the slide type.

Example:

!TITLE: background=262626
Welcome to my presentation!
It's going to be awesome!

!CODE
def some_method(x)
  if x.nil?
    return "foo"
  else
    return x.upcase
  end
end

!BULLETS
Check these bullets out!
* This slide
* is great!
* and will be huge!

This defines three slides, the first of which is a TITLE with a custom background, the second of which is code, and the third of which is bullets. When you play the presentation, each bullet is revealed one at a time.

Also note that each slide will be in a section tag, with the CSS class of its type. This allows you to control styling per slide type.

options

background

although you can customize each slide based on its CSS class, this option allows you to customize the background of this particular slide. This is useful for IMAGE slides where you might want to better match the image's colors

transition

number of milliseconds to transition to the next slide. The default is in the config object, but this can override it per slide.

Slide Types

BULLETS

The first line is the “title” if this slide, rendered in an H1. The remaining are bullets. If a bullet line is preceded with a *, -, or +, that bullet character is omitted automatically.

IMAGE

The first line is the url to the image to show. Trickster will size the image down only if it is too big, preserving its aspect ratio.

CODE

If the first line starts with file://, the contents of this file is read in as the contents of the code block. Otherwise, the entire contents of the slide is verbatim put into a pre and then code block. Syntax highlighting is done using highlight.js.

Language

By default, no language is specified for highlighting, so highlight.js will make a guess. If you'd like to be explicit, use the language option, e.g.

!CODE language=scala
def doit(x:String) = {
  "foo"
}

Callouts

A code slide accepts an option of callout which is a comma-delimited list of the lines of code to “call out” with special styling. This is useful if you are talking about particular lines, or are demonstrating new lines having been added to a previous example.

Further, if the line number is preceded with a dash (e.g. -3), that line will be styled for strikethrough, in addition to being highlighed. This is useful to show lines of code that are going to be deleted based on whatever you are talking about.

Highlighting Themes

Trickster comes with all the themes provided by highlight.js, as well a customizable theme in SCSS. When you create your slideshow, use --theme to specify the syntax highlighting theme. trickster help init will show the list of themes available.

If you want easily create a custom highlighting scheme, the theme custom generates a SASS template with variables to allow you to easily set the colors you want.

Once your slideshow has been created, you can change the theme via trickster update theme. <strong>This is destructive</strong> so make sure your slideshow is checked into version control.

COMMANDLINE

This slide is for showing command-line invocations and results. It is assumed to start with a CLI invocation and that such invocations are followed by results, that can be many lines. When you present the slideshow, the command will be output in a “typewriter” style, after which the result will be shown automatically, with each command acting like a “bullet” to be revealed.

Example

!COMMANDLINE
> ls -l
-rw-r--r--  1 davec  staff     25 Aug 25 14:49 Gemfile
-rw-r--r--  1 davec  staff   1563 Sep  9 16:11 Gemfile.lock
-rw-r--r--  1 davec  staff   4136 Sep 10 18:54 README.rdoc
drwxr-xr-x  3 davec  staff    102 Sep 10 18:50 tmp
> vim Gemfile
editing Gemfile

Prompts can be >, %, and #.

Any other type

These slides take the first three lines of content and display them in an H1, H2, and H3, respectively. All other lines are ignored.

Customizations/Styling

You have two points of customization: custom.js, which is loaded after all the other JS, but before the load event. This is where you can override Trickster's configuration if you like (e.g. for default transition time).

The second, and more useful, point of customization is styles.css or styles.scss. This is loaded in your presentation and is where you can customize the look and feel of your slideshow. If you create a .scss file, trickster will run SASS on it to convert it to CSS, so you have the full awesome power of SASS available.

Styling Recommendations

  • Prefer 'em' over explicit sizes, as this will aloww your sizing choices to work at any size (remember that Trickster tries to fit your content to the screen)

  • The BODY element will be given the class of the currently-displayed slide, so if you want to, for example, change the background color of a slide based on its type, apply styles to body.SLIDE_TYPE and not section.SLIDE_TYPE

  • If you want to customzie the syntax highlighting, you can. trickster update will leave it alone. If you want to build a more invovled highlighting theme, use the “custom” theme when you create your presentation or migrate to it via trickster update theme -t custom

Delivering the Presentation

Simply open `index.html` in your browser. Your browser should be Safari or Chrome.

Every time you reload, the presentation will be dynamically sized to the size of the browser, so you should configure your browser and monitor to the size of your presentation, then reload.

Occasionally, Trickster will size the slides too larger or too small. In that case, you can use “-” and “+” to resize the slides on the fly. Note that if you you reload, the sizes will be reset.

Keyboard Commands

advance

“j”, space-bar, right-arrow, or the advance button on the Kensington Wireless Presenter.

back

“k”, backspace, left-arrow, or the back button the Kensington Wireless Presenter.

restart

down/stop button on the Kensington Wireless Presenter.

increase font-size

“+” or “=” (font-size will be reset if you reload the page)

decrease font-size

“-” (font-size will be reset if you reload the page)

Tips

Trickster discourages verbose slides with lots of text or lots of bullets. This is because these are aspects of terrible presentations. Instead, create many more slides with fewer amounts of text.

CLI

trickster - Bootstrap, generate, and manage your trickster presentation

v0.0.5

Global Options

–help

Show this message

–version

Commands

build [slides_file]

Generate the presentation from your slides

Given your slides_file (defaults to 'slides' in current directory), generates an HTML file (based on –output-file) that, when loaded, can be used to play your presentation.

Any .scss files found in the css/ directory will be run through SASS to be converted.

Note that currently, the CSS and JS files included are fixed, so keep all your customizations to styles.css/styles.scss and custom.js (these files will not be overwritten when you do a trickster update).

Options
-o file

Name of the generated HTML file

Aliases

–output-file

Default Value

index.html

help command

Shows a list of commands or help for one command

Gets help for the application or its commands. Can also list the commands in a way helpful to creating a bash-style completion function

init dir_name

Create a new trickster presentation

This will create a completely self-contained presentation that can be run just from the files in the directory you name. It will have a static copy of the JavaScript files, JavaScript third-party libraries and CSS files you need to run your trickster application.

You can examine the file `slides` to see some examples of how to format your presentation. You can run `trickster build` in the directory to create the HTML file from your slides.

Note that if you upgrade trickster, you should run `trickster update` in your slide directory to get the latest JavaScript and CSS files.

Options
-t arg

Specify the syntax highlighting theme to use. One of arta, ascetic, brown_paper, custom, dark, default, far, github, googlecode, idea, ir_black, magula, monokai, pojoaque, rainbow, school_book, solarized_dark, solarized_light, sunburst, tomorrow, tomorrow-night, tomorrow-night-blue, tomorrow-night-bright, tomorrow-night-eighties, vs, xcode, zenburn. Use 'custom' to get an scss file you can easily customize.

Aliases

–theme

Default Value

default

Must Match
“arta”, “ascetic”, “brown_paper”, “custom”, “dark”, “default”, “far”, “github”, “googlecode”, “idea”, “ir_black”, “magula”, “monokai”, “pojoaque”, “rainbow”, “school_book”, “solarized_dark”, “solarized_light”, “sunburst”, “tomorrow”, “tomorrow-night”, “tomorrow-night-blue”, “tomorrow-night-bright”, “tomorrow-night-eighties”, “vs”, “xcode”, “zenburn”

update [dir_name]

Update your slideshow with files provided by trickster

Commands
files slide_dir

Update the trickster JS/CSS files when you've updated the trickster gem

Run this after you've upgraded trickster and want to get the latest features. Since your

slideshow is entirely self-contained, when you upgrade trickster, your static JavaScript and
CSS files will be out of date.

Note that `styles.css`, which was provided by trickster as a basis for styling, will not
be touched, and your customizations will remain. All other files that trickster gave you
when you ran `trickster init` will be overwritten.
theme slide_dir

Update the syntax-highlighting theme for your presentation

A normal 'trickster update' will leave your theme.css alone, since you can customize it. This will overwrite

your existing theme.css with the theme from trickster that you specify.  You should check your presentation
into source control to avoid the destructive nature of this command.
Options
-t slide_dir

Specify the syntax highlighting theme to use. One of arta, ascetic, brown_paper, custom, dark, default, far, github, googlecode, idea, ir_black, magula, monokai, pojoaque, rainbow, school_book, solarized_dark, solarized_light, sunburst, tomorrow, tomorrow-night, tomorrow-night-blue, tomorrow-night-bright, tomorrow-night-eighties, vs, xcode, zenburn. Use 'custom' to get an scss file you can easily customize.

Aliases

–theme

Default Value

default

Must Match
“arta”, “ascetic”, “brown_paper”, “custom”, “dark”, “default”, “far”, “github”, “googlecode”, “idea”, “ir_black”, “magula”, “monokai”, “pojoaque”, “rainbow”, “school_book”, “solarized_dark”, “solarized_light”, “sunburst”, “tomorrow”, “tomorrow-night”, “tomorrow-night-blue”, “tomorrow-night-bright”, “tomorrow-night-eighties”, “vs”, “xcode”, “zenburn”

A normal 'trickster update' will leave your theme.css alone, since you can customize it. This will overwrite

your existing theme.css with the theme from trickster that you specify.  You should check your presentation
into source control to avoid the destructive nature of this command.
Default Command

files

Something went wrong with that request. Please try again.