3 Star 0 Fork 0

Gitee 极速下载 / cronshot-local

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/yahoo/cronshot-local
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

cronshot-local

CronShot middleware to save images to the local filesystem

npm install cronshot-local

Setup

Install CronShot

npm install cronshot

Example

var cronshot = require('cronshot'),
  middleware = {
    local: require('cronshot-local')
  };

// Local File Example
// ------------------

// Takes a screenshot of sports.yahoo.com,
// and saves the screenshot to the local file system

// Save Local File Example
cronshot.startCapturing({
  'url': 'http://sports.yahoo.com',
  'path': __dirname,
  'cronPattern': false,
  'saveMiddleware': [middleware.local],
}, function(err) {
  // optional callback function once all screenshots have been taken
  if (err) {
      console.error(err);
  }
});

Options

{
  // The path where the screenshot will be saved
  'path': '',
  // The image name used to save the screenshot
  'imageName': ''
}

Contributing

Please send all PR's to the dev branch.

If your PR is a code change:

  1. Install all node.js dev dependencies: npm install
  2. Update the appropriate module inside of the src/modules directory.
  3. Add a unit test inside of tests/unit/cronshot-local.js.
  4. Verify that all tests are passing by running npm test.
  5. Send the PR!

Contributors

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/mirrors/cronshot-local.git
git@gitee.com:mirrors/cronshot-local.git
mirrors
cronshot-local
cronshot-local
master

搜索帮助