Socket
Socket
Sign inDemoInstall

eshot

Package Overview
Dependencies
298
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eshot

Screenshot tool for emails


Version published
Weekly downloads
6
Maintainers
1
Install size
19.3 MB
Created
Weekly downloads
 

Readme

Source

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 <john.doe@example.com>'],
    to: ['Jane Doe <jane.doe@example.com>'],
    replyTo: ['john.doe@example.com']
  }, 

  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 <john.doe@example.com>'],
    to: ['Jane Doe <jane.doe@example.com>'],
    replyTo: ['john.doe@example.com']
}

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...

Keywords

FAQs

Last updated on 20 May 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc