0.1.0 • Published 7 years ago

site-snapshot v0.1.0

Weekly downloads
2
License
MIT
Repository
-
Last release
7 years ago

site-snapshot npm

site-snapshot is a tool to capture the webpage while crawling specified links of the page.

NPM

Install

$ npm install -g site-snapshot

Usage

$ siteshot --help

  Usage: siteshot [options]


  Options:

    -V, --version              output the version number
    -s, --sitefile [sitefile]  The path to site.json file
    -h, --help

site.json

site-snapshot need to receive a json file which specifies the path to be crawled. The format of the file is here.

{
	"name": "index",
	"selector": null,
	"baseUrl": "http://www.lewuathe.com",
	"children": [
		{
			"name": "menu",
			"selector": ".element",
			"children": []
		}
	]
}

With this file, site-snapshot tries to crawl recursively.

  1. Capture root page
  2. Capture child pages specified by selector in children object

Snapshot is created in index directory in this case.

$ tree index
index
├── index.html.pdf
└── menu
    ├── menu-about.pdf
    ├── menu-contact.pdf
    └── menu-writing.pdf

1 directory, 4 files

License

MIT License

0.1.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago