Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #19

Merged
merged 3 commits into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

Expose Google Sheets as JSON data

[![Gem Version](https://badge.fury.io/rb/sheet_zoukas.svg)](https://badge.fury.io/rb/sheet_zoukas)

![Tests](https://github.com/eebbesen/sheet_zoukas/actions/workflows/ruby.yml/badge.svg)

[![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop/rubocop)

Created to allow Google Sheets to be used as read-only databases. Associates each row's values with the corresponding header ("column") name.

## Why `sheet_zoukas`?
Questionable portmanteau of [Jason Mantzoukas](https://en.wikipedia.org/wiki/Jason_Mantzoukas) and Google Sheets. Because JSON.

## Installation

Install the gem and add to the application's Gemfile by executing:
Expand All @@ -34,10 +39,11 @@ This gem assumes the existence of a [Google service account](https://developers.


### Notes
* All data exposed as Strings. You can convert data to other types as you ingest this gem's output.
* All data is exposed as the display value
* Sheets are accessed with the https://www.googleapis.com/auth/spreadsheets.readonly scope
* All data exposed as strings. You can convert data to other types as you ingest this gem's output.
* All data is exposed as the value you see when viewing the sheet
* This impacts dates. For example, if your spreadsheet does not display the year as part of a date, this gem will not include a year in it's output for those cells.
* No `nil` values, just empty Strings. You can convert empty strings to `nil` as you ingest this gem's output.
* No `nil` values, just empty strings. You can convert empty strings to `nil` as you ingest this gem's output.
* Row values outside of header range will not be captured. You must have a non-blank header for the row data to be included in this gem's output.
* Performance: this gem has not been tested with large Google Sheets. If you encounter performance issues consider passing in cell ranges to iteratively get your dataset ala pagination.

Expand All @@ -59,16 +65,19 @@ RSpec tests require the environment variables listed in spec_helper.rb's `REQUIR

## Release
Build

$ rake build

Test

$ gem install pkg/sheet_zoukas-<VERSION>.gem
$ irb

irb(main):001> require 'sheet_zoukas'
irb(main):002> SheetZoukas.retrieve_sheet_json('<GOOGLE_SPREADSHEET_ID>', '<TAB_NAME>')

Release

$ rake release

## Contributing
Expand Down