revealgo

package module
v0.0.0-...-f3c2b4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2016 License: MIT Imports: 15 Imported by: 0

README

revealgo

revealgo is a small web application for giving Markdown-driven presentations implemented in Go! The revealgo command starts a local web server to serve the your markdown presentation file with reveal.js. The presentation can be viewed in a web browser. The reveal.js library offers comprehensive presenting features such as slide transitions, speaker notes and more.

Install

To install, use go get:

$ go get github.com/yusukebe/revealgo/cmd/revealgo

Usage

The usage:

$ revealgo [options] MARKDOWN.md

Then access the local web server such as http://localhost:3000 with Chrome, Firefox, or Safari.

Available options:

-p, --port            tcp port number of this server. default is 3000.
--theme               slide theme or original css file name. default themes:
                      beige, black, blood, league, moon, night, serif, simple, sky, solarized, and white
--transition          transition effect for slides: default, cube, page, concave, zoom, linear, fade, none
Screenshots

Run revealgo command:

Command Line

Open the server address with your web browser:

Slides

Sample Makrdown
## This is an H2 Title

Description...

The horizontal slide separator characters are '---'

---

# This is second title

The vertical slide separator characters are '___'

___

## This is a third title

---

## This is a forth title
<!-- .slide: data-background="#f70000" data-transition="page" -->

You can add slide attributes like above.
Customize Theme

While revealgo is running, open another terminal and get the theme file black.css:

$ curl http://localhost:3000/revealjs/css/theme/black.css > original.css

Edit original.css, And then run revealgo with --theme option:

$ revealgo --theme original.css slide.md
Customize Slide Configurations

Get the default slide HTML file:

$ curl http://localhost:3000/ > slide.html

Edit slide.html, and then open http://localhost:3000/slide.html with your browser. A slide with the modified configurations will come up.

See Also

Author

Yusuke Wada http://github.com/yusukebe

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type CLI

type CLI struct {
}

func (*CLI) Run

func (cli *CLI) Run()

type CLIOptions

type CLIOptions struct {
	Port       int    `short:"p" long:"port" description:"tcp port number of this server. default is 3000."`
	Theme      string `` /* 184-byte string literal not displayed */
	Transition string `` /* 134-byte string literal not displayed */
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func (*Server) Serve

func (server *Server) Serve(param ServerParam)

type ServerParam

type ServerParam struct {
	Path          string
	Theme         string
	OriginalTheme bool
	Transition    string
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL