-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# onedrivemyway | ||
Code used to manage syncing a Windows 10 folder with oneDrive without adding the account to the oneDrive app. | ||
# oneDrive MyWay | ||
|
||
This repository is code I used to manage syncing a Windows 10 folder with oneDrive without adding the account to the oneDrive app. | ||
|
||
This method uses node.js (linked below) and the Microsoft Office 365 Command-Line Interface. I chose to install on a remote server without using a GUI. | ||
|
||
## Helpful Linkage | ||
|
||
[About Microsoft365R](https://blog.revolutionanalytics.com/2021/02/microsoft365r.html) | ||
|
||
[Install CLI guide](https://pnp.github.io/cli-microsoft365/user-guide/installing-cli/) | ||
|
||
[Install node.js](https://nodejs.org/en/) | ||
|
||
[Quick start guide](https://devblogs.microsoft.com/microsoft365dev/getting-started-office365-cli-powershell/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Microsoft 365 personal token | ||
# note: this is not a real token below, it will be hex | ||
microsoft365r_use_cli_app_id = abefc027egabb67a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Please note, this is taken from | ||
# https://cran.r-project.org/web/packages/Microsoft365R/vignettes/auth.html | ||
# Richard DeWald - 2022-05-02 | ||
|
||
library(Microsoft365R) | ||
od <- get_personal_onedrive() | ||
# odb <- get_business_onedrive() | ||
|
||
# list files and folders | ||
od$list_items() | ||
od$list_items("Documents") | ||
|
||
# upload and download files | ||
od$upload_file("somedata.xlsx") | ||
od$download_file("Documents/myfile.docx") | ||
|
||
# create a folder | ||
od$create_folder("Documents/code") | ||
|
||
# open a document for editing in Word Online | ||
od$open_item("Documents/myfile.docx") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: Default | ||
SaveWorkspace: Default | ||
AlwaysSaveHistory: Default | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: Sweave | ||
LaTeX: pdfLaTeX |