effo

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

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

Go to latest
Published: Aug 8, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(slide []Slide)

Render displays the parsed slides and enables navigation through them.

Parameters:

  • slides: A slice of Slide structs representing the parsed slides.

Types

type Parse

type Parse struct{}

Parse is a utility for parsing.

func (*Parse) Parse

func (p *Parse) Parse(filepath string) ([]Slide, error)

Parse reads and parsing a file based on extension.

Parameters:

  • filepath: The path to the file to be parsed.

Returns:

  • []Slide: Parsed slides as a slice of Slide structs.
  • error: An error if parsing fails, the file extension is unsupported, or the file cannot be opened.

type Parser

type Parser interface {
	// Parse reads a slide file from the given filepath and returns a slice of Slide objects.
	// An error is returned if the parsing process encounters any issues.
	Parse(filepath string) ([]Slide, error)
}

Parser is an interface for parsing slide files.

func NewParser

func NewParser() Parser

NewParser creates a new Parser instance.

type Slide

type Slide struct {
	Title   string
	Content []string
}

Slide represents a single slide with a title and content.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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