All my javascript I put to one tiddler 
http://novye-podarki.ru/6_7_0/heeg.html#%24%3A%2Fboot%2Fbootprefix1.js  I 
know, that it is not correct, but my project heeg.ru is not professional. 
it has only  30-40 unique users per day (both with shop users and their 
shops).
I don't see transactions of shops on my site (this information is private), 
but i think it is about 0 :)

test project http://heeg.ru/shop_test29.html use  gviz google api. so it 
loads not whole table at start (as my standard shop), but only necessary 
part of it. So this APi use google table as database all code is


var part='';

var dataURL = 
'https://docs.google.com/spreadsheets/d/1b3CFfclMbQEQyJXVAz4yrqOiUS3vL_5jt-85ku0E9Ck/gviz/tq?sheet=goods';

function drawVisualization(dataURL,queryString,part) {

    var opts = {
        sendMethod: 'auto'
    };
    var query = new google.visualization.Query(dataURL, opts);
    query.setQuery(queryString);
    query.send(handleQueryResponse);
}

function handleQueryResponse(response) {
    if (response.isError()) {
        alert('Error in query: ' + response.getMessage() + ' ' + 
response.getDetailedMessage());
        return;
    }
    var data = JSON.parse(response.getDataTable().toJSON());



 
for (var ik=0, lenk=data.rows.length; ik<lenk; ik++) {
  var fields = Object.create(null);
for (var i=0, len=data.cols.length; i<len; i++) {
if(data.cols[i].label=='id'){new_keya='title'}else 
if(data.cols[i].label=='name'){new_keya='caption'}else{
new_keya=data.cols[i].label};



if(data.rows[ik].c[i] == null || data.rows[ik].c[i].v=="" || 
data.rows[ik].c[i].v==undefined){}else if(new_keya=="tags"){
fields[new_keya]=data.rows[ik].c[i].v+" $:/Note"+" 
"+search_text;}else{fields[new_keya]=data.rows[ik].c[i].v+""};

 };
$tw.wiki.addTiddler(new 
$tw.Tiddler($tw.wiki.getModificationFields(),fields,$tw.wiki.getCreationFields()));


};

if (part=="limit 1"){
var story = new $tw.Story();
story.navigateTiddler(search_text);
}


}





function summaryVisualTitle(title, col, par){
if(title.length>2){
    querySummary = 'select * Where ' +col +' like '+title+' ' +par;
part=par;
search_text=title;
    drawVisualization(dataURL,querySummary,part);



}
}

 

пятница, 8 марта 2019 г., 14:59:57 UTC+3 пользователь Jeremy Ruston написал:
>
> Hi Siniy-Kit
>
> What you've built is incredibly impressive. I would love to get the 
> techniques you are using written up so that it's easier for others to 
> follow. Do you have any idea of the traffic volumes you're seeing? Can you 
> talk about the number of successfully completed transactions per day/week 
> etc?
>
> here is google table shop demo with 14000+ ITEMS  
> http://heeg.ru/shop_test29.htm
>
>
> This URL didn't work for me.
>
> Best wishes
>
> Jeremy.
>
>
>
> <http://heeg.ru/shop.html?id=1LJKSexFKRh6EpWeDTvgbYNBZhhf-TmV3E7c0PvVdS-s>
> среда, 20 февраля 2019 г., 12:38:37 UTC+3 пользователь CHUN LI написал:
>>
>> Hi Jeremy,
>>
>> Thanks for the guide and I will see how far I can go.
>>
>> May I ask a further question? Can a blank TW file also be created by 
>> publishing a Google web app? I guess it is about the fundamental 
>> requirements of creating a TW file vs. the limitation of GAS? 
>>
>> (I read about Web app on GAS from 
>> https://developers.google.com/apps-script/guides/web)
>>
>> So I am thinking, 
>>
>>    1. Create a Google spreadsheet on my Google drive.
>>    2. Open Script Editor from the 'Tools' tab in the Google spreadsheet.
>>    3. Add (write) all the necessary .js, .html, .css code in my TW.html 
>>    file. Please see a screenshot attached below. GAS use .html file to store 
>>    all these three types of files. 
>>    4. Use a .gs file, e.g. getData.gs, to read all the data from the 
>>    Google spreadsheet. The data can be used to create a .json tiddler, and 
>>    create tiddlers.
>>    5. Publish as a web app.
>>    6. The Google spreadsheet can be updated using a Google form. The 
>>    form can also be a tiddler and be used to edit (add) tiddlers. 
>>    7. Multiple users can work on the Google spreadsheet. Their Google 
>>    logins will be collected and used as tiddler authors.
>>
>> [image: Screen Shot 2019-02-20 at 10.12.53 PM.png]
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Thanks,
>>
>> Chun
>>
>>
>> On Wednesday, February 20, 2019 at 12:25:32 AM UTC+13, Jeremy Ruston 
>> wrote:
>>>
>>> Hi Chun
>>>
>>> As I have been using Google Apps Scripts (GAS) and knowing TiddlyWiki 
>>> for about 1 year, I am trying to find out the possibilities of (re) writing 
>>> TiddlyWiki in GAS. The HTML services in GAS allows client side javascript, 
>>> CSS and HTML (https://developers.google.com/apps-script/guides/html). 
>>> Google Sheets might be a place to store (or keep a copy of) tiddlers, or be 
>>> used to produce a data tiddler. Google also has this (
>>> https://developers.google.com/apps-script/api/quickstart/nodejs) to 
>>> make node.js commands to GAS API.  
>>>
>>>
>>> Thanks! I think you are correct, there is a fascinating opportunity to 
>>> make an adaptation of TW that is served by GAS and can save changes back to 
>>> it. It would be a nice straightforward user experience too.
>>>
>>> I think the easiest way to get started would be to create a new 
>>> syncadaptor that loads and saves tiddlers via the GAS APIs. Then one could 
>>> serve a blank TW file that includes that plugin, and at startup it would 
>>> load the required tiddlers from the server. The next step might be to bake 
>>> tiddlers into the HTML file when it is first served.
>>>
>>> I'm not sure that I will personally have time to investigate this 
>>> opportunity in the near future, but I'd be very happy to help guide other 
>>> developers who might want to take up the challenge...
>>>
>>> Best wishes
>>>
>>> Jeremy
>>>
>>>
>>>
>>>
>>>  
>>> Did I misunderstand anything? Or this sounds like a plan? Sorry if I 
>>> overlooked the Copyright of Tiddlywiki as I don't intend to do so. 
>>>
>>> Thanks!
>>>
>>> Chun 
>>>
>>> -- 
>>> 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 post to this group, send email to tiddl...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/tiddlywiki.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/tiddlywiki/97145418-d172-42b5-aaff-c6b170c7d4ca%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/tiddlywiki/97145418-d172-42b5-aaff-c6b170c7d4ca%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> -- 
> 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 <javascript:>.
> To post to this group, send email to tiddl...@googlegroups.com 
> <javascript:>.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/c3e63bbb-3190-450a-9839-3be32ec6b82f%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/c3e63bbb-3190-450a-9839-3be32ec6b82f%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/bb2395c0-5fdc-4875-8d6a-d789005fb218%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to