This is a Node CLI script to scrape Mailchimp data from the Rhode Island SOS website in order to add additional info the Mailchimp database.
- Pull down this repo
- Ensure you've got Node >= 7.9.0 and npm >= 4.2.0
npm install
Note that this repo currently queries a local members.json
data file, and not the Mailchimp API directly. You'll need this file if you want to run this CLI locally. If you have API access, you can download the members list into a members.json
file.
This repo contains a single Node.js executable, index.js
. The following args are valid:
Argument | Type | Description |
---|---|---|
log |
bool |
Log the output |
id |
string |
Get the data for a specific Mailchimp ID |
zip |
string |
Pass a specific zipcode to the query |
address |
string |
Pass a specific address to the query |
city |
string |
Pass a specific city to the query |
recursive |
bool |
Run successive queries, recursively |
max |
number |
Maximum number of successive queries to run recursively. Default 10 . |
./index.js --log
./index.js --id=bsubakf9fo01903r0923
./index.js --address='1 Main Street' --zip='00000', --city=Providence
./index.js --recursive
./index.js --recursive --max=100
- Write a
PATCH
request to update the Mailchimp DB.