1.0.2 • Published 7 years ago

@house-agency/house-google-spreadsheet v1.0.2

Weekly downloads
46
License
MIT
Repository
bitbucket
Last release
7 years ago

House Google Spreadsheet Parser

Instalation

npm i @house-agency/house-google-spreadsheet --save -E

Description

Loads and parses a Google Spreadsheet into JSON format. Requires a column named status with either a checkbox or plain text setting TRUE or FALSE. Requires a column named id that uses names with dot notation to create objects in the output. Requires a column named copy that will be mapped into the set id for that row.

Usage

const copyParser = require( '@house-agency/house-google-spreadsheet' );

const credentials = JSON.parse( fs.readFileSync( credentials_file ) );
const config = {
	key: google_spreadsheet_key,
	credentials: credentials,
	sheetList: array_of_tabs_to_parse
};
const copyParsed = copyParser.copy( config );

The parser returns a promise so in order to correctly parse the result, this method needs to be read on a async method with await.

const result = ( await copyParsed );
1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago