A tool to manipulate Google Spreadsheets
Project description
Command Line Tool To Manipulate Google Spreadsheets
The spreadsheet tool is a command line tool to manipulate Google spreadsheets. It specifically works on spreadsheets where row 1 is a series of column titles and there is one or more columns that can act as a unique key.
When running it it will create three config files in the current directory:
.app.json: Configuration file with the app configuration. By default these are anonymous, but if you have Google Apps for your domain, you might want to set these. TODO: Explain how and provide urls to Google help docs and the app admin panel for this. (console: https://code.google.com/apis/console ; docs: ?)
.auth.json: These store your auth credentials. The spreadsheet tool will manipulate these.
.ss.json: This records the spreadsheet and worksheet you chose as well as any infor the spreadsheet tool has cached.
If these need info from you, you will be prompted.
Commands
All references to “column” mean the title of the column.
spreadsheet app_conf “consumer_key” “consumer_secret” “google_apps_domain” spreadsheet list “key column” spreadsheet update “key column” key “value column” value spreadsheet remember headers spreadsheet remember “column” spreadsheet forget headers spreadsheet forget “column”
Dependencies
Depends on the following modules: gdata, json, gflags.
Contributions
Contributions are welcome!
Unit tests are kind of difficult since I haven’t found a good mock spreadsheet.
The packaged version is available via pip or easy_install as spreadsheet. The project page is on pypi:
The source code is available in the following locations:
Bitbucket: https://bitbucket.org/lyda/spreadsheet/
code.google: https://code.google.com/p/spreadsheet-cl/
Gitorious: https://gitorious.org/uu/spreadsheet
Sourceforge: https://sourceforge.net/p/spreadsheet-cl
Pull requests on any of those platforms or emailed patches are fine. Opening issues on github is easiest, but I’ll check any of them.
TODO
Authentication
Currently authentication redirects to a local url. Document that url and give the user the option to change it.
Likewise, it currently listens on localhost and a dynamically chosen port. Provide a way to supply that.
Might also print the url the browser will redirect to.
Clean up how the auth token is found by the listener.
Have the listener display a page saying auth success.
Testing and API
Some unit tests of some sort.
Ideas for mocking gdata?
Is issue580 fixed yet? If so remove the str() calls for GetCells parameters.
Code layout - split things into modules so it’s not one monlithic script now that there’s an install process.
Features and hardening
A way to add rows. And a way to delete them.
Finish allowing users to specify the title row number.
A command similar to update that allows users to specify the row/column directly.
Have caching be more seemless. When using cache, do sanity checks to make sure it’s correct (check the search column and the header) and then recache if it’s a miss. Keep the forget/remember commands in case the user knows the caches are wrong and can use these to tell us ahead of time.
Handle a bunch of possible exceptions in the gdata API.
Do command parsing better.
Credits
Kevin Lyda: Spreadsheets are fine once I can script them…
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file spreadsheet-1.2.1.tar.gz
.
File metadata
- Download URL: spreadsheet-1.2.1.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f555877f7fb9e4d013a3f3d50fdfcb9a4ee6ba2252e5ae6b7092ba38091dd69 |
|
MD5 | 17617d624a1603d79c65c7aedcc8f849 |
|
BLAKE2b-256 | 4fbcb570af86c48e71cd4692fa8f482d686c63e82e8a9238840e6296d0fd5386 |