# Install
```bash
pip install skittle-sheets
```
To access private Google Sheets, generate a service account and JSON key file following
https://cloud.google.com/iam/docs/creating-managing-service-account-keys
Place the JSON key file in the working directory, a parent directory, your home directory, or `~/config/skittle`. Make sure the filename matches `*service*.json` (e.g,. move it to `~/config/.skittle_service.json`).
# Format and examples
![layout and longform output](docs/example_B.png)
There are three meaningful blocks that are automatically extracted from the layout based on location. Any other content is ignored, so it's OK to put notes wherever you like.
1. Key value pairs, like `experiment: <experiment_name>`. These must be at the top left of the sheet.
2. Variable definitions. Each must be an Oklahoma-shaped region in the first three columns (variable name, value, and code).
3. Grids mapping variables onto plates. The grid can be anywhere, but the spacing between variable name and row/column labels is important. Fill out the plate with codes (empty cells are OK). Plates labels can be listed after a semicolon (a grid with no plate label applies to all plates).
Here are (some examples)[https://docs.google.com/spreadsheets/d/1UVDRgs1w6fySZqJqEbEH1v7m1i0qhhpQ_r9Y59TZ8tU/edit#gid=968744084]:
```bash
# example A
skittle export https://docs.google.com/spreadsheets/d/1UVDRgs1w6fySZqJqEbEH1v7m1i0qhhpQ_r9Y59TZ8tU/edit#gid=968744084
# example B (shown above)
skittle export https://docs.google.com/spreadsheets/d/1UVDRgs1w6fySZqJqEbEH1v7m1i0qhhpQ_r9Y59TZ8tU/edit#gid=767021684
# example C
skittle export https://docs.google.com/spreadsheets/d/1UVDRgs1w6fySZqJqEbEH1v7m1i0qhhpQ_r9Y59TZ8tU/edit#gid=1432994532
```
# Usage
## Public Google Sheets
```bash
skittle export <URL>
```
## Private Google Sheets
Share your Google Sheets document with the service account generated above (read-only is fine). Then run:
```bash
skittle export "<spreadsheet>/<worksheet>"
```
If the Drive and Sheets APIs are not already enabled, there will be an error message with a link prompting you to enable them.
## Local `.csv` file
```bash
skittle export layout.csv
```
Raw data
{
"_id": null,
"home_page": "",
"name": "skittle-sheets",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "lab,biology,plate,experimental design",
"author": "David Feldman",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/fd/62/62cd411df8f9417671b3c533e6852a7d5c6469c27286bece285389cacd74/skittle-sheets-0.0.5.tar.gz",
"platform": null,
"description": "# Install\n\n```bash\npip install skittle-sheets\n```\n\nTo access private Google Sheets, generate a service account and JSON key file following\nhttps://cloud.google.com/iam/docs/creating-managing-service-account-keys\n\nPlace the JSON key file in the working directory, a parent directory, your home directory, or `~/config/skittle`. Make sure the filename matches `*service*.json` (e.g,. move it to `~/config/.skittle_service.json`).\n\n# Format and examples\n\n![layout and longform output](docs/example_B.png)\n\nThere are three meaningful blocks that are automatically extracted from the layout based on location. Any other content is ignored, so it's OK to put notes wherever you like.\n\n1. Key value pairs, like `experiment: <experiment_name>`. These must be at the top left of the sheet.\n2. Variable definitions. Each must be an Oklahoma-shaped region in the first three columns (variable name, value, and code).\n3. Grids mapping variables onto plates. The grid can be anywhere, but the spacing between variable name and row/column labels is important. Fill out the plate with codes (empty cells are OK). Plates labels can be listed after a semicolon (a grid with no plate label applies to all plates).\n\nHere are (some examples)[https://docs.google.com/spreadsheets/d/1UVDRgs1w6fySZqJqEbEH1v7m1i0qhhpQ_r9Y59TZ8tU/edit#gid=968744084]:\n\n```bash\n# example A\nskittle export https://docs.google.com/spreadsheets/d/1UVDRgs1w6fySZqJqEbEH1v7m1i0qhhpQ_r9Y59TZ8tU/edit#gid=968744084\n# example B (shown above)\nskittle export https://docs.google.com/spreadsheets/d/1UVDRgs1w6fySZqJqEbEH1v7m1i0qhhpQ_r9Y59TZ8tU/edit#gid=767021684\n# example C\nskittle export https://docs.google.com/spreadsheets/d/1UVDRgs1w6fySZqJqEbEH1v7m1i0qhhpQ_r9Y59TZ8tU/edit#gid=1432994532\n```\n\n# Usage \n\n## Public Google Sheets\n\n```bash\nskittle export <URL>\n```\n\n## Private Google Sheets\n\nShare your Google Sheets document with the service account generated above (read-only is fine). Then run:\n\n```bash\nskittle export \"<spreadsheet>/<worksheet>\"\n```\n\nIf the Drive and Sheets APIs are not already enabled, there will be an error message with a link prompting you to enable them.\n\n## Local `.csv` file\n\n```bash\nskittle export layout.csv\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Lightweight design of plate-based experiments",
"version": "0.0.5",
"project_urls": {
"Bug Tracker": "https://github.com/feldman4/skittle-sheets/issues",
"Homepage": "https://github.com/feldman4/skittle-sheets"
},
"split_keywords": [
"lab",
"biology",
"plate",
"experimental design"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4401e5f6aa0cf5c27df4ff8ba11dd16eb0b96c6091d72e6c8ee4463c4bfd7ee5",
"md5": "dceeee99bbbc12f367d67c786ec3e8f1",
"sha256": "5e68022af68ddb39d2d9502d7d6db4f966503c90014884e930b51ee0a7d0b041"
},
"downloads": -1,
"filename": "skittle_sheets-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dceeee99bbbc12f367d67c786ec3e8f1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 8756,
"upload_time": "2024-01-01T03:25:06",
"upload_time_iso_8601": "2024-01-01T03:25:06.301754Z",
"url": "https://files.pythonhosted.org/packages/44/01/e5f6aa0cf5c27df4ff8ba11dd16eb0b96c6091d72e6c8ee4463c4bfd7ee5/skittle_sheets-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fd6262cd411df8f9417671b3c533e6852a7d5c6469c27286bece285389cacd74",
"md5": "411338267bf3fcda0bb85e3e159fa193",
"sha256": "7cd1babed5b1a4d60fb392835ad1fab776e3f2dd1b3d423b6abdd7d167b6091a"
},
"downloads": -1,
"filename": "skittle-sheets-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "411338267bf3fcda0bb85e3e159fa193",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 8292,
"upload_time": "2024-01-01T03:25:07",
"upload_time_iso_8601": "2024-01-01T03:25:07.989165Z",
"url": "https://files.pythonhosted.org/packages/fd/62/62cd411df8f9417671b3c533e6852a7d5c6469c27286bece285389cacd74/skittle-sheets-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-01 03:25:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "feldman4",
"github_project": "skittle-sheets",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "skittle-sheets"
}