{"id":13857866,"url":"https://github.com/karthik/rdrop2","last_synced_at":"2025-05-16T16:08:29.802Z","repository":{"id":29661120,"uuid":"33203085","full_name":"karthik/rdrop2","owner":"karthik","description":"Dropbox Interface from R","archived":false,"fork":false,"pushed_at":"2024-03-25T18:44:02.000Z","size":1273,"stargazers_count":253,"open_issues_count":72,"forks_count":60,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-12T14:57:24.749Z","etag":null,"topics":["data-storage","dropbox-interface","r"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karthik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-31T18:42:24.000Z","updated_at":"2024-12-18T09:28:43.000Z","dependencies_parsed_at":"2024-03-25T19:46:42.843Z","dependency_job_id":"3e14dfad-e9f8-405a-af2f-72f39a92a1c0","html_url":"https://github.com/karthik/rdrop2","commit_stats":{"total_commits":411,"total_committers":12,"mean_commits":34.25,"dds":"0.12408759124087587","last_synced_commit":"81bedd2f0fbd0ee55dd163230c1a0b26a80162cc"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthik%2Frdrop2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthik%2Frdrop2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthik%2Frdrop2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karthik%2Frdrop2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karthik","download_url":"https://codeload.github.com/karthik/rdrop2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254564127,"owners_count":22092122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-storage","dropbox-interface","r"],"created_at":"2024-08-05T03:01:49.165Z","updated_at":"2025-05-16T16:08:29.782Z","avatar_url":"https://github.com/karthik.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# rdrop2 - Dropbox interface from R  ![a_box](docs/rdrop2-logo.png)  \n\n\n\n# 🚨🚨🚨 Call for maintainers 🚨🚨🚨\n\nThe package is currently not maintained and up for adoption. If you are interested in taking over as maintainer, please send an email to karthik.ram@gmail.com. \n\nIf we can't find another maintainer before something breaks on CRAN, the package will be archived. 🙏\n🚨🚨🚨\n\n\n---\n\n\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)\n [![Build Status](https://travis-ci.org/karthik/rdrop2.svg)](https://travis-ci.org/karthik/rdrop2)  [![Coverage Status](https://coveralls.io./repos/karthik/rdrop2/badge.svg)](https://coveralls.io/r/karthik/rdrop2) [![](http://cranlogs.r-pkg.org/badges/rdrop2)](http://cran.rstudio.com/web/packages/rdrop2/index.html)  [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/rdrop2)](http://cran.r-project.org/web/packages/rdrop2) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.998912.svg)](https://doi.org/10.5281/zenodo.998912)\n\n__Maintainers:__ Karthik Ram (@karthik) and Clayton Yochum (@ClaytonJY)\n\n\nThis package provides programmatic access to Dropbox from R. The functions in this package provide access to a full suite of file operations, including dir/copy/move/delete operations, account information and the ability to upload and download files from any Dropbox account.  \n\n\n### Installation  \n\n\n```\n# Current CRAN version (0.8.1)\ninstall.packages('rdrop2')\n\n# or the development version (0.8.1.9999)\ndevtools::install_github(\"karthik/rdrop2\")\n```\n\n### Authentication\n\n```r\nlibrary(rdrop2)\ndrop_auth()\n# This will launch your browser and request access to your Dropbox account. You will be prompted to log in if you aren't already logged in.\n# Once completed, close your browser window and return to R to complete authentication. \n# The credentials are automatically cached (you can prevent this) for future use.\n\n# If you wish to save the tokens, for local/remote use\n\ntoken \u003c- drop_auth()\nsaveRDS(token, file = \"token.rds\")\n\n# Then in any drop_* function, pass `dtoken = token\n# Tokens are valid until revoked.\n\n```\n\n#### Retrieve Dropbox account information\n\n```r\nlibrary(dplyr)\ndrop_acc() %\u003e% data.frame()\n# Returns the following fields\n# [1] \"account_id\"            \"name.given_name\"      \n#  [3] \"name.surname\"          \"name.familiar_name\"   \n#  [5] \"name.display_name\"     \"name.abbreviated_name\"\n#  [7] \"email\"                 \"email_verified\"       \n#  [9] \"disabled\"              \"country\"              \n# [11] \"locale\"                \"referral_link\"        \n# [13] \"is_paired\"             \".tag\"        \n```\n\n#### Dropbox directory listing\n\n```r\nwrite.csv(mtcars, \"mtcars.csv\")\ndrop_upload(\"mtcars.csv\")\ndrop_dir()\n# If your account is not empty, it returns the following fields\n#  [1] \".tag\"            \"name\"            \"path_lower\"     \n#  [4] \"path_display\"    \"id\"              \"client_modified\"\n#  [7] \"server_modified\" \"rev\"             \"size\"           \n# [10] \"content_hash\"   \n#\n# \n# or specify a path\ndrop_dir('public/gifs')\n```\n\n|.tag |name       |path_lower  |path_display |id                        |client_modified      |server_modified      |rev          | size|content_hash                                                     |\n|:----|:----------|:-----------|:------------|:-------------------------|:--------------------|:--------------------|:------------|----:|:----------------------------------------------------------------|\n|file |mtcars.csv |/mtcars.csv |/mtcars.csv  |id:b-ac9BwzYUAAAAAAAAAxFQ |2017-09-27T16:21:56Z |2017-09-27T16:21:57Z |691634207848 | 1783|8c00dcec5f3e6bf58a42dcf354f0d5199a43567e88a9d80291bd2b85f53a54a5 |\n\n#### Filter directory listing by object type (file/folder)\n\n```r\ndrop_dir() %\u003e% \n    filter(.tag == \"folder\")\n```\n\n#### Create folders on Dropbox\n\n\n```r\ndrop_create('drop_test')\n# or provide the full path where it needs to be created\ndrop_create('public/drop_test')\n```\n\n#### Upload a file into Dropbox\n\n__csv files__  \n```r\nwrite.csv(mtcars, 'mtcars.csv')\ndrop_upload('mtcars.csv')\n# or upload to a specific folder\ndrop_upload('mtcars.csv', path = \"drop_test\")\n```\n\nYou can also do this for any other file type and large files are supported regardless of your memory.\n\n\n#### Download a file\n\n```r\ndrop_download('mtcars.csv')\n# or add path if file is not in root\ndrop_download(\"test_folder/mtcars.csv\")\n```\n\n#### Delete a file\n\n```r\ndrop_delete('mtcars.csv')\n```\n\n#### Move files\n\n```r\ndrop_create(\"new_folder\")\ndrop_move(\"mtcars.csv\", \"new_folder/mtcars.csv\")\n```\n\n__Copy files__\n\n```r\ndrop_create(\"new_folder2\")\ndrop_copy(\"new_folder/mtcars.csv\", \"new_folder2/mtcars.csv\")\n```\n\n\n#### Search and download files\n\nI frequently use a duck season rabbit season gif. This is how I could search and download from my public Dropbox account. \n\n```r\nx \u003c- drop_search(\"rabbit\")\ndrop_download(x$matches[[1]]$metadata$path_lower, local_path = '~/Desktop/bugs.gif')\n\n# Downloaded /public/gifs/duck_rabbit.gif to ~/Desktop/bugs.gif: 329.2 Kb on disk\n```\n\n####  Read csv files directly from Dropbox\n\n```r\nwrite.csv(iris, file = \"iris.csv\")\ndrop_upload(\"iris.csv\")\n# Now let's read this back into an R session\n# Note that there is a quiet download happening to your temp dir\nnew_iris \u003c- drop_read_csv(\"iris.csv\")\n```\n\n#### Accessing Dropbox on Shiny and remote servers\n\nIf you expect to access a Dropbox account via Shiny or on a remote cluster, EC2, Digital Ocean etc, you can leave the cached `oauth` file in the same directory, or pass the `token` explicitly to `drop_auth`. You can also save the output of `drop_auth` into an R object, sink that to disk, and pass that as a token. If using on Travis or similar, you should consider [encrypting the oauth cache file](http://docs.travis-ci.com/user/encrypting-files/) to prevent unauthorized access to your Dropbox account. If you have multiple tokens and accounts, it is also possible to override the environment token and explicitly pass a specific token for each `drop_` function.\n\n```r\ntoken \u003c- drop_auth()\nsaveRDS(token, \"droptoken.rds\")\n# Upload droptoken to your server\n# ******** WARNING ********\n# Losing this file will give anyone \n# complete control of your Dropbox account\n# You can then revoke the rdrop2 app from your\n# dropbox account and start over.\n# ******** WARNING ********\n# read it back with readRDS\ntoken \u003c- readRDS(\"droptoken.rds\")\n# Then pass the token to each drop_ function\ndrop_acc(dtoken = token)\n```\n\n\n__Meta__\n\n* Please note that this project is released with a [Contributor Code of Conduct](CONDUCT.md). By participating in this project you agree to abide by its terms.\n\n* For bug reports and known problems, please look over the [issues](https://github.com/karthik/rdrop2/issues) before filing a new report.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarthik%2Frdrop2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarthik%2Frdrop2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarthik%2Frdrop2/lists"}