New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

get-all-the-things

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-all-the-things

Download listed files from a json array

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-88.89%
Maintainers
1
Weekly downloads
 
Created
Source

Get All The Things!

Download listed files from a json array to given targets.

Why?

Well you might just want to download a big ol' list of files, or possibly something more adventurous?

For example, my site MichaelCook.tech parses markdown files to create its articles and some of those articles incorporate github project readmes. So, in order to keep those localised readmes nice and fresh, I can run this script to bring down the up-to-date files and slot them into the necessary directories.

Install

yarn add get-all-the-things

Run

node node_modules/get-all-the-things/get-all-the-things.js

Configuration

You'll need a get-all-these-things.json file in your project's root directory with structure similar to:

[
	{
		"source": "http://example.com/image-1.png",
		"target": "downloads/image-name",
		"retainFiletype": true
	},
	{
		"source": "http://example.com/file-1.txt",
		"target": "downloads/file-name.doc"
	}
]

These are the available parameters for each item

OptionTypeDefaultDescription
sourcestringnullFilepath from which to download
targetstringnullLocal destination filepath
retainFiletypeboolfalseIf the target filepath should be appended with the original file type

Keywords

FAQs

Package last updated on 16 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc