Announcing: easy Google Drive integration

35 views
Skip to first unread message

Ryan Kramer

unread,
May 2, 2021, 11:46:45 PM5/2/21
to TiddlyWikiDev
I have prototyped a simple webpage that allows you to load a TiddlyWiki from your Google Drive and save the changes back. Perhaps the TiddlyWiki project will be interested in hosting a more polished version at my.tiddlywiki.com (for example)?

I built this so I can use my wiki from any browser that has internet access, as long as I can remember my Google credentials.

How to Use It:
1. Create a fresh Google account if you don't trust me (and why should you?)
2. Create a folder named "asap.wiki" in the root of your Google Drive. (The name asap.wiki comes from an earlier idea of this project.)
3. Add exactly one TiddlyWiki file to the asap.wiki folder. It must be a new enough version of TiddlyWiki that includes the CustomSaver (added here https://github.com/Jermolene/TiddlyWiki5/pull/4908)
4. Browse to https://default-kramer.github.io/ and click the Authorize button. Continue past the "unverified app" warning.
5. The website should load the wiki from your Google Drive and display it in an iframe.
6. Make some changes and save your wiki.
7. Verify that the changes were written back to your Google Drive

Open Issues:
1. Obviously UI/UX is not my strong suit. Someone with more skill/experience than me could make this look and work a lot better.
2. If more than one wiki exists, it should prompt the user which one they want to open. (Right now it just fails.)
3. The app needs to be verified with Google. I think I am limited to 100 users right now because I am unverified.

Let me know if there is interest in making this an official TiddlyWiki offering and, if so, what I can do to help.

Mohammad Rahmani

unread,
May 3, 2021, 12:02:47 AM5/3/21
to tiddly...@googlegroups.com



On Mon, May 3, 2021 at 8:16 AM Ryan Kramer <default...@gmail.com> wrote:

Hi Ryan!

Nice stuff!


I have prototyped a simple webpage that allows you to load a TiddlyWiki from your Google Drive and save the changes back. Perhaps the TiddlyWiki project will be interested in hosting a more polished version at my.tiddlywiki.com (for example)?

I built this so I can use my wiki from any browser that has internet access, as long as I can remember my Google credentials.

How to Use It:
1. Create a fresh Google account if you don't trust me (and why should you?)
2. Create a folder named "asap.wiki" in the root of your Google Drive. (The name asap.wiki comes from an earlier idea of this project.)
3. Add exactly one TiddlyWiki file to the asap.wiki folder. It must be a new enough version of TiddlyWiki that includes the CustomSaver (added here https://github.com/Jermolene/TiddlyWiki5/pull/4908)
4. Browse to https://default-kramer.github.io/ and click the Authorize button. Continue past the "unverified app" warning.

I cannot see the button! Have you checked this?

 
5. The website should load the wiki from your Google Drive and display it in an iframe.
6. Make some changes and save your wiki.
7. Verify that the changes were written back to your Google Drive

Open Issues:
1. Obviously UI/UX is not my strong suit. Someone with more skill/experience than me could make this look and work a lot better.
2. If more than one wiki exists, it should prompt the user which one they want to open. (Right now it just fails.)
3. The app needs to be verified with Google. I think I am limited to 100 users right now because I am unverified.

Let me know if there is interest in making this an official TiddlyWiki offering and, if so, what I can do to help.

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/597ccec3-bac5-44c7-8258-b53048aca169n%40googlegroups.com.

Ryan Kramer

unread,
May 3, 2021, 12:19:25 AM5/3/21
to tiddly...@googlegroups.com
Hi Mohammad, can you let me know what browser and OS you are using? Also, can you open your browser's console (usually F12 does this), refresh the page, and send me the output?

Also, I didn't realize that this Google Group has been discontinued. Please continue the conversation on Github if possible: https://github.com/Jermolene/TiddlyWiki5/discussions/5660

You received this message because you are subscribed to a topic in the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywikidev/I6SVXGHSPIc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/CAAV1gMASN%2BgyGGraKiOjHZ5%2Bb-1iAHWJqQ5mgFp-rA6X03SCMA%40mail.gmail.com.

Mohammad Rahmani

unread,
May 3, 2021, 1:20:30 AM5/3/21
to tiddly...@googlegroups.com
Ryan

There was some issue on my side. I was behind a firewall!
No it works!

Tested on: Win10, Chrome 89 

Sidenote: why does it need such an access grant to drive (see/edit/delete/create evrythings images, ....)? It is a bit scary!


I will post later to GitHub!


Best wishes
Mohammad


Arlen Beiler

unread,
May 3, 2021, 11:17:21 AM5/3/21
to tiddlywikidev
Hey, looks pretty good. Just thought I'd add a few thoughts from my own experience with https://twcloud.github.io/.

The custom saver idea is interesting. Just thought I'd point out that TiddlyWiki already includes a saver which uses the DOM instead of JavaScript to handle the save sequence. 
It's fine to have two different methods, I just thought I'd point this one out as well. It's the one I use with TW Cloud. 


Any plans to add Dropbox? I've worked with the API in other projects and it's fairly straightforward. Pretty similar to the Google API. It also has an app folder option as demonstrated at https://twcloud.github.io/tw5-dropbox/

Most of these online cloud services have a feature that allows you to ask the user to select a single file for editing and then gives you a token to use to save the file. I know at least Dropbox does that and I think I've seen it on Google Drive. Also, Dropbox lets you use an App folder, which would work perfectly in your case. I'm surprised Drive doesn't have a similar feature. 

I won't ask you about enabling data folders because I already know they aren't even in the same ball park. Hopefully some day someone will figure that one out. 

Thanks for doing this.
Arlen



--

Ryan Kramer

unread,
May 3, 2021, 12:29:22 PM5/3/21
to tiddly...@googlegroups.com
Hi Arlen, nice work on twcloud! I'll try it out. As for Google Drive, it turns out a much better version already exists here https://tiddlydrive.github.io/ so I guess I wasted an afternoon. (Not really, because I had wanted to learn the Google Drive API anyway.)

I remember seeing the TiddlyFox saver but I guess I didn't realize how flexible it is. I wonder if I could have used it instead of adding the CustomSaver. When I created the CustomSaver I had a very different idea for the project based on AWS. But eventually I realized that was more work than I wanted to do and decided that Google Drive would be quick and easy.

You received this message because you are subscribed to a topic in the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywikidev/I6SVXGHSPIc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/CAJ1vdSSPR%2BRD%3DGYEL-9ziqt%2BNyDR6yx1uJi2cj_a9EU48GRPeA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages