You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
2.1 KiB

  1. // Copyright 2011 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. /*
  5. Present displays slide presentations and articles. It runs a web server that
  6. presents slide and article files from the current directory.
  7. It may be run as a stand-alone command or an App Engine app.
  8. Usage of present:
  9. -base="": base path for slide template and static resources
  10. -http="127.0.0.1:3999": HTTP service address (e.g., '127.0.0.1:3999')
  11. -nacl=false: use Native Client environment playground (prevents non-Go code execution)
  12. -notes=false: enable presenter notes (press 'N' from the browser to display them)
  13. -orighost="": host component of web origin URL (e.g., 'localhost')
  14. -play=true: enable playground (permit execution of arbitrary user code)
  15. The setup of the Go version of NaCl is documented at:
  16. https://golang.org/wiki/NativeClient
  17. To use with App Engine, copy the tools/cmd/present directory to the root of
  18. your application and create an app.yaml file similar to this:
  19. application: [application]
  20. version: [version]
  21. runtime: go
  22. api_version: go1
  23. handlers:
  24. - url: /favicon.ico
  25. static_files: present/static/favicon.ico
  26. upload: present/static/favicon.ico
  27. - url: /static
  28. static_dir: present/static
  29. application_readable: true
  30. - url: /.*
  31. script: _go_app
  32. # nobuild_files is a regexp that identifies which files to not build. It
  33. # is useful for embedding static assets like code snippets and preventing
  34. # them from producing build errors for your project.
  35. nobuild_files: [path regexp for talk materials]
  36. Present then can be tested in a local App Engine environment with
  37. goapp serve
  38. Input files are named foo.extension, where "extension" defines the format of
  39. the generated output. The supported formats are:
  40. .slide // HTML5 slide presentation
  41. .article // article format, such as a blog post
  42. The present file format is documented by the present package:
  43. http://godoc.org/golang.org/x/tools/present
  44. */
  45. package main // import "golang.org/x/tools/cmd/present"