GithubHelp home page GithubHelp logo

kryndex / site-snapshot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lewuathe/site-snapshot

0.0 2.0 0.0 11 KB

Take a snapshot of your site while crawling

License: MIT License

JavaScript 2.66% TypeScript 97.34%

site-snapshot's Introduction

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

site-snapshot's People

Contributors

lewuathe avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.