Skip to content

Commit

Permalink
major update
Browse files Browse the repository at this point in the history
  • Loading branch information
usmanmughalji committed Sep 24, 2022
1 parent f64d873 commit 29b5133
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 51 deletions.
136 changes: 85 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,89 @@
# Update

- Compiled with latest go (1.16.4)
- Compiled Date: 24-05-2021
- Added approved Google API huge thanks to this man https://github.com/ParveenBhadooOfficial for providing approved api.


# About This Tool

Gdrive is a command line utility for interacting with Google Drive.

This is orginally project by https://github.com/gdrive-org/gdrive check this out for more information about this cli based tool.

That tool which i have uploaded and using it's from https://github.com/petrpulc/gdrive/ because this user added the support of Shared Team Drive.

For using this tool on other platforms visit below link.

https://drive.google.com/drive/folders/12GSQhLLdKDdKzq_a-7WOrip5HnFmm1v9


# Follow Steps To Use This Tool


git clone https://github.com/usmanmughalji/gdriveupload

### Overview
gdrive is a command line utility for interacting with Google Drive. Based on [gdrive](https://github.com/prasmussen/gdrive)

### Installation
- Download the latest gdrive binary file according to your **Architecture / OS** from [Here](https://github.com/usmanmughalji/gdriveupload/releases)
- Rename file first:
- Example: **gdrive-linux-x64** to **gdrive**
```
mv gdrive-linux-x64 gdrive
```
- Add permission to the file:
```
chmod +x gdrive

```
- Install in following folder:
- **Note:** sudo is not necessary, but if you feel it's required for your **os**, then you should use it.
```
sudo install gdrive /usr/local/bin/gdrive

```
- Run the following command to authenticate with your **Google Drive / Team Drive** account:
```
gdrive list

Than do authenication by clicking on link and enter code

-p means parent directory

# For Uploading to Shared Team Drive

gdrive upload -p File ID Of Shared Drive or Folder ID ./image.png

Example

gdrive upload -p 0AAlxxxxxxxxxxxxx ./image.png

# For Uploading Directly to G-Drive

gdrive upload ./file.txt

# For Uploading to G-Drive Directory

gdrive upload -p 0AAlxxxxxxxxxxxxx ./file.txt

# Only For ROM Developers

```
### To Uninstall / Remove any Previous Version
- For current version (**Latest**):
- Removing file:
```
sudo rm -rf /usr/local/bin/gdrive
```
- Locating token file, follow:
```
ls -a ~
cd ~
cd .config
cd gdrive
or
cd ~/.config/gdrive/
```
- Removing token file:
```
rm -rf ~/.config/gdrive/token_v2.json
```
- For previous version (**Old**):
- Removing file:
```
sudo rm -rf /usr/local/bin/gdrive
```
- Locating token file, follow:
```
ls -a ~
cd ~
cd .gdrive
or
cd ~/.gdrive/
```
- Removing token file:
```
rm -rf ~/.gdrive/token_v2.json
```
### Usage
- Recommended to use the **```gdrive help```** command to learn more about the tool and to use it properly.
- To upload a file directly to the root of the drive:
```
gdrive upload "file.zip"
```
- To upload a single file to a specific folder or directory:
- **Note:** Below commands works for both **gdrive** and **team-drive** as well
```
gdrive upload -p 0ABCA123456789 "file.zip"
```
- To upload a whole folder or directory:
```
gdrive upload -r -p 0ABCA123456789 "folder-name"
```
### For ROM Developers
```
wget https://raw.githubusercontent.com/usmanmughalji/gdriveupload/master/gdrive && chmod +x gdrive && sudo install gdrive /usr/local/bin/gdrive && gdrive list

```
### Notes:
- I don't own the code or the tool, and I am thankful to all the developers and contributors who have made this wonderful tool.
- In the repository, I have uploaded the **gdrive-linux-x64** which is rename to gdrive.
- If you want to read about the documentation of the tool completely, please visit their [official repository](https://github.com/prasmussen/gdrive).
- I am using the following [source code](https://github.com/msfjarvis/gdrive) for compiling the binaries.
- I am thankful to [hashhackers](https://t.me/HashHackers) and their team, which always bring the best quality of services to their users.

### Credits
- [prasmussen](https://github.com/prasmussen)
- [msfjarvis](https://github.com/msfjarvis)
- [API](https://gitlab.com/GoogleDriveIndex/Google-Drive-Index)
22 changes: 22 additions & 0 deletions changelogs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#### 24-August-2022
- gdrive: publish new stable version
- go.mod: update dependencies
- Add support for OAuth callback flow
#### 01-June-2022
- gdrive: publish new stable version
- go.mod: update dependencies
- allow user specified oauth credentials
- util: move token file to $XDG_CONFIG_HOME
- all: reformat with goimports
- shell.nix: add nix-shell config
#### 04-April-2022
- gdrive: remove redundant slice type
- go.mod: fix go-gitignore requirement again
- drive: add missing formatting arguments
- State support for team drives
- handlers_drive: remove invalid credentials and source at build time
- Switch to Go modules
- Return Unlimited when size is negative
- Dont download data if file is skipped
- Fix about output for unlimited drive accounts
- Use exponential back off for gdrive download and gdrive download query
Binary file modified gdrive
Binary file not shown.

0 comments on commit 29b5133

Please sign in to comment.