{"id":16091033,"url":"https://github.com/abetomo/node-ss2json","last_synced_at":"2025-07-01T11:08:03.505Z","repository":{"id":21453550,"uuid":"92790196","full_name":"abetomo/node-ss2json","owner":"abetomo","description":"Convert Google Spreadsheet contents to JSON. Also update Google spreadsheet from JSON data.","archived":false,"fork":false,"pushed_at":"2025-06-09T23:55:48.000Z","size":2754,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-10T00:31:58.230Z","etag":null,"topics":["google-spreadsheet","json","node-ss2json","spreadsheet"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abetomo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-30T02:05:40.000Z","updated_at":"2025-06-09T23:55:51.000Z","dependencies_parsed_at":"2023-09-26T06:40:34.223Z","dependency_job_id":"54749b95-a762-4e2e-80bb-90c5c65c5eb8","html_url":"https://github.com/abetomo/node-ss2json","commit_stats":{"total_commits":339,"total_committers":5,"mean_commits":67.8,"dds":0.05899705014749268,"last_synced_commit":"014c02bd86eff0cd7cc230260690e515ba31e61b"},"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/abetomo/node-ss2json","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abetomo%2Fnode-ss2json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abetomo%2Fnode-ss2json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abetomo%2Fnode-ss2json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abetomo%2Fnode-ss2json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abetomo","download_url":"https://codeload.github.com/abetomo/node-ss2json/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abetomo%2Fnode-ss2json/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262950351,"owners_count":23389644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-spreadsheet","json","node-ss2json","spreadsheet"],"created_at":"2024-10-09T15:08:25.235Z","updated_at":"2025-07-01T11:08:03.474Z","avatar_url":"https://github.com/abetomo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-ss2json\n\n[![npm version](https://badge.fury.io/js/ss2json.svg)](https://badge.fury.io/js/ss2json)\n![Test](https://github.com/abetomo/node-ss2json/workflows/Test/badge.svg)\n\nConvert Google Spreadsheet contents to JSON.\nAlso update Google spreadsheet from JSON data.\n\n## install\n```\n% npm install ss2json\n```\n\n## help\n```\n% ss2json --help\nUsage: ss2json [options] [command]\n\nOptions:\n  -V, --version     output the version number\n  -h, --help        output usage information\n\nCommands:\n  get [options]\n  update [options]\n```\n\n### get\n```\n% ss2json get --help\nUsage: get [options]\n\nOptions:\n  -a, --auth [AUTH_JSON_FILE_PATH]  JSON path for Google's authentication\n  -i, --id [SPREADSHEET_ID]         Google Spreadsheet ID\n  -n, --name [SHEET_NAME]           Sheet name in Google Spreadsheet\n  -h, --help\n```\n\n### update\n```\n% ss2json update --help\nUsage: ss2json update [options]\n\nOptions:\n  -a, --auth [AUTH_JSON_FILE_PATH]  JSON path for Google's authentication\n  -i, --id [SPREADSHEET_ID]         Google Spreadsheet ID\n  -n, --name [SHEET_NAME]           Sheet name in Google Spreadsheet\n  -d, --data [DATA_JSON_FILE_PATH]  JSON file path for update data\n  --autoAddSheet                    Add when there was no sheet.\n  -h, --help                        output usage information\n```\n\n## Command example\n\nGet the data from the spreadsheet and write it to `data.json`.\n\n```\n% ss2json get \\\n    -a AUTH_JSON_FILE_PATH \\\n    -i SPREADSHEET_ID \\\n    -n SHEET_NAME \u003e ./data.json\n```\n\nYou can also edit `data.json` to update the spreadsheet.\n\n```\n% ss2json update \\\n    -a AUTH_JSON_FILE_PATH \\\n    -i SPREADSHEET_ID \\\n    -n SHEET_NAME \\\n    -d ./data.json\n```\n\n## Usage example of Node.js API\n### get\n```javascript\nconst ss2json = new (require('ss2json'))()\n\nss2json.convert({\n  authJsonPath: 'JSON path for Google\\'s authentication',\n  spreadsheetId: 'Google Spreadsheet ID',\n  sheetName: 'Sheet name in Google Spreadsheet'\n}).then((data) =\u003e {\n  console.log(data)\n}).catch((err) =\u003e {\n  console.error(err)\n})\n```\n\n### update\n```javascript\nconst ss2json = new (require('ss2json'))()\n\nss2json.update({\n  authJsonPath: 'JSON path for Google\\'s authentication',\n  spreadsheetId: 'Google Spreadsheet ID',\n  sheetName: 'Sheet name in Google Spreadsheet',\n  values: [\n    // 'Update data'\n    {  key1: 'value1', key2: 'value2' },\n    {  key1: 'value3', key2: 'value4' },\n    ...\n  ],\n  autoAdd: true // If true, the sheet will be added automatically if it doesn't exist.\n}).then((result) =\u003e {\n  console.log(result)\n})\n```\n\n## `AUTH_JSON_FILE_PATH` / `authJsonPath`\n\nUse GCP service account credentials. You first need to create a service account, download its json key.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabetomo%2Fnode-ss2json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabetomo%2Fnode-ss2json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabetomo%2Fnode-ss2json/lists"}