Please help to refine this (working!) Google Drive backend

316 views
Skip to first unread message

Mat

unread,
Feb 8, 2021, 11:59:37 AM2/8/21
to TiddlyWiki
I want to bring attention to a post I made here in the dev group (because it goes beyond direct TW matters).

Briefly, it is possible to use the Google "Excel" spreadsheets as tiddlers.
So your empty (or half empty) TW fetches tiddlers from the spreadsheet.

This would open up for very useful stuff - both for individuals (assuming they have a google account) but also for the community at large.

For example, I think that if anyone puts up a public wiki with this functionality, then you can make that wiki show your spreadsheet tiddlers (by providing it with your spreadsheet-URL). This means that we can "publish" plugins etc by piggybacking on other public wikis (if they have this Google Drive solution installed)

Or you can, yourself, use e.g Google Forms to make questionnaires and have all the results appear in your own wiki. (This is foremost thanks to Googles automated "questionnaire-to-single-spreadsheet" feature.)

The incredible part is that fellow tiddleur Siniy-Kit has already created this! But he has it baked into a bigger project. So I need help to pick out the critical js parts and refine it. See the dev group discussion for further details.

<:-)

Ste

unread,
Feb 8, 2021, 12:31:39 PM2/8/21
to TiddlyWiki
Interesting times! Sounds likejit could open allot of functionality! 
Message has been deleted

Mat

unread,
Feb 9, 2021, 10:37:22 AM2/9/21
to TiddlyWiki
Of course I forgot to set edit rights. Now fixed.
<:-)

On Tuesday, February 9, 2021 at 4:14:38 PM UTC+1 Mat wrote:
So here is a working prototype. Actually it is Siniy-Kits webshop that I've clumsily repainted to appear more like a regular wiki so you can orient yourself. Not perfect. But, as noted, the big problem is that it still IS Siniy-Kits (fantastic) webshop. Only the small parts that extract "the JSON from the google sheet" are needed but I don't know JS so I can't extract them. (help!)

Anyway, try it out to see what the heck I'm twaddling about - see attachment.

This could enable many things: community voting, teachers could make tests and have the results in TW, a common plugin distribution system, present stock quotes in TW, and loads and loads more. Google does the horse work, TW just extracts the finished data and presents it.

Mark S.

unread,
Feb 9, 2021, 12:24:04 PM2/9/21
to TiddlyWiki
In my experience, most programmers would rather rewrite something rather than reverse engineer an existing product.

When I follow the code, I see that there is some type of call back. I'm guessing Google calls back to a function inside TW with the requested data. But, the only place I see where the results could manifest is in function ok -- but all that function does is check a ban list.  Which is also confusing. If the data in the spreadsheet is your own, why would your email be on a ban list ?? In any event, I don't see that the data is handed off anywhere to the rest of the tiddlywiki machinery. Do you know ?

 Have fun!

Mat

unread,
Feb 9, 2021, 1:36:59 PM2/9/21
to TiddlyWiki
@Mark , thanks for your input! I don't know how Siniy-Kits solution works other than vaguely understanding what he explains.  But it is worth noting that "all that is needed" is some mechanism in TW that can "pull in" a JSON webpage: Here is the regular Google sheet and here is its automatically generated JSON version. 

About a "ban list"; maybe the shop blocks people who have misbehaved?

<:-)


Mark S.

unread,
Feb 9, 2021, 2:26:02 PM2/9/21
to TiddlyWiki
All I see in the code he shows is making a single, empty tiddler. I'm missing how the data comes in.

Mat

unread,
Feb 9, 2021, 2:52:35 PM2/9/21
to TiddlyWiki
@Mark - I posted my own stumbling tracking attempts in the GH thread because it got too technical for this forum. Maybe I found exactly what you found?
Thank you for looking in to this!
<:-)

Mat

unread,
Feb 10, 2021, 6:48:43 AM2/10/21
to TiddlyWiki
I deleted previous post that contained the attached file because I have now updated it - try out the attached file here. Now it is basically a normal TW but it has leftover tiddlers from Siniy-Kits (incredible) shop. 

This could enable many things: community voting, teachers could make tests and have the results in TW, a common plugin distribution system, present stock quotes in TW, and loads and loads more. Google does the horse work, TW just extracts the finished data and presents it.

TiddlyGoo.html

Måns Mårtensson

unread,
Feb 15, 2021, 4:24:56 PM2/15/21
to tiddl...@googlegroups.com
Hi Mat

This looks like real magic to me :-)

Some years ago I made tiddler templates for csv data in google sheets collected from forms, to present the data better.

This example of yours is really close to be what I needed then - and my head starts hurting when I think of how this might help me and my colleagues today..

Very often we have to find our way in various spreadsheets and read several lines of comments presented in single cells...

I need to think of ways to automate import from Google spreadsheets, and get updates - into TW and have a way to write back to the spreadsheet from the TW..

This seems to be quite possible with your example. 

Thank you for reverse engineering the fabulous web shop - it looks very promising :-)

Cheers Måns

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/c2270d4b-1223-4b85-92d1-48885713ba64n%40googlegroups.com.

Mat

unread,
Feb 16, 2021, 2:58:30 PM2/16/21
to TiddlyWiki
@Måns

Great that you also see the potential in this. Google has really powerful stuff, and most of us are forced to use it anyhow, and this will piggyback on that.

I need to think of ways to automate import from Google spreadsheets, and get updates - into TW and have a way to write back to the spreadsheet from the TW..

Yes, half the thing is the fetching and the other half is the pushing back to sheets. We're currently working on the former. 

<:-)

Joshua Fontany

unread,
Feb 17, 2021, 6:28:22 PM2/17/21
to TiddlyWiki

Really interesting work here so far guys. I am most just scanning this thread, but I think you are doing some interesting "browser" work. It would be a lot "simpler" (ha) to have a TW node.js server doing the fetching and serving of the Google data. I am looking at the various online-hosted configs and going over the pros/cons to decide on one... I'll keep the Google Services backend in mind...

Keep going!

Best,
Joshua F
Reply all
Reply to author
Forward
0 new messages