-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
75 lines (54 loc) · 4.26 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
[![Travis-CI Build Status](https://travis-ci.org/coatless/dropcli.svg?branch=master)](https://travis-ci.org/coatless/dropcli)[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/dropcli)](https://cran.r-project.org/package=dropcli)
# `dropcli` - Dropbox CLI support for Linux Machines
The objective of this package is to provide Command Line Interface (CLI) support
within *R* for the Linux version of Dropbox.
The CLI is provided by Dropbox's [dropbox.py interface](https://www.dropbox.com/en/help/9192) that is only available on Linux. For details, please see [No support for CLI exists on OS X or Windows](http://superuser.com/questions/678925/using-dropbox-from-the-command-line-on-osx).
As a result, all commands are run through:
```{r dropbox_call, eval = FALSE, engine='bash'}
~/dropbox.py <command> <options>
```
Please **note** this package is a work in progress (WIP) and is *not* suitable
for production use or teaching without knowing what is going on. To help,
a vignette was written and is available here: <https://github.com/coatless/dropcli/blob/master/vignettes/using_dropcli.Rmd>
If you need a package for multiple platforms, please see the [rdrop2](https://github.com/karthik/rdrop2) by [Karthik Ram](https://github.com/karthik/). This package uses Dropbox's WebAPI via OAuth
instead of an operating system specific package. The downside to this approach
is the user *must* initiate the push instead of having a background process take care
of it.
# Dropbox CLI Commands
The commands available via the Dropbox CLI are as follows:
| Command | Description | `dropcli` Functions |
|------------|--------------------------------------------------------------|------------------------|
| status | get current status of the dropboxd | `dropbox_status()` |
| throttle | set bandwidth limits for Dropbox | **MIA** |
| help | provide help |`dropbox_help(topic)` |
| puburl | get public url of a file in your dropbox's public folder |`dropbox_puburl(fp)` |
| stop | stop dropboxd |`dropbox_stop()` |
| running | return whether dropbox is running |`dropbox_running()` |
| start | start dropboxd |`dropbox_start()` |
| filestatus | get current sync status of one or more files |`dropbox_filestatus()` |
| ls | list directory contents with current sync status | **MIA** |
| autostart | automatically start dropbox at login |`dropbox_autostart()` |
| exclude | ignores/excludes a directory from syncing | **MIA** |
| lansync | enables or disables LAN sync | **MIA** |
| sharelink | get a shared link for a file in your dropbox | `dropbox_sharelink(fp)`|
| proxy | set proxy settings for Dropbox | **MIA** |
# Acknowledgement
The seemingly rapid development of this interface was inspired by [Michael Levy's UseR2016 Talk](http://michaellevy.name/blog/useR-talk-on-teaching-R/) ([See the part at 7:20](https://channel9.msdn.com/Events/useR-international-R-User-conference/useR2016/Teaching-R-to-200-people-in-a-week#time=07m20s)) that details live code piping from the instructor's computer.
The idea presented was very straightforward: **Provide students with a
direct link to the code file that updates upon every save done by the instructor.**
The proposed approach alleviated my concerns for students not being able to:
1. See the code being typed during [STAT 385 @ UIUC](http://stat385.thecoatlessprofessor.com/);
2. Type code sufficiently fast;
3. Avoid sitting five feet from me while checking their thousands of [Pokemon Go](http://www.pokemon.com/us/pokemon-video-games/pokemon-go/) notifications
The rest is history...