eshot
v0.9.0
Published
Screenshot tool for emails
Downloads
11
Readme
eshot
Screenshot tool for emails. You may screenshot just the email itself or add in the different email fields such as from, to, subject etc...
Requirements
Before screenshotting anything, you must create an eshot-fields.yml
at the root of the directory that contains the files you want to screenshot. This is the preferred/faster way to pull in the email field data instead of using the command prompts.
Installation
npm install -g eshot
Command Line Usage
eshot <files>
Command Line Options
Using Prompt
Flag: -p
Example: eshot -p <files>
Brings up the command line prompt to manually enter in the email fields
Add mobile version
Flag: -m
Example: eshot -m <files>
Screenshot mobile version as well
Custom YAML file
Flag: -y
Example: eshot -y=customName.yml <files>
Will use customName.yml
instead of the default YAML config file
No email fields
Flag: --subject
Example: eshot --subject false <files>
Will not add the subject line information
Config File
Example:
module.exports = {
files: ['**/*.{html,txt}'],
base: './',
sanitize: function(html){
return html;
},
offset: 993,
prompts: {
from: ['John Doe <[email protected]>'],
to: ['Jane Doe <[email protected]>'],
replyTo: ['[email protected]']
},
yamlName : 'customName.yml',
ignoreDirs: ['Users', 'ramp', '2013**']
};
config.files
Type: array
Default: [**/*.{html,txt}]
Glob pattern that matches the files types to screenshot
config.base
Type: string
Default: ./
Base directory to search
config.sanitize
Type: function
Default: function(html){ return html; }
Allows you to sanitize/manipulate the html before screenshotting
config.offset
Type: number
Default: 993
Sets the offset of the screenshot. Allows you to control how much content from the previous page gets rendered to the next page.
config.prompts
Type: object
Default:
{
from: ['John Doe <[email protected]>'],
to: ['Jane Doe <[email protected]>'],
replyTo: ['[email protected]']
}
Subject line field options
config.yamlName
Type: string
Default: 'eshot-subjectInfo.yml'
File name for the yaml config
config.ignoreDirs
Type: array
Default: []
Glob patterns of directories to ignore when creating the file name when not using YAML file
Testing
Coming Soon...