I earn some money by making sites on Tiddliwiki. And I think Tiddliwiki can have commercial development.

543 views
Skip to first unread message

Siniy-Kit

unread,
Jul 4, 2020, 1:30:04 PM7/4/20
to tiddl...@googlegroups.com
Little story. All we know that Tiddliwiki is absolutely free, and it is very good to start any project on free platform. But  commercial projects evolve faster than free, because money sometimes a very good motivation factor. And people, who pay money for their project squeeze all the juice out of the developer. So Client+Developer works better than client solo.

Last month I have a very difficult Tiddlywiki project.  Here it is http://papadoma.net/  it is  on-line store with more than 13 000+ static cut pages! At the beginning of this project I said to my client, that it is a bad idea, because node.js  needs 6 minutes to make static cut off all 13000+ pages. But he said "No problem"  and gave me twice as much money as I asked for.

AND This client gave me many ideas, and all this ideas I put to my next version of my Tiddlywiki store. So I get money and develop my free project.  I think it is a very good variant of evolution.
This site on Tiddlywiki works slow because it loads data from spreadsheet  but it is not a problem too :)  Only real working project shows what is important and what is not.  

AND I bought contextual advertising for my Tiddlywiki project!   


Mat

unread,
Jul 5, 2020, 7:45:25 AM7/5/20
to TiddlyWiki
Siniy-Kit, thank you for sharing! I don't know of anyone who has take TW in the direction that you have, it's really amazing.

I note that the spreadsheet is a Google Sheet. How does the TW load the data from there?

<:-)

Siniy-Kit

unread,
Jul 5, 2020, 10:28:19 AM7/5/20
to tiddl...@googlegroups.com
Hi Mat!


so I read this json by javascript and create tiddlers for each line

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()))};

 



воскресенье, 5 июля 2020 г., 14:45:25 UTC+3 пользователь Mat написал:

Mat

unread,
Jul 5, 2020, 12:30:31 PM7/5/20
to TiddlyWiki
Siniy-Kit wrote:

What!? Google Sheets features an automatic way to feed content in JSON format!!!??? Wow!!!
 
so I read this json by javascript and create tiddlers for each line
[code]

Where do you put that code? Forgive me, I don't know any JS. Is it possible to put have that code inside the wiki, perhaps as a TW-plugin? 

<:-)

Siniy-Kit

unread,
Jul 5, 2020, 1:45:58 PM7/5/20
to TiddlyWiki
I don't know how to make TW-plugins. There is no  manuals about it. So I put all my pure Javascript to one tiddler  https://heeg.ru/shop2_1.html#%24%3A%2Fboot%2Fbootprefix1.js
so all my script run when TW5  opens

It is primitive, but it works. 



воскресенье, 5 июля 2020 г., 19:30:31 UTC+3 пользователь Mat написал:

Mat

unread,
Jul 5, 2020, 2:47:58 PM7/5/20
to TiddlyWiki
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 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!!!


<:-)

TW Tones

unread,
Jul 6, 2020, 12:59:23 AM7/6/20
to TiddlyWiki
Siniy,

I was aware of your implementations and have held them in high regard. The fact is you deserve to get a return for you effort. I too was paid consulting hours as I built a bespoke database and document/report generator for a Client. I certainly hope to make money in one way or another for a combination of my services and tiddlywiki solutions. 

Just like you, and since we "stand on the shoulders of giants" I believe all that is expected from us is to never conceal tiddlywikis role, and share back into the community the how to and special tools we develop, This does not mean we must share back the end result, because sometimes it is private or commercial in confidence, but we should work to repay the community many times over through our contributions.

Open source is a virtuous circle and I do not believe profit is wrong, as long as we remain true to the community.

Thank you for sharing your story to the community.

TW Tones.

Siniy-Kit

unread,
Jul 6, 2020, 12:00:12 PM7/6/20
to tiddl...@googlegroups.com
I use google forms to send orders to special google spreadsheet   and code of this form  google script generates automatically (you dont need to create form) this code google script put to spreadsheet 

Аннотация 2020-07-06 181058.png



 so when tiddlywiki loads this table, it creates tiddler with this google form, an this form send orders to other spreadsheet, and this spreadsheet send e-mails to shop and customer.
This Russian video shows how people can create their free online stores. 

1. Yes every line of every worksheet is a tiddler (id=title, name=caption)
2. No, now it is not possible to modify spreadsheet through Tiddlywiki, But in future (I hope) I will write googlescript hook. Spreadsheet can receive POST ang GET    with password and commands what to do with spreadsheet, so it wil be possible to add and remove lines,  look for tiddler by id (title) and modify it.  May be tiddlers will be in JSON, not to create many colons.
3. You can test it. It will be created, but you will not see it in spreadsheet/
4. I put id of spreadsheet to url and script read this id https://heeg.ru/shop2_1.html?id=10Q1RMs2QeKlvKywq7MGHSRltcDYXYTD5y2HFs0aygqE or to you can put table id to special field and press import 
5. Yes, my Tiddlywiki is empty https://heeg.ru/shop2_1.html all its content it loads only if it has id in URL  
6. All images are stored on Google drive (or on your hosting if you want). Script in spreadsheet reads folder's content (I use _images folder). And put all titles  of images and their path ID to GD-images worksheet (if you press a button). So Tiddlywiki loads this worksheet too, and you have all images from _images google drive folder in your store  
7. There is no limitations to spreadsheets read (or they are very high) I have never reached any limits. Limits has only google developer console, but i don't use it. The only limit I know, that you can send only 100 emails per day through the spreadsheet.

. I found this part, is this the important part:

yes this part reads data from spreadsheet by its id. My $:/boot/bootprefix1.js contains ALL javascript code of store, you need only a little part of it. 

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

yes only this

воскресенье, 5 июля 2020 г., 21:47:58 UTC+3 пользователь Mat написал:

Mat

unread,
Jul 7, 2020, 12:35:09 PM7/7/20
to TiddlyWiki
@Siniy-Kit - wow, what a detailed and wonderful answer, this is so kind of you!!! This will be very useful and I intend to build a plugin for it and publish it to the community. It will take some time though ;-) and there will for sure be more questions from me. Again, my warmest thanks. You make incredible stuff!

<:-)

Mat

unread,
Feb 7, 2021, 11:25:50 AM2/7/21
to TiddlyWiki
@Siniy-Kit and everyone

I have started a new discussion in the dev forum with the hope of refining Siniy-Kits code for a general GoogleDrive-as-TW-Backend. I think this means just to snip out the critical bits from Siniy-Kits code since this is just a fraction of his full shop solution, so it should be simple for anyone who is used to JS code. It is worth noting that if one can use Drive as a backend then a lot of us could share plugins and tiddlers this way. It think this can be packaged into a (small) plugin so anyone with a google account can use it.

@Siniy-Kit - what's you github user name?

<:-)

TiddlyTweeter

unread,
Feb 9, 2021, 3:26:31 AM2/9/21
to TiddlyWiki
Ciao Mat

Very useful idea!  @Siniy-Kit is the TW-genius of online-neat-shopping-malls!

TT

Reply all
Reply to author
Forward
0 new messages