Documentation ¶
Index ¶
- Constants
- Variables
- func AddFgColor(elementID string, fgColor *slides.RgbColor) []*slides.Request
- func AlternateRowBgColor(objectID string, rowCount, columnCount int64, evenColorHex, oddColorHex string) ([]*slides.Request, error)
- func CommonMarkDataToRequests(textboxID string, cmd CommonMarkData, underlineLinks bool) []*slides.Request
- func CreateEmptyPresentation(psv *slides.PresentationsService, filename string) (string, error)
- func CreateEmptyPresentationGSS(gss *GoogleSlidesService, filename string) (string, error)
- func CreateEmptyPresentationHTTP(googleClient *http.Client, filename string) (string, error)
- func CreatePresentation(srv *slides.Service, psv *slides.PresentationsService, ...) (string, error)
- func CreateSlideImageRequestsSidebarRight(slideID, imageID, imageURL, sidebarText string) ([]*slides.Request, error)
- func CreateSlideMainPoint(srv *slides.Service, psv *slides.PresentationsService, ...) error
- func CreateSlideMarkdown(srv *slides.Service, psv *slides.PresentationsService, ...) error
- func CreateSlideRequestLayout(predefinedLayout string) *slides.Request
- func CreateSlideTitleAndBody(srv *slides.Service, psv *slides.PresentationsService, ...) (string, error)
- func CreateSlideTitleOnly(srv *slides.Service, psv *slides.PresentationsService, ...) (string, error)
- func FormatObjectIDSimple(s string) string
- func GoogleSlideDrawRoadmap(pageID string, srcCan roadmap.Canvas, outCan SlideCanvasInfo) ([]*slides.Request, error)
- func InsertTextRequest(objectID, text string) *slides.Request
- func IsEven(i int) bool
- func IsOdd(i int) bool
- func LineStartEndIndexes(cml TextLine, priorLength int64) (int64, int64)
- func MustParseRgbColorHex(hexColor string) *slides.RgbColor
- func OptionalColorParseHex(hexColorStr string) (*slides.OptionalColor, error)
- func ParseRgbColorHex(hexColor string) (*slides.RgbColor, error)
- func RgbColorParseHex(hexColorStr string) (*slides.RgbColor, error)
- func ShapePropertiesBackgroundFillSimple(objectId string, rgbColor *slides.RgbColor) *slides.Request
- func TextBoxRequestsSimple(pageId, elementId, text string, fgColor, bgColor *slides.RgbColor, ...) []*slides.Request
- func UpdateParagraphStyleRequestLineSpacing(objectID string, lineSpacing float64) *slides.Request
- func UpdateTableCellPropertiesRequestTableCellBackgroundFill(objectID string, rowIndex, columnSpan int64, bgColor *slides.RgbColor) *slides.UpdateTableCellPropertiesRequest
- func UpdateTextStyleRequestBold(objectID string, startIdx, endIdx int64) *slides.Request
- func UpdateTextStyleRequestBullet(objectID string, startIdx, endIdx int64) *slides.Request
- func UpdateTextStyleRequestFontSize(objectID string, dimension slides.Dimension) *slides.Request
- func UpdateTextStyleRequestFontSizePT(objectID string, pointSize float64) *slides.Request
- func UpdateTextStyleRequestLinkURL(objectID, url string, textRange *slides.Range, underlineLinks bool) *slides.Request
- type CanvasFloat64
- type CommonMarkData
- type CreateLineRequestInfo
- type CreateShapeTextBoxRequestInfo
- type GoogleSlidesService
- type LinkInfo
- type Location
- type PresentationCreator
- func (pc *PresentationCreator) Create(filename, title, subtitle string) (string, error)
- func (pc *PresentationCreator) CreateEmpty(filename string) (string, error)
- func (pc *PresentationCreator) CreateSlideImageSidebarRight(slideTitle, imageID, imageURL, sidebarText string) error
- func (pc *PresentationCreator) CreateSlideMainPoint(slideTitle string) error
- type SlideCanvasInfo
- type SlidesClient
- func (sc *SlidesClient) BatchUpdate(presentationID string, ...) *slides.PresentationsBatchUpdateCall
- func (sc *SlidesClient) CreateEmptyPresentation(name string) (string, error)
- func (sc *SlidesClient) CreatePresentation(filename, titleText, subtitleText string) (string, error)
- func (sc *SlidesClient) CreateSlideMarkdown(presentationID, titleText, bodyMarkdown string, underlineLinks bool) error
- func (sc *SlidesClient) CreateSlideTitleAndBody(presentationID string, filename string) (string, error)
- type TextBoxInfoSimple
- type TextLine
- type UpdateShapePropertiesRequestUtil
- type UpdateTextStyle
Constants ¶
const ( UnitUnspecified = "UNIT_UNSPECIFIED" // The units are unknown. UnitEMU = "EMU" // An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter UnitPT = "PT" // A point, 1/72 of an inch. LayoutUnspecified = "PREDEFINED_LAYOUT_UNSPECIFIED" // Unspecified layout. LayoutBlank = "BLANK" // Blank layout, with no placeholders. LayoutCaptionOnly = "CAPTION_ONLY" // Layout with a caption at the bottom. LayoutTitle = "TITLE" // Layout with a title and a subtitle. LayoutTitleAndBody = "TITLE_AND_BODY" // Layout with a title and body. LayoutTitleAndTwoColumns = "TITLE_AND_TWO_COLUMNS" // Layout with a title and two columns. LayoutTitleOnly = "TITLE_ONLY" // Layout with only a title. LayoutSectionHeader = "SECTION_HEADER" // Layout with a section title. LayoutSectionTitleAndDescription = "SECTION_TITLE_AND_DESCRIPTION" // Layout with a title and subtitle LayoutOneColumnText = "ONE_COLUMN_TEXT" // Layout with one title and one body, arranged in a single column. LayoutMainPoint = "MAIN_POINT" // Layout with a main point. LayoutBigNumber = "BIG_NUMBER" // Layout with a big number heading. RangeTypeUnspecified = "RANGE_TYPE_UNSPECIFIED" RangeTypeFixedRange = "FIXED_RANGE" RangeTypeStartIndex = "FROM_START_INDEX" RangeTypeAll = "ALL" )
Variables ¶
var ( GoogleSlideUnitPoint = "PT" ObjectIDFormat = `^[a-zA-Z0-9_][a-zA-Z0-9_\-:]*$` )
Functions ¶
func AlternateRowBgColor ¶
func CommonMarkDataToRequests ¶
func CommonMarkDataToRequests(textboxID string, cmd CommonMarkData, underlineLinks bool) []*slides.Request
func CreateEmptyPresentation ¶
func CreateEmptyPresentation(psv *slides.PresentationsService, filename string) (string, error)
func CreateEmptyPresentationGSS ¶
func CreateEmptyPresentationGSS(gss *GoogleSlidesService, filename string) (string, error)
func CreatePresentation ¶
func CreatePresentation(srv *slides.Service, psv *slides.PresentationsService, filename, titleText, subtitleText string) (string, error)
CreatePresentation Creates a new presentation with filename, title and subtitle.
func CreateSlideImageRequestsSidebarRight ¶
func CreateSlideImageRequestsSidebarRight(slideID, imageID, imageURL, sidebarText string) ([]*slides.Request, error)
CreateSlideImageRequestsSidebarRight creates API batch requests to load a main page with optional right sidebar text. `imageID` is optional and will be auto-generated if not provided.
func CreateSlideMainPoint ¶
func CreateSlideMainPoint(srv *slides.Service, psv *slides.PresentationsService, presentationID, titleText string) error
CreateSlideMarkdown creates a slide using Markdown given a PresentationID, title, and markdown body.
func CreateSlideMarkdown ¶
func CreateSlideMarkdown(srv *slides.Service, psv *slides.PresentationsService, presentationID, titleText, bodyMarkdown string, underlineLinks bool) error
CreateSlideMarkdown creates a slide using Markdown given a PresentationID, title, and markdown body.
func CreateSlideTitleAndBody ¶
func CreateSlideTitleAndBody(srv *slides.Service, psv *slides.PresentationsService, presentationID, titleText string) (string, error)
CreateSlideTitleAndBody creates a slide using Markdown given a PresentationID, title, and markdown body.
func CreateSlideTitleOnly ¶
func CreateSlideTitleOnly(srv *slides.Service, psv *slides.PresentationsService, presentationID, titleText string) (string, error)
CreateSlideTitleOnly creates a slide using Markdown given a PresentationID and title.
func FormatObjectIDSimple ¶ added in v0.4.0
func GoogleSlideDrawRoadmap ¶
func InsertTextRequest ¶
func MustParseRgbColorHex ¶
func OptionalColorParseHex ¶
func OptionalColorParseHex(hexColorStr string) (*slides.OptionalColor, error)
func ShapePropertiesBackgroundFillSimple ¶
func ShapePropertiesBackgroundFillSimple(objectId string, rgbColor *slides.RgbColor) *slides.Request
ShapePropertiesBackgroundFillSimple is a simple shape properties request creator. For more complex uses, use UpdateShapePropertiesRequestUtil
func TextBoxRequestsSimple ¶
Types ¶
type CanvasFloat64 ¶
type CommonMarkData ¶
type CommonMarkData struct {
// contains filtered or unexported fields
}
func NewCommonMarkData ¶
func NewCommonMarkData(cm string) CommonMarkData
func (*CommonMarkData) GoogleSlideTextString ¶
func (cmd *CommonMarkData) GoogleSlideTextString() string
func (*CommonMarkData) Inflate ¶
func (cmd *CommonMarkData) Inflate()
func (*CommonMarkData) LineCount ¶
func (cmd *CommonMarkData) LineCount() int
func (*CommonMarkData) Lines ¶
func (cmd *CommonMarkData) Lines() []TextLine
type CreateLineRequestInfo ¶
type CreateShapeTextBoxRequestInfo ¶
type CreateShapeTextBoxRequestInfo struct { PageId string ObjectId string Width float64 Height float64 DimensionUnit string LocationX float64 LocationY float64 LocationUnit string URL string Text string TextURL string // not implemented yet FontBold bool FontItalic bool FontSize float64 FontSizeUnit string ParagraphAlignment string // ALIGNMENT_UNSPECIFIED, START, CENTER, END, JUSTIFIED ForegroundColorRgb *slides.RgbColor BackgroundColorRgb *slides.RgbColor ForegroundColorHex string BackgroundColorHex string }
func (*CreateShapeTextBoxRequestInfo) NeedsUpdateShapeProperties ¶
func (info *CreateShapeTextBoxRequestInfo) NeedsUpdateShapeProperties() bool
func (*CreateShapeTextBoxRequestInfo) NeedsUpdateTextStyle ¶
func (info *CreateShapeTextBoxRequestInfo) NeedsUpdateTextStyle() bool
type GoogleSlidesService ¶
type GoogleSlidesService struct { SlidesService *slides.Service PresentationsService *slides.PresentationsService // contains filtered or unexported fields }
func NewGoogleSlidesService ¶
func NewGoogleSlidesService(httpClient *http.Client) (*GoogleSlidesService, error)
func (*GoogleSlidesService) SetHTTPClient ¶
func (gsc *GoogleSlidesService) SetHTTPClient(httpClient *http.Client) error
type PresentationCreator ¶
type PresentationCreator struct { SlidesClient *SlidesClient Filename string Title string Subtitle string PresentationID string }
func NewPresentationCreator ¶
func NewPresentationCreator(googHTTPClient *http.Client) (*PresentationCreator, error)
func (*PresentationCreator) Create ¶
func (pc *PresentationCreator) Create(filename, title, subtitle string) (string, error)
func (*PresentationCreator) CreateEmpty ¶
func (pc *PresentationCreator) CreateEmpty(filename string) (string, error)
func (*PresentationCreator) CreateSlideImageSidebarRight ¶
func (pc *PresentationCreator) CreateSlideImageSidebarRight(slideTitle, imageID, imageURL, sidebarText string) error
CreateSlideImageSidebarRight creates a slide for the current presentation. `imageID` is optional and will be auto-generated if not provided.
func (*PresentationCreator) CreateSlideMainPoint ¶
func (pc *PresentationCreator) CreateSlideMainPoint(slideTitle string) error
type SlideCanvasInfo ¶
type SlideCanvasInfo struct { BoxFgColor *slides.RgbColor BoxBgColor *slides.RgbColor BoxHeight float64 BoxMarginBottom float64 Canvas CanvasFloat64 }
func DefaultSlideCanvasInfo ¶
func DefaultSlideCanvasInfo() SlideCanvasInfo
type SlidesClient ¶
type SlidesClient struct {
GoogleSlidesService *GoogleSlidesService
}
func NewSlidesClient ¶
func NewSlidesClient(googHTTPClient *http.Client) (*SlidesClient, error)
func (*SlidesClient) BatchUpdate ¶
func (sc *SlidesClient) BatchUpdate(presentationID string, batchupdatepresentationrequest *slides.BatchUpdatePresentationRequest) *slides.PresentationsBatchUpdateCall
BatchUpdate is a convenience function to make calling `BatchUpdate` less verbose.
func (*SlidesClient) CreateEmptyPresentation ¶
func (sc *SlidesClient) CreateEmptyPresentation(name string) (string, error)
func (*SlidesClient) CreatePresentation ¶
func (sc *SlidesClient) CreatePresentation( filename, titleText, subtitleText string) (string, error)
func (*SlidesClient) CreateSlideMarkdown ¶
func (sc *SlidesClient) CreateSlideMarkdown(presentationID, titleText, bodyMarkdown string, underlineLinks bool) error
func (*SlidesClient) CreateSlideTitleAndBody ¶
func (sc *SlidesClient) CreateSlideTitleAndBody(presentationID string, filename string) (string, error)
CreateSlideTitleAndBody is a convenience function.
type TextBoxInfoSimple ¶
type TextLine ¶
type TextLine struct { CommonMarkText string GoogleSlideText string IsBullet bool IsBold bool Links []LinkInfo Inflated bool GoogleIndexStart int64 GoogleIndexEnd int64 }
type UpdateShapePropertiesRequestUtil ¶
type UpdateShapePropertiesRequestUtil struct { Fields []string UpdateShapePropertiesRequest *slides.UpdateShapePropertiesRequest }
func NewUpdateShapePropertiesRequestUtil ¶
func NewUpdateShapePropertiesRequestUtil(objectId string) UpdateShapePropertiesRequestUtil
func (*UpdateShapePropertiesRequestUtil) AddBackgroundSolidFill ¶
func (util *UpdateShapePropertiesRequestUtil) AddBackgroundSolidFill(rgbColor *slides.RgbColor)
func (*UpdateShapePropertiesRequestUtil) AddLink ¶
func (util *UpdateShapePropertiesRequestUtil) AddLink(link *slides.Link)
func (*UpdateShapePropertiesRequestUtil) Request ¶
func (util *UpdateShapePropertiesRequestUtil) Request() *slides.Request
type UpdateTextStyle ¶
type UpdateTextStyle struct { ObjectID string RowIndex int64 ColumnIndex int64 ForegroundColorHex string Bold bool FontFamily string FontSizeMagnitude float64 FontSizeUnit string TextRangeType string Fields string }
func (*UpdateTextStyle) RequestsColumnSpan ¶
func (item *UpdateTextStyle) RequestsColumnSpan(columnSpan int64) ([]*slides.Request, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
create_image
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 Adding Image to a Slide: https://developers.google.com/slides/how-tos/add-image
|
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 Adding Image to a Slide: https://developers.google.com/slides/how-tos/add-image |
create_line
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 |
create_table
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 |
create_textbox
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 |
create_textboxes_single_column
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 |
format_markdown
Formatting text with the Google Slides API Video: https://www.youtube.com/watch?v=_O2aUCJyCoQ
|
Formatting text with the Google Slides API Video: https://www.youtube.com/watch?v=_O2aUCJyCoQ |
format_text
Formatting text with the Google Slides API Video: https://www.youtube.com/watch?v=_O2aUCJyCoQ This intentially does not use any of the helpers in https://github.com/grokify/gogoogle/slidesutil/v1/ See the `examples/format_markdown` for how to use the slidesutil request helpers.
|
Formatting text with the Google Slides API Video: https://www.youtube.com/watch?v=_O2aUCJyCoQ This intentially does not use any of the helpers in https://github.com/grokify/gogoogle/slidesutil/v1/ See the `examples/format_markdown` for how to use the slidesutil request helpers. |
hello_world
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 |