Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bit-willi/googleSheetsSimpleCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

21 Commits

Repository files navigation

googleSheetsSimpleCache

Simple project for a local cache of a google spreadsheet. This application arose from a need to use google spreadsheets without worrying about limiting requests. You can improve by creating a microservice and automating with a cronjob.

usage:

  • fill in the environment variables in source/config.php;
  • use getSheetFromGoogle() to access the online spreadsheet;
  • use generateCache() to generate cache/cache.csv file;
  • use getCache() to get values from cache file

config file example:

  • location -> programPath/source/credentials.json define("credentialsPath", DIR . "/credentials.json");

  • location -> programPath/source/token.json

  • if it's your first time running, use the etSheetFromGoogle () function to create a valid token.json define("tokenPath", DIR . "/token.json");

  • location -> programPath/cache/cache.csv define("cachePath", DIR . "/../cache/cache.csv");

  • this is a standard google spreadsheet, replace it with yours define("sheetId", "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms");

  • this is the range, that is, which column can be checked from, check the official google API v4 documentation for more details define("sheetRange", "A:E");

About

Simple project for a local cache of a google spreadsheet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

Languages

AltStyle によって変換されたページ (->オリジナル) /