{ "info": { "author": "Paul Fitzpatrick", "author_email": "paul.michael.fitzpatrick@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Topic :: Utilities" ], "description": "# sheetsite: sheets for sites\n\n[![Build Status](https://travis-ci.org/paulfitz/sheetsite.svg?branch=master)](https://travis-ci.org/paulfitz/sheetsite)\n[![PyPI version](https://badge.fury.io/py/sheetsite.svg)](http://badge.fury.io/py/sheetsite)\n\nKeep a website or directory in sync with a google sheet.\n\nFeatures:\n\n* Copy a google spreadsheet locally, as json or excel format.\n* Can strip specified tabs, columns, or cells from the spreadsheet,\n in case not all of it should be copied along.\n* Can push a filtered json copy out to a git repository, handy for\n maintaining a website based on a private shared spreadsheet.\n* Can augment the sheet with geocoding, adding latitude and longitude based\n on address fields for example.\n* Can notify people by email with a summary of updates.\n\n\n## Installation\n\nFor the basics:\n\n```\npip install sheetsite\n```\n\nFor all bells and whistles, when automating a sheet-to-site workflow:\n\n```\npip install sheetsite[queue]\n```\n\n## Specifying the source and destination\n\nThe `sheetsite` utility, when run without any arguments, will expect\nto find all necessary options in a `_sheetsite.yml` file. A simple\nexample of such a file is:\n\n```yaml\nsource:\n name: google-sheets\n key: 15Vs_VGpupeGkljceEow7q1ig447FJIxqNS1Dd0dZpFc\n credential_file: service.json\n\ndestination:\n file: sheet.xlsx\n```\n\nThe file should have two stanzas, `source` specifying where to get\ndata from, and `destination` specifying where to put it. This\nexamples reads a private google spreadsheet and saves it as\n`sheet.xlsx`. The key comes from the url of the spreadsheet.\nThe credentials file is something you [get from google](https://pygsheets.readthedocs.io/en/stable/authorizing.html).\n\nHere's an example that outputs json:\n\n```yaml\nsource:\n name: google-sheets\n key: 15Vs_VGpupeGkljceEow7q1ig447FJIxqNS1Dd0dZpFc\n credential_file: service.json\n\ndestination:\n file: _data/directory.json\n```\n\nYou could now build a static website from that `.json`, see\nhttp://jekyllrb.com/docs/datafiles/ for how, or see an example\nat https://github.com/datacommons/commoners\n\nHere's an example that adds some geocoded fields and directly\nupdates a git repository:\n\n```yaml\nsource:\n name: google-sheets\n key: 19UaXhqPQ0QHEfSWS_adDEtPwYstq8llK2YijpvFZcKA\n credential_file: service.json\n\nflags:\n add:\n directory:\n - LAT\n - LNG\n - COUNTRY\n - STREET\n - REGION\n - LOCALITY\n\ndestination:\n name: git\n repo: git@github.com:datacommons/commoners\n file: _data/directory.json\n```\n\n## Strip private sheets, columns, or cells\n\nBy default, sheetsite will strip:\n\n* Any columns whose name is in parentheses, e.g. `(Private Notes)`\n* Any cells or text within cells surrounded by double parentheses, e.g. `((private@email.address))`\n* Any sheets whose name is in double parentheses, e.g. `((secret sheet))`\n\n## Geocoding\n\nIf you have a table with a column called `address`, sheetsite can geocode it for\nyou and pass along the results. Just add the following in your yaml:\n\n```\nflags:\n add:\n table_name_goes_here:\n - latitude\n - longitude\n - country\n - state\n - city\n - street\n - zip\n```\n\nYou can add just the columns you want. Geocoding results are cached in a `_cache`\ndirectory by default so they do not need to be repeated in future calls to sheetsite.\n\nThe full list of columns (with synonyms) available is:\n * latitude / lat\n * longitude / lng\n * latlng\n * country\n * state / province / region\n * city / locality\n * street\n * zip / postal_code\n\nNormally you won't actually have a stand-alone `address` column. More usually,\ninformation will be spread over multiple columns, or some will be implicit (e.g.\nthe state/province and country). You can tell sheetsite how to construct addresses\nfor geocoding by listing columns and constants to build it from. For example:\n\n```\nflags:\n address:\n table_name_goes_here:\n - street_address1\n - street_address2\n - city\n - Manitoba\n - Canada\n add:\n table_name_goes_here:\n - postal_code\n```\n\nThis tells sheetsite to produce addresses of the form:\n```\n Manitoba Canada\n```\nAnd add a `postal_code` column populated by geocoding.\n\nIt is possible to request columns directly in the spreadsheet. Just\nwrap the column name in square brackets, like `[state]` or `[zip]`.\nAny blank cells in such columns will be filled using geocoding based\non the address given in that row. If the address columns have not been\nconfigured in `flags` then the address must be present in a single column\nliterally called `address`.\n\n## Row uuids\n\nThere's a random feature to add uuids to rows. Just add a column\ncalled `dccid` for some reason:\n\n```\nflags:\n add:\n table_name_goes_here:\n - dccid\n```\n\nA uuid will be added to each row. A good faith effort will be made\nto keep that uuid constant across updates, keeping it linked to the\nrow where it first appeared.\n\n## Grouping locations\n\nIf there are several rows of a sheet that will give locations that should\nbe thought of as a single unit (e.g. an organization with multiple locations),\nyou can tell `sheetsite` about that. To do so, give it a `group` key.\nEvery row for which the `group` is the same (and not blank) will be bound\ntogether. When geocaching, blank cells in address cells will be filled\nin with information from the first row in this group. For example, with this\nconfiguration:\n\n```\nflags:\n group: WEBSITE\n```\n\nThen for a table like the following:\n\n```\nSTREET, CITY, STATE, WEBSITE\n...\n17 N St, Foo, Utopia, joe.ut\n16 S St, , , joe.ut\n...\n```\n\nDuring geocoding, `16 S St` would be assumed to be in `Foo, Utopia`.\n\n## Renaming columns\n\nColumns can be renamed. This will occur before any other operation.\n\n```\nflags:\n rename:\n table_name:\n old_column_name1: new_column_name1\n old_column_name2: new_column_name2\n```\n\n## Getting credentials\n\n[Obtain credentials for accessing sheets from the Google Developers Console](https://pygsheets.readthedocs.io/en/latest/authorizing.html).\n\nMake sure you share the sheet with the email address in the credentials file. Read-only permission is fine.\n\n## Examples\n\nFor example, the map at http://datacommons.coop/tap/ is a visualization\nof data pulled from a google spreadsheet, styled using\nhttps://github.com/datacommons/tap via github pages.\n\n## sheetwatch\n\nIt can be useful to automate and forget `sheetsite`, so that updates\nto a google spreadsheet propagate automatically to their final\ndestination. The `sheetwatch` utility does this. It requires a queue\nserver to operate. To install, do:\n\n```\npip install sheetsite[queue]\n```\n\nInstall any queue server supported by `celery`. For example, `redis`:\n\n```\nsudo apt-get install redis-server\nredis-server\n```\n\nWe need to set some environment variables to let `sheetwatch` know\nwhere to find the queue server:\n\n```\nexport SHEETSITE_BROKER_URL=redis://localhost\nexport SHEETSITE_RESULT_BACKEND=redis://localhost\n```\n\nThe `sheetwatch` program needs a cache directory for its operations.\n\n```\nexport SHEETSITE_CACHE=$HOME/cache/sites\n```\n\nFinally, it needs to know where there is a directory full of `yml`\nfiles describing any sheets to monitor and their corresponding sites:\n\n```\nexport SHEETSITE_LAYOUT=$PWD/sites/enabled\n```\n\nWe now start a worker:\n\n```\nsheetwatch worker\n```\n\nThe last thing we need to do is check a mailbox from time to time\nfor sheet change notifications from Google, and kick off site updates\nas needed:\n\n```\n export GMAIL_USERNAME=*****\n export GMAIL_PASSWORD=*****\nsheetwatch ping --delay 60\n```\n\n## License\n\nsheetsite is distributed under the MIT License.\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/paulfitz/sheetsite", "keywords": "google sheet xls json", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sheetsite", "package_url": "https://pypi.org/project/sheetsite/", "platform": "", "project_url": "https://pypi.org/project/sheetsite/", "project_urls": { "Homepage": "https://github.com/paulfitz/sheetsite" }, "release_url": "https://pypi.org/project/sheetsite/0.2.2/", "requires_dist": null, "requires_python": "", "summary": "read google sheets, use them for sites", "version": "0.2.2" }, "last_serial": 4300517, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "0b8a987d5ffbf8d9507b8b69ffd794a4", "sha256": "825630d616875d8c58089104c8142a9a8fdabb4ee3b93d22923f1eedf2ecf291" }, "downloads": -1, "filename": "sheetsite-0.1.1.tar.gz", "has_sig": false, "md5_digest": "0b8a987d5ffbf8d9507b8b69ffd794a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2130, "upload_time": "2015-10-10T23:04:50", "url": "https://files.pythonhosted.org/packages/13/fa/d993aa3cc94168792071f7b442cba287e529c8180251aa6cc8a09814598a/sheetsite-0.1.1.tar.gz" } ], "0.1.10": [ { "comment_text": "", "digests": { "md5": "76c625cf02efbe5516f4082f69b2ddb6", "sha256": "1f9998b91468e30726c325a5a4097f450e92b1c724e0f63b067361dd3ad9f071" }, "downloads": -1, "filename": "sheetsite-0.1.10.tar.gz", "has_sig": false, "md5_digest": "76c625cf02efbe5516f4082f69b2ddb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9570, "upload_time": "2016-01-10T23:20:51", "url": "https://files.pythonhosted.org/packages/27/a9/4e7c0f2e6574c064b4ac406dab79eae2d207d9f07e106c780e2c532bfe3b/sheetsite-0.1.10.tar.gz" } ], "0.1.11": [ { "comment_text": "", "digests": { "md5": "71ea51aad858d8f9ec9b26ee16cca179", "sha256": "a8f6c18e01299b311d06fb2ad6c77d9496966a4e374124004f792c08a6257c2d" }, "downloads": -1, "filename": "sheetsite-0.1.11.tar.gz", "has_sig": false, "md5_digest": "71ea51aad858d8f9ec9b26ee16cca179", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9573, "upload_time": "2016-01-10T23:23:51", "url": "https://files.pythonhosted.org/packages/cf/c8/b1fb2d61d254d76fa8de00ee537d18dbc7f7adbc528e027e5956db46070c/sheetsite-0.1.11.tar.gz" } ], "0.1.12": [ { "comment_text": "", "digests": { "md5": "90bf182ef2b1ca3851af4dbc1609ed7a", "sha256": "fb1194fbdeea62fbfc36aebb46882a0b5257c64518cb52299287afb42affeb3c" }, "downloads": -1, "filename": "sheetsite-0.1.12.tar.gz", "has_sig": false, "md5_digest": "90bf182ef2b1ca3851af4dbc1609ed7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16132, "upload_time": "2016-01-10T23:31:58", "url": "https://files.pythonhosted.org/packages/bf/81/feed4be428ca3ac7f981b3048bffa73467eeb9a022fa4802d3b6f1069069/sheetsite-0.1.12.tar.gz" } ], "0.1.13": [ { "comment_text": "", "digests": { "md5": "c5a00905164b32447061d408aeb4a2d3", "sha256": "71839f30112a1bb35b9ae74a74d48cb9fad81f644cb028a67b4db411ae8344d7" }, "downloads": -1, "filename": "sheetsite-0.1.13.tar.gz", "has_sig": false, "md5_digest": "c5a00905164b32447061d408aeb4a2d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16667, "upload_time": "2016-01-16T22:50:05", "url": "https://files.pythonhosted.org/packages/dc/d4/cc5a1ff419165ec4a0d95ee71caa9abd10d21802adbbb41dcd8f8c950a2d/sheetsite-0.1.13.tar.gz" } ], "0.1.14": [ { "comment_text": "", "digests": { "md5": "6873ce1b1803ca6e2c844be6a0015378", "sha256": "41d7655914a0eb6829d7c93904c38bb21f5d5d3d0cc2de90331361c3ac6e553f" }, "downloads": -1, "filename": "sheetsite-0.1.14.tar.gz", "has_sig": false, "md5_digest": "6873ce1b1803ca6e2c844be6a0015378", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17086, "upload_time": "2016-01-17T15:04:45", "url": "https://files.pythonhosted.org/packages/ea/6a/de78b31fe7d694df4e25b2192c09f059d44d62b541abad6f4826e32509a1/sheetsite-0.1.14.tar.gz" } ], "0.1.15": [ { "comment_text": "", "digests": { "md5": "78eefc1535dcc8efcc967238723d034c", "sha256": "1d78a4c91efe1afebcbf73e63c33676b30c20b0f61cfbb1eae6ce8405bfd26eb" }, "downloads": -1, "filename": "sheetsite-0.1.15.tar.gz", "has_sig": false, "md5_digest": "78eefc1535dcc8efcc967238723d034c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18200, "upload_time": "2016-01-21T14:41:12", "url": "https://files.pythonhosted.org/packages/a2/50/40615a3a5c030e38a1c30851184194d6a47187a48805c1a2b7d361d47e77/sheetsite-0.1.15.tar.gz" } ], "0.1.16": [ { "comment_text": "", "digests": { "md5": "6d517f5c17872149f6b8162daa1cb18e", "sha256": "d562cfe38d47395f2b43c4aafb273b33782261d49b8590a5087a671147201a2d" }, "downloads": -1, "filename": "sheetsite-0.1.16.tar.gz", "has_sig": false, "md5_digest": "6d517f5c17872149f6b8162daa1cb18e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18036, "upload_time": "2016-03-15T03:23:32", "url": "https://files.pythonhosted.org/packages/fa/27/afa37be581b5162e3f1e7007eed4d392cab45670e649314bb5382518f538/sheetsite-0.1.16.tar.gz" } ], "0.1.17": [ { "comment_text": "", "digests": { "md5": "dda846f76dc0903d5afbbc5bacc7611b", "sha256": "414593074aedd664acddfc47dc123853ef2dc306b311fd3d8100e9f61e4bf550" }, "downloads": -1, "filename": "sheetsite-0.1.17.tar.gz", "has_sig": false, "md5_digest": "dda846f76dc0903d5afbbc5bacc7611b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18159, "upload_time": "2017-09-02T02:27:13", "url": "https://files.pythonhosted.org/packages/af/77/7ce00b135aba690eb034191e0e79bc90ccfbf4984d961b69814e6f6cf4ae/sheetsite-0.1.17.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "cb0dc5a53d59a4747eb497b040bfe71d", "sha256": "301fafb770e0ce674895fa2b47cb4cb84cef352e9a2e145d5bf84c91d8c6b149" }, "downloads": -1, "filename": "sheetsite-0.1.2.tar.gz", "has_sig": false, "md5_digest": "cb0dc5a53d59a4747eb497b040bfe71d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3029, "upload_time": "2015-10-13T01:51:46", "url": "https://files.pythonhosted.org/packages/b5/ae/23797165caf33677d25f6db3439e907d2c0c1a6f953dee3d16095ff0f696/sheetsite-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2db4086e59b29b01c507d153026b00fc", "sha256": "068e9015807e33cd398f0e71af66adee3323af8a954ef7bc52decb7f77e6eabb" }, "downloads": -1, "filename": "sheetsite-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2db4086e59b29b01c507d153026b00fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3071, "upload_time": "2015-10-13T02:35:54", "url": "https://files.pythonhosted.org/packages/d6/58/6417548c0f1a0e607ef170030331665cc263a972589135454f2597ed0d5c/sheetsite-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "3ba3175500a24ccd517f47c12e57838c", "sha256": "5511675ff8e55b615dbf352128c2f4127bcf473f725d1728ddb8f04cf2e64bf5" }, "downloads": -1, "filename": "sheetsite-0.1.4.tar.gz", "has_sig": false, "md5_digest": "3ba3175500a24ccd517f47c12e57838c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3060, "upload_time": "2015-10-13T02:43:26", "url": "https://files.pythonhosted.org/packages/2a/da/40e56cd68f96c97f13783c3bd91fd1e92ebcd8a2b766f33c5e518aaec1eb/sheetsite-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "f5794829ca7ed49d907cc780ae927a1b", "sha256": "94ba517b45a2a27472ed8de0a4b32c733cd012d30702ae42a5bd7f1ae8ccca5b" }, "downloads": -1, "filename": "sheetsite-0.1.5.tar.gz", "has_sig": false, "md5_digest": "f5794829ca7ed49d907cc780ae927a1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3092, "upload_time": "2015-10-13T02:53:20", "url": "https://files.pythonhosted.org/packages/25/b7/deb495579c09519152b424fcd2d071ce5ec7a450d9378853ad12f3d5248c/sheetsite-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "d1d91e177d453ea027f12461dc97754c", "sha256": "dd9aff1e4b8330f2cf009341de3074c4853025eda7139a1408bb2b5bcf88349b" }, "downloads": -1, "filename": "sheetsite-0.1.6.tar.gz", "has_sig": false, "md5_digest": "d1d91e177d453ea027f12461dc97754c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3076, "upload_time": "2015-10-13T02:56:54", "url": "https://files.pythonhosted.org/packages/46/5c/e154112e2daa5436f6dc895bce545bac90b41af052904e5a12e69b158f90/sheetsite-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "cc7cead96c172ed93aab84a72a8b951d", "sha256": "cffae128272fe41583827232e5a74e544ddbe75fba1d528b60b84ee5d8130135" }, "downloads": -1, "filename": "sheetsite-0.1.7.tar.gz", "has_sig": false, "md5_digest": "cc7cead96c172ed93aab84a72a8b951d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6156, "upload_time": "2015-10-17T04:07:17", "url": "https://files.pythonhosted.org/packages/2e/a4/307874eb95624de528f758165bec5127be1c1a3e9ff342d8a54b4f37d882/sheetsite-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "fa40f65646b9411abf02e9bd0f1294f1", "sha256": "570bc61b1a6a3b8bd2662599fa3ef8f4c251c6e19be33c1a3195f407965eccc9" }, "downloads": -1, "filename": "sheetsite-0.1.8.tar.gz", "has_sig": false, "md5_digest": "fa40f65646b9411abf02e9bd0f1294f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6153, "upload_time": "2015-10-17T15:50:24", "url": "https://files.pythonhosted.org/packages/05/51/076f14b4c13070c32bc6e99e5093442c8b860d5e026b4c55a0584381274a/sheetsite-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "55ccba9db7f6ce460264e573336b609e", "sha256": "61087090b6d3e1fb8cc0f4c3443144991fc49ea50fcc6ad279c3442752134b6c" }, "downloads": -1, "filename": "sheetsite-0.1.9.tar.gz", "has_sig": false, "md5_digest": "55ccba9db7f6ce460264e573336b609e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7526, "upload_time": "2015-10-17T23:02:28", "url": "https://files.pythonhosted.org/packages/6e/5b/c74e706437248d6c7f9a1ba34c6fc3cebde5b54ca9018ff2b535aab46d3c/sheetsite-0.1.9.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "6045bd34d210328e3ba7ae7177e0c4ca", "sha256": "a31a322eb9a7ae9804759d069e4a88635e3efec33f424af9192c24b56ba5d36b" }, "downloads": -1, "filename": "sheetsite-0.2.1.tar.gz", "has_sig": false, "md5_digest": "6045bd34d210328e3ba7ae7177e0c4ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21372, "upload_time": "2017-09-04T16:10:19", "url": "https://files.pythonhosted.org/packages/95/85/c9b531de6e4d6aa0fafbe45dafea2eee7a347ab0ba2398ad42916a024f9a/sheetsite-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "32ebb1e08b5bccf5613e6646b1f71683", "sha256": "e58d104adc0f84f13efede165a736043d4d3d161fa0e7855deed728a030b1f52" }, "downloads": -1, "filename": "sheetsite-0.2.2.tar.gz", "has_sig": false, "md5_digest": "32ebb1e08b5bccf5613e6646b1f71683", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31624, "upload_time": "2018-09-22T21:03:08", "url": "https://files.pythonhosted.org/packages/25/dc/d53cf4c419888e4617191fc57137a3c826be8650b1121f110db7bc38776f/sheetsite-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "32ebb1e08b5bccf5613e6646b1f71683", "sha256": "e58d104adc0f84f13efede165a736043d4d3d161fa0e7855deed728a030b1f52" }, "downloads": -1, "filename": "sheetsite-0.2.2.tar.gz", "has_sig": false, "md5_digest": "32ebb1e08b5bccf5613e6646b1f71683", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31624, "upload_time": "2018-09-22T21:03:08", "url": "https://files.pythonhosted.org/packages/25/dc/d53cf4c419888e4617191fc57137a3c826be8650b1121f110db7bc38776f/sheetsite-0.2.2.tar.gz" } ] }