brownplt / code.pyret.org

Website for serving Pyret to folks.
Other
24 stars 45 forks source link

Allow full GDrive links instead of file/folderID #392

Open jpolitz opened 3 years ago

jpolitz commented 3 years ago

Right now, you have to figure out exactly which bit of the URL is the ID to use for importing spreadsheets.

We should have a load-spreadsheet that takes a full GDrive URL and parses it to get the ID.

schanzer commented 1 year ago

@jpolitz @ds26gte I've made this a more general request, since there are other places where we want a fileID or folderID -- and ideally none of them should 100% rely on a user carefully selecting only the ID when they copy/paste

jpolitz commented 1 year ago

Just wanted to comment that I tried this out today and, at least for spreadsheets, the full URL is currently accepted, and in fact the Bootstrap starter code already does it!

(CC @shriram since we talked about this today)

image

I'm happy leaving the issue open for other kinds of links (specifically for contexts/import for gdrive), but this is not an issue with spreadsheets

jpolitz commented 1 year ago

(You can even kind of tell the regex they use; if you edit the URL prefix it fails but it can have any suffix :-))

image

shriram commented 1 year ago

Wow, okay, LOL. So the old version will continue to work, but the full URL also works? This is best.

Can you please update the docs?

jpolitz commented 1 year ago

Yup, and plain ID works too, checked and updated (https://github.com/brownplt/pyret-docs/commit/6d85789a995abf8f6375cc7516406987315972d1)

schanzer commented 1 year ago

Oooh! Does this mean I can rip out the code that handles this in the Data Science context? Or is there a merge that needs to happen on CPO first?

jpolitz commented 1 year ago

Oh let me double-check before you do that. I thought that load-spreadsheet was the load-spreadsheet.