{"id":17115605,"url":"https://github.com/partman7/sheets-parser","last_synced_at":"2025-03-24T00:42:11.653Z","repository":{"id":61634911,"uuid":"499771669","full_name":"PartMan7/sheets-parser","owner":"PartMan7","description":"Parsing module for effortless Sheets-to-data conversion.","archived":false,"fork":false,"pushed_at":"2022-10-19T13:45:28.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T20:20:03.521Z","etag":null,"topics":["database","google-sheets-api","googleapis","hacktoberfest","sheets"],"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/PartMan7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-04T08:44:47.000Z","updated_at":"2022-10-11T19:47:50.000Z","dependencies_parsed_at":"2023-01-20T08:30:14.237Z","dependency_job_id":null,"html_url":"https://github.com/PartMan7/sheets-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PartMan7%2Fsheets-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PartMan7%2Fsheets-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PartMan7%2Fsheets-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PartMan7%2Fsheets-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PartMan7","download_url":"https://codeload.github.com/PartMan7/sheets-parser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191601,"owners_count":20575247,"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":["database","google-sheets-api","googleapis","hacktoberfest","sheets"],"created_at":"2024-10-14T17:45:29.384Z","updated_at":"2025-03-24T00:42:11.633Z","avatar_url":"https://github.com/PartMan7.png","language":"JavaScript","readme":"# sheets-parser\nParsing module for effortless Sheets-to-data conversion.\n\nUnlike conventional database systems, sheets-parser is a read-only database module with an emphasis on simplicity of use. It takes exactly _one_ line of code to get started with a sheets-parser database:\n```js\nrequire('sheets-parser')(API_KEY).getDataFromSheet(SHEET_ID).then(res =\u003e console.log(res));\n```\n...and it's up and running.\n\n## Usecase\n\nSo, why use sheets-parser if it's read-only? The simplest answer - you can now deploy public read-only databases for larger datasets while keeping with Google's advanced permissions API to restrict who can manually edit stuff, and since it's in a Google Sheet, you don't need to restrict it to programmers.\n\nAs an example, check out this [Pokémon GO Database](https://docs.google.com/spreadsheets/d/1cSm11AfVmMrRIAxDzzCc_G7mFjtIYY0rXRRweZEyEyo), maintained by the staff of the Pokémon GO chatroom on Pokémon Showdown (shoutouts Mex for their efforts). This resource is updated regularly with no programming knowledge, and is hard to mess up - while anyone can simply read and use this data with a single line of code!\n\n## Configuration and Usage\n\nTo start a sheets-parser client, simply call the module as a function and pass it your [API access key](https://console.cloud.google.com/home/dashboard). Make sure to grant this API key access to the Sheets API.\n\nOnce you have your API key, you can use it in one of two ways. The first way is to simply pass it directly:\n```js\nconst API_KEY = '5u6aF578gyAH9f7tklH9v9CVT8';\nconst sheetsParser = require('sheets-parser')(API_KEY);\n```\n\nAlternatively, you can store it in the environment as `process.env.GOOGLE_API_KEY`.\n```js\nconst sheetsParser = require('sheets-parser')();\n```\n\nDo note that you can also supply an OAuth2 client instead of an API key to the parser - it'll still work!\n\n\n## Using the Parser\n\nOnce you have the sheetsParser client ready, you can start using it straight away! Currently, sheetsParser has two available methods:\n\n* `sheetsParser.getCollections(sheetId: String)`: Returns a promise that resolves with a list of all available collections in the spreadsheet.\n* `sheetsParser.getDataFromSheet(sheetId: String, collections?: [String], mapping?: mapFunction)`: Returns a promise that resolves with the data requested.\n\n\n## Database Layout\n\nPlease refer to [this file](/DATABASE.md) for details on how databases are formatted.\n\n\n## Contributing and Issues\n\nIf you have any issues, please open an issue on this repository! I check on my projects on a daily basis, so I should get back to you within a day or two.\n\nIf you'd like to contribute to the repository, please open a pull request - I'll be going over them manually. Please stick to existing styling, and feel free to ask me if there's something you're unsure about!\n\n\n## Planned features\n\n* Add in write methods for users with an API client (as opposed to a simple API key).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpartman7%2Fsheets-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpartman7%2Fsheets-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpartman7%2Fsheets-parser/lists"}