https://github.com/r3code/sendgrid-man
Sendgrid Template Downloader
https://github.com/r3code/sendgrid-man
Last synced: 7 months ago
JSON representation
Sendgrid Template Downloader
- Host: GitHub
- URL: https://github.com/r3code/sendgrid-man
- Owner: r3code
- License: mit
- Created: 2020-06-05T04:49:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-09T08:40:52.000Z (over 3 years ago)
- Last Synced: 2025-04-03T07:43:07.179Z (10 months ago)
- Language: Go
- Size: 12.7 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sendgrid-man
Sendgrid Man a command line tool which allows you to export your dynamic templates (HTML and Plain) from Sendgrid to files.
Now you can store them in your version control system.
By default it exports only HTML of active version of each template and names it by the template name `templateName.html` (or `templateName.txt` for plain).
To retrieve all vesions specify `--all` flag. It will retrieve all the versions and name the file it as `templateName__versionID.html`.
To export plain versions use a flac `--include_plain`. It will retrieve the plain content and name the file as `templateName__versionID.txt`.
To overvrite existing files use `--overwrite` flag.
## Install
go get github.com/r3code/sendgrid-man/cmd/sendgridman
## Usage
sendgridman --apikey=Your_Sendgrid_Key --basedir=.
or
export SENDGRID_API_KEY=SG.___
sendgridman --apikey=$SENDGRID_API_KEY --basedir=.
or
SENDGRID_API_KEY=SG.___ sendgridman --apikey=$SENDGRID_API_KEY --basedir=.
For `--apikey` you should use the Sendgrid ApiKey which have an access to read the templates. Sendgrid shows you an ApiKey only once at create time, if you forgot or lost the key you should create a new one.
By default all the templates are exported to current working dir. To store in an another dir use `--basedir` flag to set the path to it.
## Compile from source
Download source from git
git clone https://github.com/r3code/sendgrid-man.git
Build from source
cd sendgrid-man/cmd/sendgridman
go build