Skip to content

Commit

Permalink
initial code commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rdewald committed Feb 5, 2022
1 parent eb9d70e commit 90febca
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
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/)

3 changes: 3 additions & 0 deletions Renviron_example.txt
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
21 changes: 21 additions & 0 deletions get_started.R
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")
13 changes: 13 additions & 0 deletions onedrivemyway.Rproj
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

0 comments on commit 90febca

Please sign in to comment.