0.1.0-2 • Published 3 years ago
nswebdown v0.1.0-2
nswebdown
a website downloader and archiver
What is this?
This is my personal website downloader and archiver.
It downloads a webpage and archives its contents, as well as all linked resources.
A copy of all downloaded data is sent to nodesite.eu. You can opt out of this with the NO_ARCHIVE=1 env flag: NO_ARCHIVE=1 nswebdown https://example.org downloaded/
Usage
CLI usage: nswebdown <URL> <folder>
For example: nswebdown https://example.org downloaded/
Usage in scripts:
import { grab } from 'nswebdown';
grab('https://example.org', 'my_folder/', console.log);
The third argument is a logging function, you can pass in anything:
grab('https://example.org', 'my_folder', (r: string) =>
process.stdout.write(`\r${r} <= `)
);
For people that don't use TypeScript:
const { grab } = require('nswebdown');
grab('https://example.org', 'my_folder', console.log);