present-poc

command module
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: ISC Imports: 21 Imported by: 0

README

present

present

tool for viewing presentations written in markdown like format

slides are written in text friendly format and follow all standard markdown rules with some additions

main purpose of application is to view presentation in browsers

Installation

Use the following command to download and install this tool:

go install github.com/oktalz/present@latest

Binaries

prebuilt binaries can be found on releases page

Example

  • enter examples folder, type present
    • program should read all files and start web server on port 8080 (default)
      • port can be customized (see present.env file)
  • run go run . -d /path/to/files
  • run go run . -g github.com/oktalz/present -d examples/go1.23
    • for gitlab.com and github.com project url is detected, for others use full path -g https://github.com/oktalz/present.git
    • this will download repository, enter directory (if specified) and start server

Arguments

  • list of all arguments can be seen with present --help
NAME
  present

FLAGS
  -v, --version                 show version
  -t, --tag                     show tag
  -c, --compress STRING         compress current folder
  -f, --file STRING             file to open (.tar.gz format)
  -g, --git STRING              git repository URL
  -d, --dir STRING              directory to open
      --help                    help
  -h, --host STRING             address that present will listen on (default: 127.0.0.1)
  -p, --port INT                port that present will listen on (default: 8080)
      --admin-pwd STRING        admin password
      --user-pwd STRING         user password
      --admin-pwd-disable       disable admin password
      --menu STRING             keys that opens menu
      --next-page STRING        keys that go to next page
      --previous-page STRING    keys that go to previous page
      --terminal-cast STRING    keys that run commands
      --terminal-close STRING   keys that closes terminal

Sharing presentations

  • enter presentation folder
  • type present -c - present.tar.gz will be created
  • send file
    • user can start presentation with present -f present.tar.gz
    • user can unpack file, enter folder and execute present

Customizations & security

  • present will watch for three files:
    • present.env in active directory (this will not override already existing ENV values)
    • .env in active directory (this will override already existing ENV values)
    • present.env in user HOME directory (this will override already existing ENV values)
  • .env file or corresponding variables can be used to customize behavior
    ADMIN_PWD=AdminPassword123
    USER_PWD=user
    ASK_USERNAME=false
    PORT=8080
    NEXT_PAGE=ArrowRight,ArrowDown,PageDown,Space,e
    PREVIOUS_PAGE=ArrowLeft,ArrowUp,PageUp
    TERMINAL_CAST=r,b
    TERMINAL_CLOSE=c
    MENU=m
    
  • if ADMIN_PWD is set, only users authorised with that password can execute the code
    • if ADMIN_PWD is not provided, it will be generated and written on console
      • with ADMIN_PWD_DISABLE=true you can remove need for admin password
  • if USER_PWD is set, all 'users' will need to enter password to see the presentation
  • rest are pretty self explanatory (also in examples are defaults for all options)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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