slides

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Slide dimensions in points (standard 16:9)
	SlideWidth  = 720.0
	SlideHeight = 405.0

	// Default margins
	MarginTop    = 50.0
	MarginBottom = 50.0
	MarginLeft   = 50.0
	MarginRight  = 50.0

	// Text properties
	DefaultFontSize = 14.0
	TitleFontSize   = 32.0
	H1FontSize      = 28.0
	H2FontSize      = 24.0
	H3FontSize      = 20.0
	LineHeight      = 1.5

	// Estimated character width for pagination
	CharWidth = 7.0 // Approximate for 14pt font
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, client *http.Client) (*Client, error)

func (*Client) AddCodeTextBox

func (c *Client) AddCodeTextBox(presentationId string, slideId string, text string, x, y, width, height float64) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) AddImage

func (c *Client) AddImage(presentationId string, slideId string, imageUrl string, x, y, width, height float64) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) AddShape

func (c *Client) AddShape(presentationId string, slideId string, shapeType string, x, y, width, height float64) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) AddTable

func (c *Client) AddTable(presentationId string, slideId string, rows, columns int, x, y, width, height float64) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) AddTextBox

func (c *Client) AddTextBox(presentationId string, slideId string, text string, x, y, width, height float64) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) ApplyCodeFormattingToPlaceholder

func (c *Client) ApplyCodeFormattingToPlaceholder(presentationId string, shapeId string, codeRanges []struct {
	start int
	end   int
}) error

ApplyCodeFormattingToPlaceholder applies Courier New font to specific text ranges in a placeholder

func (*Client) ApplyTemplate

func (c *Client) ApplyTemplate(presentationId string, templateId string) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) BatchUpdate

func (c *Client) BatchUpdate(presentationId string, requests []*slides.Request) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) CreatePresentation

func (c *Client) CreatePresentation(title string) (*slides.Presentation, error)

func (*Client) CreateSlide

func (c *Client) CreateSlide(presentationId string, insertionIndex int) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) CreateSlideWithLayout

func (c *Client) CreateSlideWithLayout(presentationId string, layoutId string, insertionIndex int) (*slides.BatchUpdatePresentationResponse, error)

CreateSlideWithLayout creates a new slide with a specific layout

func (*Client) DeleteSlide

func (c *Client) DeleteSlide(presentationId string, slideId string) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) DeleteTextInPlaceholder

func (c *Client) DeleteTextInPlaceholder(presentationId string, shapeId string) (*slides.BatchUpdatePresentationResponse, error)

DeleteTextInPlaceholder deletes existing text in a placeholder

func (*Client) DuplicateSlide

func (c *Client) DuplicateSlide(presentationId string, slideId string) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) GetLayoutId

func (c *Client) GetLayoutId(presentationId string, layoutName string) (string, error)

GetLayoutId gets the layout ID by name from a presentation

func (*Client) GetPresentation

func (c *Client) GetPresentation(presentationId string) (*slides.Presentation, error)

func (*Client) InsertTextInPlaceholder

func (c *Client) InsertTextInPlaceholder(presentationId string, shapeId string, text string) (*slides.BatchUpdatePresentationResponse, error)

InsertTextInPlaceholder inserts text into a placeholder shape

func (*Client) InsertTextInTableCell

func (c *Client) InsertTextInTableCell(presentationId string, tableId string, row, col int, text string) (*slides.BatchUpdatePresentationResponse, error)

InsertTextInTableCell inserts text into a specific table cell

func (*Client) ListPresentations

func (c *Client) ListPresentations() ([]*slides.Presentation, error)

func (*Client) ReplaceAllTextInSlide

func (c *Client) ReplaceAllTextInSlide(presentationId string, slideId string, oldText, newText string) (*slides.BatchUpdatePresentationResponse, error)

func (*Client) SetSlideLayout

func (c *Client) SetSlideLayout(presentationId string, slideId string, layoutId string) (*slides.BatchUpdatePresentationResponse, error)

type FormatRange

type FormatRange struct {
	Start  int
	End    int
	Style  *slides.TextStyle
	Fields string
}

type MarkdownConverter

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

func NewMarkdownConverter

func NewMarkdownConverter(client *Client, presentationId string) *MarkdownConverter

func (*MarkdownConverter) CreateSlidesFromMarkdown

func (mc *MarkdownConverter) CreateSlidesFromMarkdown(markdown string) ([]*slides.Page, error)

func (*MarkdownConverter) ParseMarkdown

func (mc *MarkdownConverter) ParseMarkdown(markdown string) []MarkdownSlide

func (*MarkdownConverter) UpdateSlidesFromMarkdown

func (mc *MarkdownConverter) UpdateSlidesFromMarkdown(markdown string) error

type MarkdownElement

type MarkdownElement struct {
	Type    string // "text", "bullet", "numbering", "image", "table", "code"
	Content string
	Level   int      // For headers and lists
	Items   []string // For tables
	AltText string   // For images
}

type MarkdownSlide

type MarkdownSlide struct {
	Title   string
	Content []MarkdownElement
	Layout  string
}

type MultiAccountService

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

func NewMultiAccountService

func NewMultiAccountService(authManager *auth.AccountManager) *MultiAccountService

func (*MultiAccountService) GetTools

func (s *MultiAccountService) GetTools() []server.Tool

func (*MultiAccountService) HandleToolCall

func (s *MultiAccountService) HandleToolCall(ctx context.Context, name string, arguments json.RawMessage) (interface{}, error)

type Service

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

func NewService

func NewService(authManager *auth.AccountManager) *Service

func (*Service) GetTools

func (s *Service) GetTools() []server.Tool

func (*Service) HandleToolCall

func (s *Service) HandleToolCall(ctx context.Context, name string, arguments json.RawMessage) (interface{}, error)

Jump to

Keyboard shortcuts

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