2014-05-05 15:55:27 -06:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
/*
|
|
|
|
Present displays slide presentations and articles. It runs a web server that
|
|
|
|
presents slide and article files from the current directory.
|
|
|
|
|
|
|
|
It may be run as a stand-alone command or an App Engine app.
|
|
|
|
|
2014-06-17 19:23:08 -06:00
|
|
|
The setup of the Go version of NaCl is documented at:
|
2014-12-11 19:58:46 -07:00
|
|
|
https://golang.org/wiki/NativeClient
|
2014-05-05 15:55:27 -06:00
|
|
|
|
2018-10-09 15:35:48 -06:00
|
|
|
To use with App Engine, copy the files in the tools/cmd/present directory to the
|
|
|
|
root of your application and create an app.yaml file similar to this:
|
2015-10-11 02:26:20 -06:00
|
|
|
|
2018-10-09 15:35:48 -06:00
|
|
|
runtime: go111
|
2015-10-11 02:26:20 -06:00
|
|
|
|
|
|
|
handlers:
|
|
|
|
- url: /favicon.ico
|
2018-10-09 15:35:48 -06:00
|
|
|
static_files: static/favicon.ico
|
|
|
|
upload: static/favicon.ico
|
2015-10-11 02:26:20 -06:00
|
|
|
- url: /static
|
2018-10-09 15:35:48 -06:00
|
|
|
static_dir: static
|
2015-10-11 02:26:20 -06:00
|
|
|
- url: /.*
|
2018-10-09 15:35:48 -06:00
|
|
|
script: auto
|
2015-10-11 02:26:20 -06:00
|
|
|
|
|
|
|
# nobuild_files is a regexp that identifies which files to not build. It
|
|
|
|
# is useful for embedding static assets like code snippets and preventing
|
|
|
|
# them from producing build errors for your project.
|
|
|
|
nobuild_files: [path regexp for talk materials]
|
|
|
|
|
2018-10-09 15:35:48 -06:00
|
|
|
When running on App Engine, content will be served from the ./content/
|
|
|
|
subdirectory.
|
|
|
|
|
2015-10-11 02:26:20 -06:00
|
|
|
Present then can be tested in a local App Engine environment with
|
|
|
|
|
2018-10-09 15:35:48 -06:00
|
|
|
GAE_ENV=standard go run .
|
|
|
|
|
|
|
|
And deployed using
|
|
|
|
|
|
|
|
gcloud app deploy
|
2015-10-11 02:26:20 -06:00
|
|
|
|
2014-05-05 15:55:27 -06:00
|
|
|
Input files are named foo.extension, where "extension" defines the format of
|
|
|
|
the generated output. The supported formats are:
|
|
|
|
.slide // HTML5 slide presentation
|
|
|
|
.article // article format, such as a blog post
|
|
|
|
|
|
|
|
The present file format is documented by the present package:
|
2014-11-09 14:50:40 -07:00
|
|
|
http://godoc.org/golang.org/x/tools/present
|
2014-05-05 15:55:27 -06:00
|
|
|
*/
|
2018-10-09 15:35:48 -06:00
|
|
|
package main
|