Configure rclone - ULJ-Yale/qunexsdk GitHub Wiki
In order to upload / download data to the QuNex Sharepoint site, rclone needs to be installed and configured.
https://rclone.org/install
Install rclone:Configure QuNex Sharepoint site in rclone:
rclone config
e/n/d/r/c/s/q> n (for new remote)
Enter name for new remote.
name> Qunex_Sharepoint
Storage> onedrive
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id>
Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret>
Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
1 / Microsoft Cloud Global
\ (global)
2 / Microsoft Cloud for US Government
\ (us)
3 / Microsoft Cloud Germany
\ (de)
4 / Azure and Office 365 operated by Vnet Group in China
\ (cn)
region> 1
Edit advanced config?
y) Yes
n) No (default)
y/n> n
Use web browser to automatically authenticate rclone with remote?
* Say Y if the machine running rclone has a web browser you can use
* Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.
y) Yes (default)
n) No
y/n> n
Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
rclone authorize "onedrive"
Then paste the result.
Enter a value.
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
1 / OneDrive Personal or Business
\ (onedrive)
2 / Root Sharepoint site
\ (sharepoint)
/ Sharepoint site name or URL
3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
\ (url)
4 / Search for a Sharepoint site
\ (search)
5 / Type in driveID (advanced)
\ (driveid)
6 / Type in SiteID (advanced)
\ (siteid)
/ Sharepoint server-relative path (advanced)
7 | E.g. /teams/hr
\ (path)
config_type> 3
Option config_site_url.
Site URL
Example: "https://contoso.sharepoint.com/sites/mysite" or "mysite"
Enter a value.
config_site_url> https://yaleedu.sharepoint.com/sites/QuNex
Option config_driveid.
Select drive you want to use
Choose a number from below, or type in your own string value.
Press Enter for the default (b!tEk8SC34iU2P9VvxKBEq3bGMO9tPjZlJnybE9pWNf_0LU9WzIjddT5pX4WIoCCnq).
1 / Documents (documentLibrary)
\ (b!tEk8SC34iU2P9VvxKBEq3bGMO9tPjZlJnybE9pWNf_0LU9WzIjddT5pX4WIoCCnq)
config_driveid> 1
Drive OK?
Found drive "root" of type "documentLibrary"
URL: https://yaleedu.sharepoint.com/sites/QuNex/Shared%20Documents
y) Yes (default)
n) No
y/n>
Configuration complete.
New remote.
Name: Qunex_Sharepoint
Storage: onedrive
client_Id: blank (default)
client_secret: blank (default)
Region: 1
Advance config: n (default)
User browser: n if you’re on a server (headless)
Enter token.
Config type: 3
Site URL: https://yaleedu.sharepoint.com/sites/QuNex
config_driveid: 1
Drive okay: y (default)
rclone commands
List directories:
rclone lsd Qunex_Sharepoint:
List files:
rclone lsl Qunex_Sharepoint:
rclone lsl Qunex_Sharepoint:Container
Upload a file:
rclone copy --progress recipe.yaml Qunex_Sharepoint: