metalsmith plugin scrape google drive folder
Last updated 3 years ago by leviwheatcroft .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install metalsmith-google-drive 
SYNC missed versions from official npm registry.






metalsmith to scrape files from google drive


  • requests token authorisation via CLI
  • caches token and files, only requests changed files
  • no tests yet

See the annotated source or github repo


npm i --save github:leviwheatcroft/metalsmith-google-drive


api credentials

Follow this guide, go through A to G under Step 1, the downloaded file will contain the credentials you need to pass into this plugin. In these examples I'm using config to store them.

Once you've authed, the token will be printed to console, you can store this token in a config file if you wish, but be aware that it's sensitive so put it somewhere which isn't tracked.


  auth: config.get('driveAuth'),
  src: '0B1QpLgu4qk48R1hDBi1wWFkyV2s',
  dest: 'articles'
.build( ... )


  • src {String} being the drive id of the parent folder you want to scrape
  • dest {String} the path under which you want to place the scraped files in metalsmith
  • auth {Object} containing client_id, client_secret and redirect_uris
  • cache {Boolean} (default: true) store files in cache


  • to get a google drive folder id just view it in your browser and copy the id from the url
  • files in subfolders on google drive will be included, but their containing folders will not be included in the path in metalsmith. In otherwords, this plugin does a recursive search but flattens the result.
  • files scraped from drive will not be stored in your file system, they're added directly to metalsmith files structure during build.


Levi Wheatcroft


Contributions welcome; Please submit all pull requests against the master branch.


Current Tags

  • 1.0.0                                ...           latest (3 years ago)

7 Versions

  • 1.0.0                                ...           3 years ago
  • 0.1.6                                ...           3 years ago
  • 0.1.5                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 2
Dependencies (12)
Dependents (1)

Copyright 2014 - 2016 © |