Replies: 73 comments 176 replies
-
Here is a tiddler Siniy-Kit has in his Controlpanel (7'th tab) to - if I understand right - convert the sheet URL into a JSON URL. Because it is in Russian I have manually replaced google translated parts:
|
Beta Was this translation helpful? Give feedback.
-
OK, here is a demo where I've remade a lot of optics so you'll recognize it as a TW, for testing stuff. Github doesn't accept attaching html files but it does accept zip files. Fill in the iframed form or the iframed table... and click to import... and what you just filled in becomes as tiddlers! This should be very useful. If someone knows how to extract the used js stuff. It is not much, from what I understand. |
Beta Was this translation helpful? Give feedback.
-
Here is my tracking: So the import button sends the message
I find the
The The
|
Beta Was this translation helpful? Give feedback.
-
A few thoughts that might be informative, since I've worked with Google Sheets in this manner elsewhere:
|
Beta Was this translation helpful? Give feedback.
-
After a lot of cleansing I have updated the file. It still has a lot of Siniy-Kits original shop stuff but now it basically behaves like a regular TW and it is much easier to investigate stuff. TiddlyGoo.zip - updated this in post at: see "edited" feature here in post. |
Beta Was this translation helpful? Give feedback.
-
By the way, anybody know Siniy-Kit's gh nick? I tried asking him via the google forum but I don't think it was noted. |
Beta Was this translation helpful? Give feedback.
-
Possibly. But I think the current behaviour is probably the way it should behave - as long as it's expected/known. A case of documentation/education ahead of time. But if that were to happen unknowingly, that could be pretty painful. The other possibility is to create indexed tiddlers (tiddler-1, tiddler-2) - not a huge fan of that, myself, but would avoid the issue. |
Beta Was this translation helpful? Give feedback.
-
This version resets (deletes) shadow tiddler |
Beta Was this translation helpful? Give feedback.
-
This version took Mat's version and made changes to bootprefix1.js (which really needs a better name.)
Observations. If you don't specify a column name, GS makes up a name. That's where those odd field names are coming from. The JSON structure you get if you follow the directions on the import page is different from the JSONP structure that the program sees. The big difference is that the JSONP doesn't give you row/column information -- just "column" in the indirect form of a field name. Thus, we can't make sensible default names based on column/rows, in case anyone was wondering. Solution: Always specify a column (field) title. The load process generates 3 tiddlers on the fly:
The question is whether these retain any value now? Do we still need a timestamp field? |
Beta Was this translation helpful? Give feedback.
-
We're getting really close!
AFAICT these are currently the only tiddlers needed for a TiddlyGoo plugin :
Am I missing some necessary component? There's also:
Would anything else "programmatic" (as opposed to e.g docs) be useful in the plugin? I note @Marxsal writes:
That's probably a good functionality to keep, right? But maybe the made up name could be friendlier like field-1, field-2, etc? So tiddlywikians feel at home.
So are you saying that tiddler titles cannot be auto generated from row+col, like the other column/fields can? For example, it is not possible to get a title to be, say, B3 (i.e the sheet cell name)?
For a minimal plugin, yes, I think they should be eliminated. But then, it would make sense with some equivalent to TW's
Actually, maybe this could be used as fallback tiddler title? If the time is down to milliseconds I guess it is unique. The format is currently |
Beta Was this translation helpful? Give feedback.
-
@Marxsal I suggest using that file form last post, i.e TiddlyGooMarx5.zip (I made TiddlyGooMarx8.zip using my naive cutting approach before realizing better leve it to someone who understands more, but the file does work.) |
Beta Was this translation helpful? Give feedback.
-
If we're thinking of sharing plugins via spreadsheets, we may have to come up with some clever way to split the text of a plugin. Apparently there is a 50k character limit per cell. That's kind of low. Tiddler Commander, for instance, requires more than twice this capacity. Hmm. The same would apply to tiddlers that contain book chapters. Maybe some convention that fields text, text1,text2... are to be combined as one tiddler text field. |
Beta Was this translation helpful? Give feedback.
-
OK, so it is necessary in the plugin.
What "submit"? In SK's shop the user could submit their order (is this what you refer to?) but I don't know how this was dealt with, i.e if it went into a spreadsheet. Is that what you refer to as "the submit"? ...cos you're not referring to the Google Form that I set up, right? (to the left of the sheet in the wiki. The interaction between the google form and the google sheet is totally outside of our code, of course. Apropos submitting things, I did ask SK if modifying a tiddler also could update the spreadsheet, to which he replied:
That would certainly be something!
Of course. Now it is just about refining the thing and make a plugin.
Ah, yes, the google form that I set up does create a timestamp.
Yes, that'd be very useful. I assume it would still be a problem if there are multiple rows without titles. Then they overwrite eachother so there's only one "Default" in the end. Maybe there's some code in there that also adds a counter? I do see some "counting type loops" but I don't know what they're used for.
Good idea. To collect all these ideas that have popped up here, I'll make another google form and note them down, and share it. OK, so today I hope to package the few necessary tiddlers into the first version of a TiddlyGoo plugin. If not today, then Tues/Wednesday. The latest version I have, before I started cutting out functions and variables that I deemed unused and then regretting it, is TiddlyGooMarx5.zip. If anyone submits something improved, I'll use that instead. |
Beta Was this translation helpful? Give feedback.
-
Sorry, been off doing other things...
Potentially worse, if you don't "police" your imports, you end up with "dark matter" in your TW. The columns are visible in the sheet, far less so in TW fields. |
Beta Was this translation helpful? Give feedback.
-
Here's a version that adds a default title and makes an import tiddler called Googlesheets import report listing tiddlers and unique set of fields. Nothing slick. I haven't researched the remaining functions in Googlesheets.js. Most of them are small, so that's ok. But there's one that called "stickmenu" that I don't know what it does. And somewhere in there the code is checking for a function called "Swiper" which I don't think is needed, but since it possibly sets a timeout I'm ignoring it for the moment. |
Beta Was this translation helpful? Give feedback.
-
Updated, see overwrites. I am now happy with the styling and the docs. Other than what's mentioned here above I don't expect to update this more. |
Beta Was this translation helpful? Give feedback.
-
v020
|
Beta Was this translation helpful? Give feedback.
-
@Marxsal - whoops! I had completely missed that you posted an update! Looking into v20 right now. @ludwa6 - frankly, you're disturbing us. Don't use this. |
Beta Was this translation helpful? Give feedback.
-
@Marxsal - it seems you missed to insert ...readme_use |
Beta Was this translation helpful? Give feedback.
-
Oops -guess i missed the memo on that one, @Marxsal, i hadn't renamed the "id" column on gSheet to "title".
Now i have done.. And YES it does name the tiddlers correctly per each record in that renamed column.
Question tho: What about the Spreadsheet name? Right now i'm working with a 3-tab gSheet called "SpreadsheetTiddler 1"... But when i start pulling different sheets into the same wiki, that could get awkward. Can the importer not pick up the hame of the gSheet (as it did in some early version, IIRC)? /w
On March 5, 2021 at 5:05 PM, Marxsal <[email protected]> wrote:
same problem with import overwriting my gSheet assigned tiddler names with the generic "NewTiddler n" name -which problem i never had in the last several days of using each successive version as it appeared. :-(
Did you remember to rename your "id" field to "title" ? Eventually we should make it possible to select your key field, but for the moment it needs to match TiddlyWiki, which uses the "title" field as the key field.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
@Marxsal , some very positive reports. In the demo spreadsheet I added three new sheets with some limited challenges - they all work:
In summary: Extremely promising. Regarding the forbidden tiddler title characters, is there a way to manipulate these? Is there perhaps a direct slugify command in JS? |
Beta Was this translation helpful? Give feedback.
-
I didn't test for the odd-ball sheet tab names, but I did change the code I thought was responsible. |
Beta Was this translation helpful? Give feedback.
-
Here's where it's deployed: |
Beta Was this translation helpful? Give feedback.
-
@Marxsal - what remains to be done before official announcement, in your opinion? |
Beta Was this translation helpful? Give feedback.
-
Strangely, the pill at https://marxsal.github.io/TiddlyGoo/ is not droppable into another Chrome tab!? It looks like it can be dragged but not dropped. The link is no problem to DnD. |
Beta Was this translation helpful? Give feedback.
-
@ludwa6 - so, I promised to alert you when the time was in: I think the time has come for beating the cr*p out of this to find its flaws: https://marxsal.github.io/TiddlyGoo/ @Marxsal - feel free to make that tweak I posted yesterday if you want to. |
Beta Was this translation helpful? Give feedback.
-
***@***.***Mat: got a heavy week of work happening down here on the farm, but i will be all over this thing IMCST (In My Copious Spare Time -ha! :-), and will be happy to provide feedback.
To that end, two questions:
How do you want feeback delivered? Marxsal's issue tracker for the project, perhaps?
Which version is most current? I'm running v0.0.21, and while it's nice to see this site that looks just like the installed plugin, with a drag&drop link right at the top, but (putting my n00b hat on for a moment :-) i'm not clear if that's the. thing to do over a previous version. Might do well to preempt that doubt on the site.
Yours, Walt
On March 9, 2021 at 5:12 PM, twMat ***@***.***> wrote:
@ludwa6 - so, I promised to alert you when the time was in: I think the time has come for beating the cr*p out of this to find its flaws: https://marxsal.github.io/TiddlyGoo/
@Marxsal - feel free to make that tweak I posted yesterday if you want to.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
OK, I took the liberty of tweaking a few things with the https://marxsal.github.io/TiddlyGoo/ site:
Thereafter, I say we... RELEASE THE KRAKEN |
Beta Was this translation helpful? Give feedback.
-
The sheet has hit the fan and it is now announced. When authoring that writeup I found an official intro link for google scripts. This is more suitable than the current link I give at the very bottom of
(I'd personally not even bother to change the version number for this peripheral detail, to avoid confusion.) Thanx! |
Beta Was this translation helpful? Give feedback.
-
@Marxsal - I say this thread has reached its end and we continue over at https://github.com/Marxsal/TiddlyGoo/issues if there are more issues. It has really been a true pleasure to cooperate with you! The process definitely took longer than I expected but I'm super satisfied with what we've created. DANG! - It is elegant! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Fellow @Siniy-Kit explains how to use Google Drive as backend for TW as part of how to set up a full internet shop based on TW. (yes... incredible, to say the least).
Considering how huge Google Drive is, it makes sense to refine (scale down) Siniy-Kits creation to make Drive usable as a general backend for TW, even a plugin. I.e all the tiddly data is stored in a Google Sheet - each row is one tiddler: actual example. Opening the TW fetches the data from there and presents it as regular tiddlers. For one thing, this would enable sharing of tiddlers/plugins/etc for a lot of people. It probably also means you can use Google Forms to make people create tiddlers in your wiki!
This post is a request for help in how to refine Siniy-Kits bits. I think this will be EASY for most of you guys reading this because Siniy-Kit has already done the actual work.
A reasonable first milestone would be to be able to fetch the data. The completed project would be to also write data to Drive. Here I will focus on the first milestone because this is as far Siniy-Kit's describes it.
Thus:
The Google Sheet is presented in JSON format simply by using the right URL to view it. For example, here is a real Sheet with tiddlers and here's the same sheet presented as JSON. Here is a friendly beginners guide how to get the "JSON URL" for a Sheet.
My interpretation is that Siniy-Kit uses a boot module in TW to fetch that JSON data: Siniy-Kit explains that he has a bootup tiddler named, bootprefix1.js. As you note, it unfortunately contains all other shop related js also. I (who can't code) identified the following as the key bit:
I can't tell if there are also other parts critical for the fetching of the JSON.
There's also a second tiddler $:/core/templates/tiddlywiki5.html which, among other code, has snip (and which Siniy-Kit agrees is the only important line in it):
Sooo... that should be pretty much it. Unfortunately I get RSOE when I'm trying it.
I will also post a tiddler below that Siniy-Kit uses to, if I understand, convert urls into JSON urls.
Beta Was this translation helpful? Give feedback.
All reactions