Skip to content

a CLI to bulk download URLs (images/pdfs/etc) from GitHub readmes

License

Notifications You must be signed in to change notification settings

mattdesl/gh-readme-scrape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-readme-scrape

unstable

screen

A small CLI which scrapes GitHub readme pages for links and images of a certain file type, and then bulk downloads them into a destination folder.

Install

npm install -g gh-readme-scrape

Examples

For example, to bulk download the SVGs from gilbarbara/logos:

gh-readme-scrape gilbarbara/logos logos/ -e svg

This will save all the SVGs into a local folder called logos, see below:

image

Or, to bulk download PDFs from the graphics-resources readme:

gh-readme-scrape mattdesl/graphics-resources papers/ -e pdf --rename

The --rename flag will use the anchor text in the markdown to determine the file name. Result:

image

Usage

NPM

Usage:
  gh-readme-scrape repository output [opts]

Options:
  --extension, -e  a list of extensions, comma-separated
  --rename, -r     rename filenames to the Markdown anchor text
  --timeout=n      ms timeout before failing a request (default 4000ms)
  --verbose        log all requests
  --auth           authorize the readme request with GH API

The repository can be a full URL to the repository, or a shorthand like gilbarbara/logos.

The extensions can be comma-separated, such as:

gh-readme-scrape gilbarbara/logos tmp -e svg,png,gif

License

MIT, see LICENSE.md for details.

About

a CLI to bulk download URLs (images/pdfs/etc) from GitHub readmes

Resources

License

Stars

Watchers

Forks

Packages

No packages published