r-lib / usethis

Set up commonly used 📦 components
https://usethis.r-lib.org/
Other
858 stars 286 forks source link

Helper for constructing links suitable for use_course() #406

Closed jennybc closed 4 years ago

jennybc commented 6 years ago

Provide more help (and a convenient place of docs) re: how to get "download" links for GitHub, DropBox, Google Drive.

If possible, also a way to make short links from usethis.

maelle commented 6 years ago

Maybe relevant, https://github.com/ottlngr/tinycc

jennybc commented 6 years ago

Relevant to RStudio folks, note that Rebrandly has an API: https://developers.rebrandly.com/docs

jennybc commented 5 years ago

Example: consider this GitHub repo

https://github.com/jennybc/explore-libraries

The correct use_course() call is

use_course("https://github.com/jennybc/explore-libraries/archive/master.zip")

It would be nicer to say `use_course("jennybc/explore-libraries"). This reduces the need to create short links.

cwickham commented 5 years ago

I'm going to work on this for tidy-dev-day, but if someone else at dev-day wants to help, I'd love to work together.

cwickham commented 5 years ago

OK, to not bite off too much at once, I'll focus on the github repo use case, use_course("jennybc/explore-libraries"). Essentially turning the recommendations about URLs for Github (and Dropbox?) in ?use_course_details into things that happen automatically.

API questions for @jennybc , how should this work from a user's perspective:

Either way, we need to keep mind how to generalise to other common sources, i.e. Dropbox.

cwickham commented 5 years ago

Answers based on in-person discussion: