shync

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 7 Imported by: 0

README

Shync - Shopify Email Template Sync Client

Shync can checkout/download the Shopify email templates from your Shopify store admin to your local machine, and push/sync your email templates on your local machine to Shopify.

How to use

# Checkout email templates from Shopify to templates directory
% shync checkout --all templates

# Checkout one or more email templates from Shopify to templates directory
% shync checkout --id order_confirmation --id order_edited templates

# List the email template IDs
% shync ids

# Push all email templates in the templates directory to Shopify
% shync push --all templates

# Push one or more email templates in the templates directory to Shopify
% shync push --id order_confirmation --id order_edited templates

Configuration

Shync needs to know some information to do it's job. You can set them using following environment variables, or in a .env file in the current directory.

SHYNC_STORE: The Shopify store URL. eg: https://{shopname}.myshopify.com. Required.

SHYNC_USERNAME: The Shopify admin username. Required.

SHYNC_PASSWORD: The Shopify admin password. Required.

Motivation

Because filling forms manually to apply a change is just not enough.

How to contribute

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Checkout

func Checkout(c Config) error

func Push

func Push(c Config) error

Types

type Config

type Config struct {
	Store, Username, Password   string
	Dir                         string
	AllTemplates, IgnoreMissing bool
	Templates                   []string
	Head                        bool // false = headless
}

func (Config) BodyFile

func (c Config) BodyFile(id string) string

func (Config) Check

func (c Config) Check() error

func (Config) CheckReadable

func (c Config) CheckReadable() error

func (Config) Ids

func (c Config) Ids() []string

func (Config) SubjectFile

func (c Config) SubjectFile(id string) string

Directories

Path Synopsis
cmd
mw

Jump to

Keyboard shortcuts

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