ahaslides

package
v2.4.26 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CanvasMaxX = float64(700.0)
	CanvasMaxY = float64(500.0)
)

Variables

View Source
var DefaultFormatting = RoadmapFormatting{
	Line: LineFormatting{
		ColorHex:  "#f29d39",
		DashStyle: "DASH",
	},

	Column: ColumnFormatting{
		Heading: su.CreateShapeTextBoxRequestInfo{
			FontBold:           true,
			FontItalic:         false,
			FontSize:           12.0,
			FontSizeUnit:       "PT",
			ForegroundColorHex: "#6f6f6f",
		},
	},
	Row: RowFormatting{
		Heading: su.CreateShapeTextBoxRequestInfo{
			FontBold:           true,
			FontItalic:         false,
			FontSize:           15.0,
			FontSizeUnit:       "PT",
			ForegroundColorHex: "#6f6f6f",
		},

		RowOddBackgroundColorHex: "#ffffff",
	},
	Disclaimer: TextboxFormatting{
		DefaultBackgroundColorHex: "#ff8800",
		DefaultForegroundColorHex: "#ffffff",
	},
	Textbox: TextboxFormatting{
		DefaultBackgroundColorHex: "#2e73a9",
		DefaultForegroundColorHex: "#ffffff",
		DeadBackgroundColorHex:    "#aaaaaa",
		DeadForegroundColorHex:    "#ffffff",
		DoneBackgroundColorHex:    "#00ac00",
		DoneForegroundColorHex:    "#ffffff",
		ProblemBackgroundColorHex: "#ea8c34",
		ProblemForegroundColorHex: "#ffffff",
	},
}
View Source
var Unit = "PT"

Functions

func CenterRequest

func CenterRequest(objectId, alignment string) *slides.Request

func CreateRoadmapSlide

func CreateRoadmapSlide(googleClient *http.Client, presentationID string, roadmapConfig RoadmapConfig, featureSet *au.FeatureSet) (*slides.BatchUpdatePresentationResponse, error)

func RoadmapTextBoxRequests

func RoadmapTextBoxRequests(rmCfg RoadmapConfig, featureSet *ahautil.FeatureSet, pageId string) []*slides.Request

Types

type AhaTagFeatures

type AhaTagFeatures struct {
	Tag      string
	Features map[string]*aha.Feature
}

type CanvasFloat64

type CanvasFloat64 struct {
	MinX float64
	MinY float64
	MaxX float64
	MaxY float64
}

func (*CanvasFloat64) ThisX

func (c64 *CanvasFloat64) ThisX(this, min, max float64) (float64, error)

type ColumnFormatting

type ColumnFormatting struct {
	Heading su.CreateShapeTextBoxRequestInfo `json:"heading"`
}

type LineFormatting

type LineFormatting struct {
	ColorHex  string `json:"defaultColor"`
	DashStyle string `json:"dashStyle"` // e.g. `DASH`
}

type RoadmapConfig

type RoadmapConfig struct {
	Title                string            `json:"title"`
	FeaturesFilepath     string            `json:"featuresFilepath"`
	AddAhaLinks          bool              `json:"addAhaLinks"`
	DimensionUnit        string            `json:"dimensionsUnit"`
	DisclaimerText       string            `json:"disclaimerText"`
	FilterTags           []string          `json:"filterTags"`
	FilterTagsMap        map[string]string `json:"filterTagsMap"`
	TagPrefixStripRx     *regexp.Regexp
	FeaturePrefixStripRx *regexp.Regexp
	FeatureNameSepRx     *regexp.Regexp
	FeatureSnapToQuarter bool  `json:"featureSnapToQuarter"`
	QuarterStartInt32    int32 `json:"quarterStart"`
	QuarterEndInt32      int32 `json:"quarterEnd"`
	QuarterStartTime     time.Time
	QuarterCount         int32             `json:"quarterCount"`
	RoadmapFormatting    RoadmapFormatting `json:"roadmapFormatting"`
	// contains filtered or unexported fields
}

func NewRoadmapConfigEnv

func NewRoadmapConfigEnv() (RoadmapConfig, error)

type RoadmapConfig2

type RoadmapConfig2 struct {
	QuarterStart int32                `json:"quarterStart"`
	QuarterCount int32                `json:"quarterCount"`
	AhaConfig    RoadmapConfig2Aha    `json:"ahaConfig"`
	SlidesConfig RoadmapConfig2Slides `json:"slidesConfig"`
}

func ParseConfig

func ParseConfig(jsonCfg []byte) (RoadmapConfig2, error)

type RoadmapConfig2Aha

type RoadmapConfig2Aha struct {
	AddAhaLinks bool     `json:"addAhaLinks"`
	FilterTags  []string `json:"filterTags"`
}

type RoadmapConfig2Slides

type RoadmapConfig2Slides struct {
	Title                string `json:"title"`
	DisclaimerText       string `json:"disclaimerText"`
	FeatureSnapToQuarter bool   `json:"featureSnapToQuarter"`
	DimensionUnit        string `json:"dimensionsUnit"`
}

type RoadmapFormatting

type RoadmapFormatting struct {
	//ColumnHeadingForegroundColorHex string            `json:"columnHeadingFontColorHex"`
	Column     ColumnFormatting  `json:"column"`
	Row        RowFormatting     `json:"row"`
	Line       LineFormatting    `json:"line"`
	Textbox    TextboxFormatting `json:"textbox"`
	Disclaimer TextboxFormatting `json:"disclaimer"`
}

type RowFormatting

type RowFormatting struct {
	Heading                   su.CreateShapeTextBoxRequestInfo `json:"heading"`
	RowOddBackgroundColorHex  string                           `json:"rowOddBgColorHex"`
	RowEvenBackgroundColorHex string                           `json:"rowEvenBgColorHex"`
}

type SlideCanvasInfo

type SlideCanvasInfo struct {
	BoxFgColor      *slides.RgbColor
	BoxBgColor      *slides.RgbColor
	BoxHeight       float64
	BoxMarginBottom float64
	Canvas          CanvasFloat64
}

type TextboxFormatting

type TextboxFormatting struct {
	DefaultForegroundColorHex string `json:"defaultForegroundColorHex"`
	DefaultBackgroundColorHex string `json:"defaultBackgroundColorHex"`
	DeadForegroundColorHex    string `json:"deadForegroundColorHex"`
	DeadBackgroundColorHex    string `json:"deadBackgroundColorHex"`
	DoneForegroundColorHex    string `json:"doneForegroundColorHex"`
	DoneBackgroundColorHex    string `json:"doneBackgroundColorHex"`
	ProblemForegroundColorHex string `json:"problemForegroundColorHex"`
	ProblemBackgroundColorHex string `json:"problemBackgroundColorHex"`
}

Directories

Path Synopsis
cmd
ahaslides
Go example that covers: Quickstart: https://developers.google.com/slides/quickstart/go Basic writing: adding a text box to slide: https://developers.google.com/slides/samples/writing Using SDK: https://github.com/google/google-api-go-client/blob/master/slides/v1/slides-gen.go Creating and Managing Presentations https://developers.google.com/slides/how-tos/presentations Adding Shapes and Text to a Slide: https://developers.google.com/slides/how-tos/add-shape#example
Go example that covers: Quickstart: https://developers.google.com/slides/quickstart/go Basic writing: adding a text box to slide: https://developers.google.com/slides/samples/writing Using SDK: https://github.com/google/google-api-go-client/blob/master/slides/v1/slides-gen.go Creating and Managing Presentations https://developers.google.com/slides/how-tos/presentations Adding Shapes and Text to a Slide: https://developers.google.com/slides/how-tos/add-shape#example

Jump to

Keyboard shortcuts

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