Synthoid / ExportSheetData

Add-on for Google Sheets that allows sheets to be exported as JSON or XML.
MIT License
236 stars 46 forks source link

Can you add code for Exhibit? #99

Open dhinostroza opened 4 years ago

dhinostroza commented 4 years ago

Hi, I use http://projects.csail.mit.edu/exhibit/googleJSON/ to convert Sheets to JSON for Exhibit, but it's down now. Could you add this functionality (connect to live Google Sheets using a url) to your project? Kind regards, Daniel

Synthoid commented 4 years ago

From the sound of it, you are looking for a way to link to JSON data generated from a spreadsheet? Or are you trying to link to the spreadsheet itself? I can't tell exactly what that site is doing since it is down, but it looks like it is doing some URL adjustments to allow the sheet to be linked to and referenced as JSON, is that correct?

Assuming that is the desired behavior, it seems like that functionality was based on an older version of Google's APIs that is in the process of being deprecated / no longer supported. This means that the simple ?alt=json URL adjustment won't work long term.

A cursory glance through the Google Sheets API doesn't turn up any good solutions for this so I'm not sure if something as convenient can be done. You can always export your spreadsheet data to a JSON file then link to that file, but that isn't as useful when trying to access data directly instead of downloading the file. If I remember correctly, that's mostly difficult because plain text files are not directly referenced by the shared URL as it points to a wrapper for the text file's contents instead.

No estimate on the timeframe, but I'll keep this issue open and see if I can find a good solution.

dhinostroza commented 4 years ago

Hi Synthoid, I believe the googleJSON web page performs some URL adjustments so that Exhibit (https://www.simile-widgets.org/exhibit3/) can link via URLs to one or many Google Sheets and pull data in JSON format. That way you can perform updates on Google Sheets without having to worry about exporting to JSON anymore. If interested, I can share some working files with you. Best, Daniel

Synthoid commented 4 years ago

If you provide those examples, I can get a better understanding of what is expected there. I'm a little worried that URL adjustments are being phased out and won't be supported in the future, but it could just be an instance of Google not documenting everything their API can do.

dhinostroza commented 4 years ago

Hi Chris,

Sure. Here is an example.  This URL points to the original source information. https://www.igepn.edu.ec/mapas/mapa-catalogo-actual

I have attached an html page with its css.  The html links to a Google Spreadsheet (https://docs.google.com/spreadsheets/d/1ILn_Ywg8p8g19dMZi-6bqUqQOtxemryqZXSWpyR6lqc/edit#gid=120238821) which BabelJSON has converted to JSON (https://spreadsheets.google.com/feeds/list/1ILn_Ywg8p8g19dMZi-6bqUqQOtxemryqZXSWpyR6lqc/o1zl4xr/public/basic?hl=en_US&alt=json-in-script).

When Exhibit was in its infancy -and Google Docs was called Google Buzz-, the BabelJSON converter served two purposes: 1. Protect the original Google Spreadsheet URL.  2. Hide the contents of the converted table (copy-pasting the converted URL in the browser would bring nothing).

Hope you find this interesting. Have a great New Year!

Daniel

On 1/5/20 13:58, Chris wrote:

If you provide those examples, I can get a better understanding of what is expected there. I'm a little worried that URL adjustments are being phased out and won't be supported in the future, but it cwith ould just be an instance of Google not documenting everything their API can do.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Synthoid/ExportSheetData/issues/99?email_source=notifications&email_token=AEOTI5EHW3C5BEWRNIB2MWTQ4IUU7A5CNFSM4J75UFJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEID5C5A#issuecomment-570937716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEOTI5GOWZDBTP3N2MLDPRTQ4IUU7ANCNFSM4J75UFJQ.