Skip to content

A moderately flexible and configurable Node.js based parser for the USDA's Standard Reference of nutrition information.

Notifications You must be signed in to change notification settings

gesinger/usda-sr-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

usda-sr-parser

A node.js script to parse the USDA's standard reference.

The script allows a bit of flexibility in how the results are returned. No matter what options are selected, a sqlite3 database is created. After the database is created, if --db-only isn't passed as an argument, then the JSON document will be created as well.

Sample Commands

time node index.js --sr-dir sr26/ --sqlite-db sr.db --es-export temp.out --fill-tables '["DATSRCLN"]' --reuse-db
time node index.js --sr-dir sr26/ --sqlite-db sr.db --es-export temp.out --reuse-db

Notes

Paths must be absolute. A table name can't be the same as one of the column names (see source code and derivation code)

About

A moderately flexible and configurable Node.js based parser for the USDA's Standard Reference of nutrition information.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published