Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oliverswitzer/google_drive_uploader
An elixir utility to help upload files to google drive in bulk
https://github.com/oliverswitzer/google_drive_uploader
Last synced: 10 days ago
JSON representation
An elixir utility to help upload files to google drive in bulk
- Host: GitHub
- URL: https://github.com/oliverswitzer/google_drive_uploader
- Owner: oliverswitzer
- Created: 2023-09-30T06:43:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-03T22:32:50.000Z (about 1 year ago)
- Last Synced: 2024-04-14T11:53:14.748Z (7 months ago)
- Language: Elixir
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GoogleDriveUploader
An elixir utility to help me upload files to google drive in bulk
## Setup
1. Copy .envrc.sample to .envrc, fill out values. Client secret and client ID should be taken from an OAuth configuration you need to set up.
2. Copy service account key `client-secret.json` into top level of directory. This is used by goth.
3. Run `mix google_apis.auth https://www.googleapis.com/auth/drive` to retrieve your access token (will take you through oauth flow)
3b. Copy verification code from the `code` param in the redirect URL and paste it into the CLI prompt.
3c. Copy the access token value that you are then given.
4. `iex -S mix````
conn = GoogleApi.Drive.V3.Connection.new(){:ok, %_{files: files}} = GoogleApi.Drive.V3.Api.Files.drive_files_list(conn)
files |> Enum.map(&(Map.get(&1, :name)))
```