Skip to content

Commit

Permalink
Update documentation (#19)
Browse files Browse the repository at this point in the history
* version badge

* explain the name

* additional usage notes

* formatting
  • Loading branch information
eebbesen authored Oct 14, 2024
1 parent a850c33 commit 145338b
Showing 1 changed file with 12 additions and 3 deletions.
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

0 comments on commit 145338b

Please sign in to comment.