post-it-pad

module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: GPL-3.0

README

Post-it-Pad

Post-it Pad contains generic html email layouts. It's integrated and intended to be used with Post-it by apio. However, the generated html can also be used anywhere.

It comes with cmd interface and can be imported to other go projects. The API supports the following basic functionality:

  1. Create new blank layout for customization
  2. Generate HTML with example json for specific or all layouts
  3. Generate HTML with custom json

We welcome contributions for more layouts as the community sees fit.

Develop

Use the command to build and test out functionality:

go run ./cmd/pad/main.go generate -h

Usage

Command Cli

Alternatively, use the pre-built docker container to use the cmd:

docker run -v $(pwd)/output:/app/output ghcr.io/apiobuild/post-it-pad generate -n receipt

The output will be at output/generated.html

Go Package
go get github.com/apiobuild/post-it-pad
Build

Use the go build command to build the cli:

go build -o pad cmd/pad/main.go

Alternatively, use docker build -t post-it-pad . to build the docker image.

Tests

Use the command to run test suite.

go test ./... -coverprofile cp.out

Email Template CSS

The email template css is based off https://github.com/leemunroe/responsive-html-email-template.

Directories

Path Synopsis
cmd
pad
pkg

Jump to

Keyboard shortcuts

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