Giter Site home page Giter Site logo

swipswaps / webtimemachine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from raminv80/webtimemachine

0.0 2.0 0.0 45 KB

Creates (textual and visual) snapshots of webpages by parsing sitemap and stores them in git

License: MIT License

JavaScript 100.00%

webtimemachine's Introduction

Build Status

Web Time Machine

WebTimeMachine creates visual and textual snapshot of web pages by processing site maps and stores them in a git repository.

This utility is designed out of the need to archive and inspect web page changes after each deployment. It git commits three different screenshots (mobile, tablet and desktop) plus html response of urls listed in your sitemap. This gives the benefit of inspecting changes done by each deployment from browser perspective.

This tool can be used as part of a CI build after deployment hook and it has capability to automatically push commits to a github repository.

Installation

git clone https://github.com/raminv80/webTimeMachine
cd webTimeMachine
npm install

Usage

This utility is designed for DevOps and is meant to be used as a tool to archive web pages up on deployment.

Once installation is complete run this command to create a snapshot:

npm start [--version=<verion_tag>] [--records=<artifacts_directory>] [--remote=<remote_git_url>] \ 
[--branch=<remote_branch>] [--verbose] [--batch=<batch_size>] <http(s)://url_to_your_website_sitemap.xml>
Option Required description Default
version no Used as git commit message. Unnamed version
records no path to the artifacts directory. __dirname/records/
remote no Remote git repository URL false: by default commits will not be pushed to remote
branch no Remote git branch <website_domain_name>
verbose no Enables verbose mode false
batch no Urls are processed in concurrently in batch size set by this option 3

This command creates four artifacts per url and stores them in <records_directory>/<your_website_domain>:

  • Mobile snap shot: <webpage_path>_mobile.html
  • Tablet snap shot: <webpage_path>_tablet.html
  • Desktop snap shot: <webpage_path>_desktop.html
  • Response body: <webpage_path>.html

Once all artifacts are created they will be committed to a git repository under <artifact_directory>/<your website domain> with commit message of <verion_tag>.

If remote option is set changes are pushed to the remote. branch option controls which remote branch will be used.

License

MIT.

webtimemachine's People

Contributors

raminv80 avatar themdigital 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.