So it should be possible to make a plugin from it! That's fantastic! 

I will ask if any of the experts can package it into a plugin! It would 
enable us to use e.g Google Forms to make votes or questionnaires and have 
the results (via Google Sheets) published in a TW!

1) Do I understand you right that this pulls in the data and it is 
presented as tiddlers?
2) What happens if you modify such a tiddler - does it modify the google 
doc? 
3) What happens if you create a new tiddler?
4) If I install a plugin... is this somehow pushed to the sheet also?
5) Is it possible to have an empty TW (only the core) and the rest is 
tiddlers in the sheet?
6) How do you deal with images - where are they stored?
7) What are the limitations?

Sorry if I have so many questions but this is very exciting!

Regarding creating a plugin:

If you have the Google Sheet and use the instructions 
<https://www.freecodecamp.org/news/cjn-google-sheets-as-json-endpoint/> to 
get a JSON feed format like so:

https://spreadsheets.google.com/feeds/cells/YOURGOOGLESHEETCODE/SHEETPAGENUMBER/public/full?alt=json

...then what exact code in TW is it that uses this? I mean, the first code 
you posted here above  does not seem to have the JSON link in it (only one 
image):

var fields = Object.create(null);
fields.title="New tiddler";fields._canonical_uri="https://heeg.ru/image.jpg";
;fields.type="image/jpeg";
 if($tw.browser) {$tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.
getModificationFields(),fields,$tw.wiki.getCreationFields()))};

So I'm guessing it is the 
https://heeg.ru/shop2_1.html#%24%3A%2Fboot%2Fbootprefix1.js that uses this. 
But it is very big so it does a lot of other stuff also. I found this part, 
is this the important part:

function getSheetsData(worksheets_id) {
var fields = Object.create(null);
fields.title="$:/StoryList";fields.list="";
       if($tw.browser) {$tw.wiki.addTiddler(new $tw.Tiddler($tw.wiki.
getModificationFields(),fields,$tw.wiki.getCreationFields()))};
scriptRequest("https://spreadsheets.google.com/feeds/worksheets/"+
worksheets_id+"/public/values?alt=json-in-script", ok, fail);
}


...and in $:/core/templates/tiddlywiki5.html , is this the only special row 
to include it?

<div id="bootKernelPrefix1" style="display:none;">
{{ $:/boot/bootprefix1.js ||$:/core/templates/javascript-tiddler}}
</div>

Again, sorry for the many questions but this can be fantastic!

Thank you Siniy-Kit!!!


<:-)

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1fa1d558-a985-490b-a152-a9dd1d8ab97do%40googlegroups.com.

Reply via email to