Code Monkey home page Code Monkey logo

stogarobotics-static-page-downloader's Introduction

Conestoga Robotics page statickifier!

This project downloads pages from a backend and stores them as static pages, such as for GitLab Pages.

Setup

Edit ./config.js to specify which files to download or copy. Edit the properties of the module.exports object to edit the settings.

Property Description
dirTarget: string Path to the directory to which the files should be downloaded (must be edited in the Batch scripts separately)
copyPairs: string[][] Array of [local file/directory path, copy destination] pairings
downloadQueryPairs: string[][] Array of [server file location, download destination] pairings

Add or edit ./config.bat to set SSH and Git settings.

Variable Description
ssh_url The Git SSH URL of the target repository
email The email to be supplied to Git
name The name to be supplied to Git
commitmsg The commit message to be used when committing to Git

Dependencies are not included with this source code. Use npm install to download the dependencies.

Downloading

  1. Clear the current static directory. npm run clear (may have to be run multiple times)
  2. Pull the files from a target repository. .\git-get.bat
  3. Delete the files to be replaced. (Any existing files that share a name with a target file will be skipped by the downloader, not overwritten)
  4. Start the server of the page. (Avoid running using nodemon, it will cause higher rates of ECONNRESETs)
  5. Download the wanted files. npm run download (may have to be run multiple times. If there is an ECONNRESET error, simply run again)
  6. Make any needed changes to the static files.
  7. Track the files and push them to the repository. .\git-post.bat

Other scripts

Use .\git-undolast.bat to undo the last pushed commit, while retaining changes locally.

stogarobotics-static-page-downloader's People

Contributors

enamchae avatar

Watchers

 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.