coloringbook

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: BSD-3-Clause Imports: 21 Imported by: 0

README

go-sfomuseum-colouringbook

Go package for generating SFO Museum "coloring book" sheets.

Important

This is SFO Museum specific code and is not designed to be a general purpose tool. It is being released "as-is" as a reference implementation in a spirit of generousity and to support the Coloring Books Pages For the SFO Museum Aviation Collection blog post.

General purpose tools for "outlining" arbitrary images are available in the sfomuseum/go-coloringbook package.

Documentation

Documentation is incomplete at this time.

See also

Documentation

Index

Constants

View Source
const GENERATE_COLORING_BOOK_LAMBDA_URI string = "aws://GenerateColouringBook?region=us-west-2&credentials=session"

Variables

This section is empty.

Functions

func AddSheet

func AddSheet(ctx context.Context, pdf *fpdf.Fpdf, opts *AddSheetOptions) error

func DeriveObjectImage

func DeriveObjectImage(ctx context.Context, opts *DeriveObjectImageOptions, image_id int64) (string, error)

func GenerateColoringBookLambda

func GenerateColoringBookLambda(ctx context.Context, function_uri string, object_id int64) error

func Orientation

func Orientation(im image.Image) string

Types

type AddSheetOptions

type AddSheetOptions struct {
	Image           image.Image
	ImageReader     io.Reader
	ImagePath       string
	Title           string
	Date            string
	CreditLine      string
	AccessionNumber string
	URL             string
	Outline         *outline.OutlineOptions
}

type ColoringBookRequest

type ColoringBookRequest struct {
	ObjectId     int64 `json:"object_id"`
	UpdateObject bool  `json:"update_object"`
}

type DeriveObjectImageOptions

type DeriveObjectImageOptions struct {
	Reader  reader.Reader
	Outline *outline.OutlineOptions
}

Directories

Path Synopsis
cmd
pdf

Jump to

Keyboard shortcuts

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