A gem for importing, exporting, and creating new Google Apps Scripts from/to your Google Drive
- Clone this repo
- Add your client_secrets.json file to the folder. Instructions are here: https://code.google.com/p/google-apps-manager/wiki/CreatingClientSecretsFile
- To avoid having an invalid_client error:
- Go here
- Click on project name
- Go to "APIs & auth" -> "Consent screen".
- Write a project name and select your email address
bundle install
rake install
- Optional: if you want to create new files, you will also need an API key for server applications:
- You can get this from the Console > APIs & auth > Credentials > Public API Access
- Select "Create New Key", choose "Server Key", select "Create"
- Set the API key as an ENV variable
- On your terminal:
export GAS_API_KEY=YOUR_API_KEY
- On your terminal:
- Note that Google will rename this as "Untitled". If you wish to have your own project name, we suggest creating an empty project file and uploading to that project file id.
gas-pump <command> [<arg>]
Commands:
- list -- lists the Google Apps Scripts projects on your Google Drive
- download <PROJECT_ID> -- downloads the project
- upload <PROJECT_ID> -- uploads local changes to the project
- create <FOLDER_NAME> -- creates the project
- Fork it ( https://github.com/[my-github-username]/gas-pump/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request