[twdev] Re: Migrating to GitHub discussions

2021-04-29 Thread LinOnetwo
Strongly agree, I use Github alot, and use tiddlywiki google group 
sometimes, and rarely come to tiddlywikidev for a time.

在2020年12月12日星期六 UTC+8 上午1:26:01<@TiddlyTweeter> 写道:

> Ciao Jeremy
>
> Good idea. (1) GG is becoming a big pain to use. Especially if you need to 
> add code blocks or edit messages. (2) Github style Discussion IS 
> approachable even if you are not a dev.
>
> Best wishes
> TT
>
> On Thursday, 10 December 2020 at 16:18:54 UTC+1 Jeremy Ruston wrote:
>
>> We are migrating this discussion group to GitHub:
>>
>> https://github.com/Jermolene/TiddlyWiki5/discussions
>>
>> The motivations for the change are:
>>
>>- Most of our development activity is on GitHub so it makes sense to 
>>move related discussions there too
>>- Google Groups doesn't offer many of the features needed by 
>>developers (eg code blocks with syntax highlighting)
>>
>> This group is remaining open for now so that people can reply to existing 
>> threads. Please avoid making new posts here.
>>
>> Best wishes
>>
>> Jeremy
>>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/c38a10f5-bd42-4efa-ad5b-5f8ad1d72be4n%40googlegroups.com.


[twdev] Re: Awesome Starred Tiddlywiki Tools

2021-04-29 Thread LinOnetwo
I discuss alot with bourgeoa  about store tw 
content to solid last year, and I finally choose Github as my BaaS instead 
of choosing SoLiD.

Glad to see bourgeoa  is still carry this on.
在2021年4月15日星期四 UTC+8 下午3:36:47 写道:

> Also see
>
> Tiddlywiki SyncAdaptorModules for node-solid-server
> https://github.com/bourgeoa/solid-file-widget
>
> Store your Tiddlywiki in a Pod!
>
> Awesome!
>
>
> Best wishes
> Mohammad
>
>
> On Thu, Apr 15, 2021 at 12:00 PM Mohammad Rahmani  
> wrote:
>
>> I came over the https://github.com/almereyda/awesome-starred and 
>> interestingly found several Tiddlywiki related tools! Amazingly they are 
>> not discussed in this forum not can be found in TiddlyWiki community 
>> links 
>>
>> One of them is twserver-go
>>
>> https://github.com/K4rian/twserver-go
>>
>> It is a small portable Tiddlywki server and works on Windows/Linux/Mac
>> It supports extra folders for images and PDFS and other binaries also!
>>
>> You can find other nice tools there!
>>
>>
>> Best wishes
>> Mohammad
>>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/0ddbd3e2-a352-40bf-b65e-a66bb8d536e0n%40googlegroups.com.


[twdev] Re: How to delete tiddler without trigger fs.unlink? And how to sync change from server to browser?

2020-08-08 Thread LinOnetwo
Plugin is here 
https://github.com/Jermolene/TiddlyWiki5/issues/3060#issuecomment-670850286

I have to create a fake file for tiddlywiki to delete.

在2020年8月8日星期六 UTC+8 上午12:55:40 写道:

>
> Hi everyone,
>
> I'm trying to create a plugin that monitor disk change, and update wiki 
> state, discussion is here:
>
> https://github.com/Jermolene/TiddlyWiki5/issues/3060#issuecomment-670610762
>
> Do you know which widdlywiki API can update the wiki in the browser from 
> the nodejs server?
>
> And which API can delete a tiddler inside the wiki, but don't ask wiki to 
> delete file in the disk?
>
> Sincerely,
> Lin Onetwo
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/975a0fd1-f576-4e24-9cfe-b62b85fca53fn%40googlegroups.com.


[twdev] How to delete tiddler without trigger fs.unlink? And how to sync change from server to browser?

2020-08-07 Thread LinOnetwo

Hi everyone,

I'm trying to create a plugin that monitor disk change, and update wiki 
state, discussion is here:

https://github.com/Jermolene/TiddlyWiki5/issues/3060#issuecomment-670610762

Do you know which widdlywiki API can update the wiki in the browser from 
the nodejs server?

And which API can delete a tiddler inside the wiki, but don't ask wiki to 
delete file in the disk?

Sincerely,
Lin Onetwo

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/2287fe3b-4695-40e2-93cc-f07ec4d72509n%40googlegroups.com.


Re: [twdev] [service worker] I introducing service worker and webmanifest to the wiki, make my Wiki a PWA, now it can work offline!

2020-04-20 Thread LinOnetwo
Forget to say, I'm precaching things using workbox-cli

https://github.com/linonetwo/Tiddlywiki-NodeJS-Github-Template/blob/cecfe6df1daff1ad5b21b3c85a261489284e67fb/package.json#L18

This requires running npm command to generate the final 
./public/service-worker.js from the ./PublicWiki/public/service-worker.js,
so maybe github pages is not enough? Except you run this command locally 
and push the result to the github.

I run this script in the now.sh cloud, to generate final service-worker.js, 
on the fly.

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/af1ff191-886e-4135-9db0-39c564a161be%40googlegroups.com.


[twdev] Re: [service worker] I introducing service worker and webmanifest to the wiki, make my Wiki a PWA, now it can work offline!

2020-04-20 Thread LinOnetwo
If you click the save button, it will simply save a HTML file. To allow 
save offline, I need to add a SyncAdaptor that will sent single tiddler via 
HTTP request, then service worker can use workbox-background-sync 
<https://developers.google.com/web/tools/workbox/modules/workbox-background-sync>
 
strategy to wait for onlien, 
and use cache to hode changes locally, if you reopen the app and it is 
still offline, syncadaptor can retch skinnytiddlers and changed tiddlers 
from service worker Cache API.

So to make it a read-write PWA, we need to use SyncAdaptor  instead of 
Saver. And need to implement Cache and background-sync.

I'm using Github to store tiddlers now, so I hope there can be a Github 
SyncAdaptor (and with multiple repo support, so I can save tiddlers tagged 
with "private" to be saved to a private repo)
With Github SyncAdaptor, I can make it a read-write app that works offline 
and resync upon reconnect.

---

I'm currently working on a NodeJS version of TiddlerDesktop (using 
WebCatalog app), that can save tiddlers instead of save HTML, this will 
works good with Github SyncAdaptor in the future.

在 2020年4月20日星期一 UTC+8下午12:02:54,TonyM写道:
>
> lin One two,
>
> I was very keen to see if TiddlyWiki could become a PWA. I used your link 
> on my android and the save, saved locally to a tiddlers(n).html file. Can 
> the changes be saved locally so the app can be accessed at the same address 
> or as a native icon on the phone?.
>
> What other imitations do you see?
>
> I love your contributions to the Tiddlywiki community, very innovative.
>
> Regards
> Tony  
>
> On Wednesday, April 15, 2020 at 4:41:20 AM UTC+10, LinOnetwo wrote:
>>
>> I read the tutorial of PWA today, and created a manifest.webmanifest : 
>> https://github.com/linonetwo/Tiddlywiki-NodeJS-Github-Template/blob/master/PublicWiki/public/manifest.webmanifest
>> to test if it can turn my wiki into an APP that can be installed in my 
>> mobile phone, and I succeed! 
>>
>> Then I use workbox 
>> <https://developers.google.com/web/tools/workbox/modules/workbox-precaching> 
>> (it allows me to write service worker easily) to create a service worker: 
>> https://github.com/linonetwo/Tiddlywiki-NodeJS-Github-Template/blob/master/PublicWiki/public/service-worker.js
>> it make my wiki work offline, so that app really feels like an offline 
>> app, instead of a website.
>>
>> Now my wiki can serve as a quick manual APP for me to search in mobile, 
>> it can open fullscreen, and open in lightening fast speed, and work offline!
>> The content of the wiki will get updated only if I deploy a new version 
>> of wiki, and close the website tab, then reopen the tab (so a service 
>> worker with new precache content will install 
>> <https://medium.com/better-programming/let-users-know-when-you-have-updated-your-service-worker-in-create-react-app-b0c2701995b3>
>> )
>>
>> Please try it out in your phone 
>> https://tiddlywiki-nodejs-github-template.now.sh
>> The code is here: 
>> https://github.com/linonetwo/Tiddlywiki-NodeJS-Github-Template  
>> I will write a post about the detail later.
>>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/de94cc5f-70b0-45cd-a901-4b84c08165e6%40googlegroups.com.


Re: [twdev] [service worker] I introducing service worker and webmanifest to the wiki, make my Wiki a PWA, now it can work offline!

2020-04-15 Thread LinOnetwo
I think you can also use service-worker.js in gh-page, if you already using 
that, you can try doing it in gh-page first.

Just like this example 
https://github.com/linonetwo/ipfs-browser-gateway/tree/gh-pages

在 2020年4月15日星期三 UTC+8下午4:04:37,Mohammad写道:
>
> Hi Lin,
>  Many thanks! This wonderful. I uses gh-pages, but I give a try on now.sh
>
> Cheers
> Mohammad
>
> On Wednesday, April 15, 2020 at 11:53:59 AM UTC+4:30, LinOnetwo wrote:
>>
>> Hi, Mohammad,
>>
>> For now, I'm just using a RawMarkup tiddler, as in the attachment, to 
>> load the service-worker.js served in /service-worker.js 
>>
>> So you may have to serve your HTML wiki along with service-worker.js
>>
>> I think it is very easy to use, if you are using a static server (for 
>> example gh-page, or now.sh ) to serve your wiki. (I'm using now.sh to auto 
>> bundle NodeJS wiki to HTML wiki)
>>
>> PWA is progressive, won't hurt any basic function, and it is getting 
>> widely adapted these days.
>> I'll do more experiment on it, maybe one day I will open a PR, letting 
>> service worker to be build into the main tiddlywiki.
>>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/00b7739d-b53b-4019-9640-1b05dbdeabb0%40googlegroups.com.


Re: [twdev] [service worker] I introducing service worker and webmanifest to the wiki, make my Wiki a PWA, now it can work offline!

2020-04-15 Thread LinOnetwo
Hi, Mohammad,

For now, I'm just using a RawMarkup tiddler, as in the attachment, to load 
the service-worker.js served in /service-worker.js 

So you may have to serve your HTML wiki along with service-worker.js

I think it is very easy to use, if you are using a static server (for 
example gh-page, or now.sh ) to serve your wiki. (I'm using now.sh to auto 
bundle NodeJS wiki to HTML wiki)

PWA is progressive, won't hurt any basic function, and it is getting widely 
adapted these days.
I'll do more experiment on it, maybe one day I will open a PR, letting 
service worker to be build into the main tiddlywiki.

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/f509262f-9b58-44b7-93f8-274c18d097c7%40googlegroups.com.


Custom HTML Header_Register ServiceWorker.tid
Description: Binary data


[twdev] Re: [service worker] I introducing service worker and webmanifest to the wiki, make my Wiki a PWA, now it can work offline!

2020-04-15 Thread LinOnetwo
Hi Mario,

I read the doc 

 
again, I can assure that these ga related code are used to help page that 
already have ga to collect data even offline. If our wiki don't use ga 
already, and not explicitly use that code, it won't do anything.

Thanks for your reminder for that.


-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/d92b90e0-c385-4e66-8f8d-aa84232a49ff%40googlegroups.com.


[twdev] [service worker] I introducing service worker and webmanifest to the wiki, make my Wiki a PWA, now it can work offline!

2020-04-14 Thread LinOnetwo
I read the tutorial of PWA today, and created a manifest.webmanifest : 
https://github.com/linonetwo/Tiddlywiki-NodeJS-Github-Template/blob/master/PublicWiki/public/manifest.webmanifest
to test if it can turn my wiki into an APP that can be installed in my 
mobile phone, and I succeed! 

Then I use workbox 
<https://developers.google.com/web/tools/workbox/modules/workbox-precaching> 
(it allows me to write service worker easily) to create a service worker: 
https://github.com/linonetwo/Tiddlywiki-NodeJS-Github-Template/blob/master/PublicWiki/public/service-worker.js
it make my wiki work offline, so that app really feels like an offline app, 
instead of a website.

Now my wiki can serve as a quick manual APP for me to search in mobile, it 
can open fullscreen, and open in lightening fast speed, and work offline!
The content of the wiki will get updated only if I deploy a new version of 
wiki, and close the website tab, then reopen the tab (so a service worker 
with new precache content will install 
<https://medium.com/better-programming/let-users-know-when-you-have-updated-your-service-worker-in-create-react-app-b0c2701995b3>
)

Please try it out in your phone 
https://tiddlywiki-nodejs-github-template.now.sh
The code is here: 
https://github.com/linonetwo/Tiddlywiki-NodeJS-Github-Template  
I will write a post about the detail later.

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/dd6050cb-925b-4059-a467-21f31581ca72%40googlegroups.com.


[twdev] Re: How to generate JSON for a plugin for a Library

2020-04-12 Thread LinOnetwo
I see TodlIist plugin  https://kookma.github.io/TW-Todolist/ from KooKma is 
using JSON in $__todolist_data_base_tasks.json

Maybe you can take a look

在 2020年4月13日星期一 UTC+8上午5:00:09,Andrew写道:
>
> Hey everyone, it has been awhile since I worked on anything. Trying to 
> pick up were I left off but there has been a lot of changes. I have moved 
> my work fully to GitHub from Tiddlyspot because Tiddlyspot doesn't do 
> https. Anyway, I am now at t5a.github.io.
>
> I started back up my work on my plugintools plugin but I am running into 
> problems getting my Library JSON text generator to work. In particular it 
> was supposed to automatically escape using the \ anytime it came to a quote 
> mark. I have a tiddler called $:/plugins/ajh/plugintools/libraryformat and 
> I thought it used to work but now it doesn't. Any suggestions would help. 
> Sorry, it has been a couple years and I am not sure what all has changed. 
> Thanks.
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/05491a58-3eb8-4a5d-8c62-6c11c2f578b5%40googlegroups.com.


[twdev] How to hook in SyncAdaptor to execute code before saveTiddler() and after loadTiddler() ?

2020-04-12 Thread LinOnetwo
Hi, I'd like to push TW5-EncryptTiddlerPlugin a step forward.

I want my wiki to work like Notion, so I can mix Public and Private content 
in one wiki, and tag some content to be Public.

So I need to encrypt tiddler with for example "EncryptThis" tag just before 
any SyncAdaptor, e.g., NodeJS SyncAdaptor executes the saveTiddler()

And I need to decrypt tiddler withi such tag, just after any SyncAdaptor 
executes the loadTiddler() .

---

Only in this way, can we achieve following goals:

1. On browser that has enter the password ( I will remember password in the 
browser localstorage ) , all tiddlers are always visible, and searchable. ( 
Only when tiddler is sync back to nodejs, it become encrypted )
2. When I backup tiddlers to Github, Private tiddlers are always encrypted

---

Additional context:

I'm using NodeJS wiki in localhost, use WebCatalog to make it DesktopApp 
and MenuBarAPP.
And I backup tiddlers to Github.
A CI will build HTML from tiddler files after git push, and serve it as a 
website.

---

Conculsion: I need to hook in SyncAdaptor life cycle, or write a middleware 
for SyncAdaptor. Does anyone know if there is an API to do so?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/ffbca28a-a263-4873-ad42-bbae0fee6f31%40googlegroups.com.


[twdev] Re: Comments in code - this is how we can do it.

2020-04-12 Thread LinOnetwo
This gives me a feeling of literal programming, that you can weave document 
and code together.

I think this kind of rich text comment is even more interesting. I think I 
will add lots of this kind of rich text comment to my code, even Javascript 
code.

在 2020年4月7日星期二 UTC+8下午7:33:33,Mat写道:
>
> As we know, it is currently problematic to add comments in wikitext code. 
> This causes a lot of confusion even when I review my own code from a mere 
> few days earlier - not to mention when reading someone elses code.
>
> My current fiddling with EditorMagic  
> sparked an idea: Would it be possible with code comments to be, not *in* 
> the code, but as  "popups" *that are not processed when the wikitext is 
> processed*? This illustrates the idea (the code snip is just arbitrary, 
> never mind what it says, only look at the red things and the popups):
>
>
> [image: code_comments.png]
>
> Like in EditorMagic, the popups are not part of the current editor 
> content. When coding in wikitext, adding a generic  or <1>, <2>,... or 
> some other marker, triggers a little popup editor where comments can be 
> added. When the actual code is processed, such markers are jumped over. 
>
> Actually, this approach even has several...
>
> *...advantages over in-line comments:*
>
>- The comments are kept separated - we could make a core annotations 
>plugin!!! This should be super valuable for the whole TW project.
>- It retains the compactness of the code.
>- The popups could themselves show wikitext and be configurable, like 
>the ambition for EditorMagic, to e.g include reference links or iframes.
>- It would be simple to toggle the display of comments.
>
>
> P.S As I, so far, somewhat clumsily illustrate in EditorMagic, the 
> possibility to trigger popups in the editor that show arbitrary tiddler 
> content is really a game changer for using the editor. I wish some of the 
> big boys could make a proper js solution for this.
>
> <:-)
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/ec47e12e-8787-4260-9886-52c2b031aaab%40googlegroups.com.


[twdev] Re: [Visual Studio Code][Beta] TwiddlyWiki5 Syntax Highlighting for VSCode!

2020-04-09 Thread LinOnetwo
Wow, that is very useful, when developing plugin.

Looking forward to your release to marketplace!

在 2020年3月29日星期日 UTC+8上午3:52:08,Joshua Fontany写道:
>
> Hi!
>
> I've thrown together a quick extension for Visual Studio Code to enable 
> syntax highlighting. I have not yet added it to the MS Marketplace, so you 
> cannot find it through VSCode's Extensions tab quite yet...
>
> Find the github repo here:
>
> https://github.com/joshuafontany/VSCode-TW5-Syntax
>
> Clone it to your Extensions folder as described here: 
> https://vscode-docs.readthedocs.io/en/stable/extensions/install-extension/
>
> ---
>
> I use Bob on Node.js and author plugins as folders separate from my 
> tiddlywiki and wikis directories. This means I am often tweaking or editing 
> UI tiddlers, etc, etc inside of plugins while the server is down, then 
> restart it to run tests, etc. Syntax highlighting is going to be a huge 
> benefit to this workflow.
>
>
> At this time I am mainly relying on a "named" syntax-highlighiting grammar 
> built for the Atom text editor. This grammar is fairly well developed, but 
> can totally be improved as I learn more about syntax highlighting.,
>
>
> There may be another way to set this up, instead of making up a language 
> named "TiddlyWiki5" I could "inject" the wikitext rules into the base HTML 
> context. Then setup the field-contexts to be pared as HTML(Extended) 
>
>
> But for now this one that defines rules for most of the wikitext as a new 
> language will do.
>
> Best,
>
> Joshua Fontany
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/baf4ed9e-f055-4245-a17b-c2826c2e57c9%40googlegroups.com.


[twdev] Re: Example using webpack to integrate npm module into a plugin

2020-01-29 Thread LinOnetwo
I'm also using webpack to bundle files in  
https://github.com/linonetwo/solid-tiddlywiki-syncadaptor

在 2017年6月24日星期六 UTC+8上午10:05:52,Brian Theado写道:
>
> On the main TW list, I announced a plugin integrating the Eve language 
> with TW 
> https://groups.google.com/d/msg/tiddlywiki/u46WpoCWac8/UAUdpK3ZAAAJ. 
>
> In order to get the third-party Eve npm module integrated, I used 
> webpack.(https://webpack.js.org/). I thought I'd point to the details 
> on what I did in case it is useful for anyone else, since being new to 
> javascript tooling, it took me a while to figure out a few of the 
> things. 
>
> Here is the webpack configuration file. The output.libraryTarget 
> section and the externals section are the two most important parts for 
> TW: 
>
>   https://github.com/btheado/tweve/blob/master/webpack.config.js 
>
> The 'if($tw.browser)' wrapper is also important: 
>
>   
> https://github.com/btheado/tweve/blob/master/src/plugins/btheado/tweve/tiddlywiki.files
>  
>
> I generated the original plugin structure using Danielo's yeoman 
> generator (
> https://groups.google.com/d/msg/tiddlywikidev/rZ8nLFKA8BE/o30NDONxAAAJ 
> - thanks Danielo!), but found that I couldn't get the webpack grunt 
> plugin to work. So I ditched the gruntfile and went completely with 
> npm scripts: 
>
>   https://github.com/btheado/tweve/blob/master/package.json#L34 
>
> I found that much simpler but I lost some of the functionality from 
> the gruntfile like auto-version incrementing. 
>
> Brian 
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/0c1c2c8e-e70a-4ea7-8e5c-f0137f396b04%40googlegroups.com.


Re: [twdev] How can I push data to tw in SyncAdapter

2020-01-22 Thread LinOnetwo
Thank you! That really works, speed up the content loading.

I guess I can do same thing to `getSkinnyTiddlers()`, so skinny tiddlers 
can be loaded in the async way.

在 2020年1月23日星期四 UTC+8上午12:54:18,Jeremy Ruston写道:
>
> Hi LinOneTwo
>
> To load a tiddler, your syncadaptor can call 
> the $tw.syncer.storeTiddler(tiddlerFields) method with a hashmap of fields 
> for the tiddler. You can call it asynchronously whenever you’ve got a new 
> tiddler to load.
>
> Best wishes
>
> Jeremy.
>
> I'm continuing on my solid-syncadaptor, I'm considering only load 
> skinnytiddlers on the first `getSkinnyTiddlers()` trigger.
>
> And in the second trigger of `getSkinnyTiddlers()`, I load all the content 
> of tiddlers at once, and put response into Cache API 
> <https://developer.mozilla.org/en-US/docs/Web/API/Cache>.
>
> And in subsequent `getSkinnyTiddlers()`, I would use `stale-while-revalidate` 
> strategy:
> first returns the data from cache (stale), then sends the fetch request 
> (revalidate), and finally comes with the up-to-date data again.
>
> So I need to push data to tw:
>
> 1. `getSkinnyTiddlers()` need me to return all data at once, but I want 
> to queue the request to the backend, and do it slowly
> 2. `stale-while-revalidate`'s `finally comes with the up-to-date data` 
> need me push data to tw too.
>
> Is there an API to do so?
>
> -- 
> 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 tiddly...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywikidev/363979a2-0f47-46a6-a4bf-fefbe9c01a0e%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/363979a2-0f47-46a6-a4bf-fefbe9c01a0e%40googlegroups.com?utm_medium=email_source=footer>
> .
>
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/2ae223fd-35cf-484a-bd5c-28fc241d7ff3%40googlegroups.com.


[twdev] How can I push data to tw in SyncAdapter

2020-01-22 Thread LinOnetwo
I'm continuing on my solid-syncadaptor, I'm considering only load 
skinnytiddlers on the first `getSkinnyTiddlers()` trigger.

And in the second trigger of `getSkinnyTiddlers()`, I load all the content 
of tiddlers at once, and put response into Cache API 
.

And in subsequent `getSkinnyTiddlers()`, I would use `stale-while-revalidate` 
strategy:
first returns the data from cache (stale), then sends the fetch request 
(revalidate), and finally comes with the up-to-date data again.

So I need to push data to tw:

1. `getSkinnyTiddlers()` need me to return all data at once, but I want to 
queue the request to the backend, and do it slowly
2. `stale-while-revalidate`'s `finally comes with the up-to-date data` need 
me push data to tw too.

Is there an API to do so?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/363979a2-0f47-46a6-a4bf-fefbe9c01a0e%40googlegroups.com.


[twdev] How to send message from outside of tiddlywiki?

2019-12-27 Thread LinOnetwo
I' trying to build a new tiddlywiki desktop, I'm concerning whether I can 
send message likes "tm-save-wiki 
" 
from a button in the app, outside of wiki's webpage.

Or thinking another case, If there is a tiddlywiki android app, can I 
perform search from an Android widget? How to send search message from code 
outside the wiki?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/ecd7bb5e-80c6-4151-aa97-31bb1db5da8d%40googlegroups.com.


[twdev] How to start node tiddlywiki server programmitcally?

2019-12-25 Thread LinOnetwo
I'd like to create a desktop version, and store all tiddlers on fs or SoLiD 
POD, instead of a HTML file, so I can do search from outside of tiddlywiki 
(for example, spotlight or Alfred).

But I haven’t seen any instruction on how to start 
https://www.npmjs.com/package/tiddlywiki 
 using JS, there is only 
Command Line Usage.

I need something like this to create a fs based wiki:

import tiddlywiki from 'tiddlywiki';

tiddlywiki.init(`~/Document/tiddlywiki/${wikiname}`);

tiddlywiki.start({ location: `~/Document/tiddlywiki/${wikiname}`, plugins: 
[] });

or just start a blank wiki, and sync all tiddlers from BaaS likes SoLiD POD 
later:

import tiddlywiki from 'tiddlywiki';
import solidSyncAdaptor from 'tiddlywiki-solid-sync-adaptor';

tiddlywiki.start({ plugins: [solidSyncAdaptor] });

Can I do this?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/1cb1dddf-1893-4a83-b61a-cbb5e3104422%40googlegroups.com.


[twdev] Re: Ipfs with TiddlyWiki

2019-12-25 Thread LinOnetwo
Hi, I'm curious why you use saver than syncadaptor. I'm working on 
https://github.com/linonetwo/solid-tiddlywiki-syncadaptor and I choose to 
use syncadaptor, what is the difference  between them?

And, are you save each tiddlers saparately? When tiddlywiki needs to load 
skinnytiddlers, how will you do?

在 2019年11月9日星期六 UTC+8下午5:20:35,Xavier Maysonnave写道:
>
> Dear Friends,
>
> I made an announcement about a new version of Ipfs with TiddlyWiki I 
> lately published in the TiddlyWiki group:
>
> https://groups.google.com/forum/#!topic/tiddlywiki/2ZE6akzLg8I
>
> I wanted to make more technical announcements on this group.
>
> The plugin is able to dynamically load two libraries to keep the smallest 
> possible size to be persisted over Ipfs.
> The idea here is to offer a nice read-only experience.
> The js-ipfs-http-client <https://github.com/ipfs/js-ipfs-http-client> is 
> loaded on demand when a user want to save its wiki.
>
> I currently load on demand ethers 
> <https://github.com/ethers-io/ethers.js/> and retrieve the injected web3 
> library from Metamask to interact with the Ethereum network.
> This is going to change soon following the Metamask recent post:
>
> https://medium.com/metamask/breaking-changes-to-the-metamask-inpage-provider-b4dde069dd0a
> Their schedule is tight as they plan to shutdown their web3 library 
> injection mid-december this year.
> They will provide their new api the 25/11.
>
> We discussed with Mario and Jeremy about the idea to chain saver's 
> priority.
> Mario wanted to chain all the savers while Jeremy doubted about this 
> feature.
> In fact I faced a situation where infura.io was so stuck that I was 
> unable to save a document, it was a dead end.
> I implemented what I think a solution in the middle.
> To unlock this dead end I expose through the saver settings the Ipfs saver 
> priority.
> That way a user can easily save its wiki over Ipfs and keep a local copy.
> I signed the CLA and made a PR on the official tiddywiki-com repo. 
> When this PR will be accepted I will do a PR with the low level api to 
> update saver priority.
>
> What's next.
> - code cleanup. I know that I use redundant functions, especially those 
> (Base64ToUint8Array, Uint8ArrayToBase64, StringToUint8Array, Utf8ArrayToStr)
> - Web3 and Ens support is my top priority as it's going to be broken soon.
> - I would like to use the Ethereum encryption system to encrypt and 
> decrypt either attachments and the main wiki (PKI).
> I will start to prototype that with attachments only. Its a mid-term 
> target as I have a lot of experiment to do.
> Metamask is going to publish an api to support plugin soon as you can 
> imagine there is a chance that the browser sandbox model will prevent the 
> wiki to decrypt anything with a private key.
> - I would like to experiment other web3 provider like Frame 
> <https://github.com/floating/frame>
> - More work around Ipfs servers, authentication, web socket, etc...
> I'm looking @ https://universallogin.io/ and/or Provable 
> <https://www.oraclize.it/>.
> - Multisig wallet for team work.
>
> My target is to provide my community a way to store informations in a 
> public or a private way over Ipfs.
> I don't have any more a Facebook page or Linkedin account for instance, I 
> only keep a twitter account for my professional activities, 
> https://twitter.com/xmaysonnave
>
> This effort is part of a bigger project where Tiddly will be used as a 
> medium of exchange between users in a resilient and secure way.
>
> I'm very happy to participate in this community as I'm impressed by the 
> quality of TiddlyWiki and its early Dapp vision.
> I strongly believe that Ipfs and Ethereum will be a great plus.
>
> I will be very happy if anyone could do some code review, make remarks to 
> help and enhance the plugin.
> I'm not a graphic designer so if someone want to do specific svg icons, it 
> will be nice.
> I'm also not a native English speaker, feel free to contact me if you read 
> anything who could be enhanced.
>
> Warmly
>
> Xavier from Auroville / Tamil Nadu / India
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/02602c75-a947-43a7-83b2-66dd2c2ebe62%40googlegroups.com.


[twdev] Re: Update on the syncer rewrite

2019-12-25 Thread LinOnetwo
Cool, hope this can be merge and release soon.

I'm working on https://github.com/linonetwo/solid-tiddlywiki-syncadaptor , 
which will save each tiddlers saparately instead of a whole HTML file.
I hope I can use this syncadaptor to make tiddlywiki a mobile app that can 
use offline and sync when online, with your update

在 2019年12月16日星期一 UTC+8下午7:16:06,Jeremy Ruston写道:
>
> For the last several weeks I've been working on a thorough overhaul of the 
> syncer, and I'm now close to merging those changes into master. I'm posting 
> here now because this is a good opportunity for developers to test projects 
> that may be affected by these changes (eg TiddlyServer, Bob etc.).
>
> The syncer is a core component responsible for two slightly different jobs:
>
> * In the browser, the syncer is used to determine which tiddlers need to 
> be loaded and saved across the network to the server
> * On the server, the syncer is used to determine which tiddlers need to be 
>  saved to the file system
>
> To allow the same component to be used in these two contexts we abstract 
> the loading and saving to a "syncadaptor", with the "tiddlyweb" adaptor in 
> the browser that uses HTTP to talk to the server and the "filesystem" 
> adaptor on the server that uses the Node.js file APIs to write to the 
> filing system.
>
> The primary problem that I've been addressing is that up until now the 
> internal state of the syncer would become corrupt after encountering 
> network connectivity issues. In some situations this has led to users 
> losing data. A fairly deep rewrite was necessary which means that a number 
> of other issues have been addressed at the same time.
>
> The complete list of changes is:
>
>- Improved resilience to connection errors. Errors encountered by the 
>browser are automatically retried, and when they succeed the associated 
>error messages are automatically removed
>- Changes to system tiddlers are now synchronised from the server to 
>the browser
>- Deletions of tiddlers on the server are now synchronised to the 
>browser
>- New animated "cloud” page control button with a dropdown menu 
>showing status and additional actions:
>   - "Refresh from server" to force an immediate check for changes 
>   from the server
>   - "Logout"
>   - "Save snapshot for offline use" to save a copy of the wiki 
>   without the client-server components
>   - "Copy syncer logs to clipboard" to make it easier to ask end 
>   users for debugging information 
>- Added "filter" and "exclude" parameters to the [[GET 
>/recipes/default/tiddlers.json|WebServer API: Get All Tiddlers]] endpoint 
>to allow the returned tiddlers and fields to be filtered
>- Enhanced LazyLoading to include skinny versions of tiddlers in the 
>HTML file, and to avoid unnecessary loads from the server
>- The official plugin library is now disabled when the tiddlyweb 
>adaptor is active
>- Internal file system details are no longer exposed to browsers when 
>a file request fails (see 
>https://github.com/Jermolene/TiddlyWiki5/issues/3724)
>
> All these changes are intended to be backwards compatible, and so I’d be 
> grateful for any feedback before this is merged.
>
> The pull request includes a lot of commentary about the changes:
>
> https://github.com/Jermolene/TiddlyWiki5/pull/4373
>
> Feedback and questions welcome,
>
> Best wishes
>
> Jeremy
>
>
>
>
>
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/4e14d55f-1278-46b4-9502-7072951ab443%40googlegroups.com.


[twdev] Re: How to send message using checkbox widget?

2019-12-24 Thread LinOnetwo
That works, Thank you, Eric! 

And I chage to dash saparated variable, to fit wikitext:

\define check-use-server-story-list()
 <$action-sendmessage $message="tm-solid-use-server-story-list" />
\end

\define uncheck-use-server-story-list()
 <$action-sendmessage $message="tm-solid-not-use-server-story-list" />
\end


<$checkbox field="use-server-story-list" checked="yes" unchecked="no" 
default="yes" checkactions=<> 
uncheckactions=<> >
<>




在 2019年12月25日星期三 UTC+8上午12:36:37,Eric Shulman写道:
>
> On Tuesday, December 24, 2019 at 7:45:17 AM UTC-8, LinOnetwo wrote:
>>
>> I try to use following checkbox, I want the state be sync to my plugin.
>> <$checkbox checkactions="checkUseServerStoryList" 
>> uncheckactions="unCheckUseServerStoryList" 
>> >
>>  <$action-sendmessage $name="checkUseServerStoryList" 
>> $message="tm-solid-useServerStoryList" />
>>  <$action-sendmessage $name="unCheckUseServerStoryList" 
>> $message="tm-solid-notUseServerStoryList" />
>>  <>
>> 
>>
>>
> That is not the correct way to invoke actions from widgets.  
> $action-sendmessage widget does not recognize or use a $name parameter.
>
> Rather, you must use the "\define" syntax to declare the actions as macros 
> to give them names.  Place the following at the start of the tiddler:
> \define checkUseServerStoryList()
><$action-sendmessage $message="tm-solid-useServerStoryList" />
> \end
>
> \define uncheckUserServerStoryList()
><$action-sendmessage $message="tm-solid-notUseServerStoryList" />
> \end
>
> Then, in your checkbox widget, you would write:
> <$checkbox checkactions=<> uncheckactions=<
> > >
>   <>
> 
>
> Alternatively, if you prefer to have the checkbox AND actions written 
> together, you can forego the use of names altogether, and place the actions 
> in-line, within the checkbox syntax, like this:
> <$checkbox
> checkactions="""<$action-sendmessage 
> $message="tm-solid-useServerStoryList"/>"""
>   uncheckactions="""<$action-sendmessage 
> $message="tm-solid-notUseServerStoryList" />""" >
>   <>
> 
> Note that, because the action-sendmessage widget uses double-quotes around 
> the $message parameter, you must use TRIPLED double-quotes surrounding the 
> checkactions and uncheckactions parameters of the checkbox widget.
>
> The first syntax (using \define) is recommended.
>
> That should do it.   Let me know how it goes...
>
> enjoy,
> -e
> Eric Shulman
> InsideTiddlyWiki - http://www.TiddlyTools.com/InsideTW
>
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/781d91a6-1e35-436e-b64c-d285259d1862%40googlegroups.com.


[twdev] How to send message using checkbox widget?

2019-12-24 Thread LinOnetwo
I try to use following checkbox, I want the state be sync to my plugin.

<$checkbox checkactions="checkUseServerStoryList" 
uncheckactions="unCheckUseServerStoryList" >
 <$action-sendmessage $name="checkUseServerStoryList" 
$message="tm-solid-useServerStoryList" />
 <$action-sendmessage $name="unCheckUseServerStoryList" 
$message="tm-solid-notUseServerStoryList" />
 <>


In my plugin I receive that message:

// sync config to here
   $tw.rootWidget.addEventListener('tm-solid-useServerStoryList', () => {
 this.useServerStoryList = true;
 console.log(this.useServerStoryList);
 
   });
   $tw.rootWidget.addEventListener('tm-solid-notUseServerStoryList', () => {
 this.useServerStoryList = false;
 console.log(this.useServerStoryList);
   });
在此输入代码...
But nothing is log out, that is why?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/48fa8f3c-01a0-46de-b99a-c8cac83eeeff%40googlegroups.com.


[twdev] Re: [TW5] Should I load all TiddlerFields (only without text field) of all tiddlers for getSkinnyTiddlers() in sync adaptor?

2019-05-10 Thread LinOnetwo

As @*bourgeoa <https://github.com/bourgeoa>*  said,

when I load the skinnytiddlers without the tags these are not loaded 
> through the load tiddler function.
>
> It was in the specific test where I used an index file containing only the 
> title. I do not change anything to the toddler they remained with all there 
> fields.
> The skinnytiddlers loaded the list of tiddlers as having no tags. Quite 
> normal. Then I manually select and load a tiddler that has tags.
> These tags did not show in the tiddlywiki, neither in the tiddler nor in 
> the tag list.
>
> I did not further explore and decided that skinnytiddlers needed all 
> tiddlerfields except the *text* field.
> As I do not load all tiddlers at startup but only on demand, I keep an 
> index file for performance.
>

在 2019年5月4日星期六 UTC+8下午8:09:38,LinOnetwo写道:

> Sorry I've just found that this forum is based on email, so I update it 
> here:
>
> ---
>
> We are quite not sure about this 
>
>
> https://github.com/bourgeoa/tiddlywiki-node-solid-server/issues/5#issuecomment-489087397
>
> Guessed from the doc:
>
> If an adaptor does implement it, then every 60s (this function get called, 
> by default)
> if there are any changes from other devices to TiddlyWiki store,
> then the modified field will change.
> So TiddlyWiki on this device will know it's changed...then trigger 
> loadTiddler() for it.
>
>
> I'll need to keep an index file storing a list of all tiddler's 
> tiddlerfields (only without their text field), and each time 
> getSkinnyTiddlers() get called, I GET this file and return it. This is 
> expensive on SoLiD backend.
>
> So if i've guessed right, I can only return a list of title field and 
> modified field, then TiddlyWiki will have enough information to decide 
> whether to trigger loadTiddler().
> Am I right?
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/d28c1e37-d302-49cf-b1e5-2c68656309f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Want to translate your plugins or documentation? Try the i18n macro

2019-05-09 Thread LinOnetwo
I will definitely use this, thank you for creating this.

在 2019年5月7日星期二 UTC+8下午8:22:01,SylvainComte写道:
>
> HelloThere,
>
> I wished i was able to translate some documentation of my plugins, so I 
> made this i18n macro, lightweight, easy to deploy within the plugins. Some 
> would rather call it L10N than I18N though...
>
>- <> macro 
>
> 
>
> Maybe you'll find it useful. I do (eating my own dogfood is a moto)
>
> cheers
>
> *Sylvain*
> @sycom
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/a08a12ee-2fd2-4969-91bd-3721542f8099%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Progressive Web Apps

2019-05-09 Thread LinOnetwo
We are thinking about adding SW to TW 
https://github.com/linonetwo/solid-tiddlywiki-syncadaptor/issues/3 this is 
the first step towards PWA. When user if offline, sync adaptor can save to 
cache and load cached tiddler after refresh, so TW can be used offline.

I don't know whether TW core needs a SW, since TW core is self contained, 
it doesn't fetch additional resources.

You can use https://app-manifest.firebaseapp.com to generate manifest.json 
so browser will cache some assets, and don't need to download full wiki 
every time. For example an App Shell that renders before TW core loads.

Use chrome devtool 
https://developers.google.com/web/tools/lighthouse/#devtools to test if 
it's PWA engough. 

在 2019年5月9日星期四 UTC+8下午3:13:23,TonyM写道:
>
> Folks,
>
> In my internet research I stumbled upon the PWA or Progressive Web Apps, 
> Abraham makes mention of it in Maarfapad 
> https://groups.google.com/forum/?hl=en#!searchin/tiddlywiki/PWA%7Csort:date/tiddlywiki/t2_NJN9Rlx4/oryYtM9OBQAJ
>
> However I have not seen much references to it in TiddlyWiki otherwise. 
> Google and others seem to be supporting this approach and it results in 
> device and browser independance.
>
> https://en.wikipedia.org/wiki/Progressive_web_applications
>
> It seems to me that TiddlyWiki is not far from being fully compliant, and 
> a plugin, instructions etc... to turn any tiddlywiki into a PWA 
>
> Here is a builder https://www.pwabuilder.com
>
> What do our hard core developer coders think?
>
> Regards
> Tony
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/00d2a089-9c83-43fd-92b4-7b656e3a665c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Pros and cons with TW5, as discussed in another group

2019-05-04 Thread LinOnetwo
Hi Mat

Nowadays, most famous to-C Web Apps are Single Page App, likes Notion and 
Evernote, they both supports "export as single zip" and "sync to backend".

And TW also supports "export as single HTML" and "sync to backend", so 
about saving, TW don't have much downside, It's even being superior due to 
it is an open software (you own your data), and it's open for developers to 
connect it to new BaaS, for example, SoLiD or FileCoin.

For the writing experience, It has more significant Pros and Cons.

I think it has best editing experience among all semantic wikis, UI and 
learning curve is better than semantic media wiki.

But It has middle editing experience among team workspaces, for example, 
Quip and Notion have WYSIWYG editor, and don't have "draft", you can sync 
to backend immediately. TW can enable teamwork if you choose some backend, 
but there won't be realtime collaboration, syncadaptor can't help with that.

For personal KB part, I think it's the best, personal KB don't need 
realtime syncing, but need KB and methods to reuse data from KB, Notion can 
partially do that, but its API is very limited.

Coda  can build CRM by composing macros, but its 
macro pool is way small than TW, Con on TW is that TW's macro needs to dive 
in and learn and find out (no such a macro market), and there is no a "/" 
menu (open a menu to select macro when you hit "/") to select macro, it all 
depends on your brain to remember.

Anyway, I think except for the realtime collaboration part, all other Cons 
can be overcome by plugins, all TW needs is time, it's open, so people will 
contribute to it.


在 2019年5月4日星期六 UTC+8下午10:40:26,Mat写道:
>
> I found this thread  
> in a different forum, that discusses pros and cons with TW5. I think it is 
> particularly valuable to hear from people who both are informed and who 
> have decided to not use TW because these people typically don't bother to 
> post on our own boards. No "back patting" so to say.
>
> Can we draw any constructive conclusions from the discussion there?
>
> <:-)
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/461b3c5e-6eba-4a1e-9877-67981f6d3665%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: [TW5] Should I load all TiddlerFields (only without text field) of all tiddlers for getSkinnyTiddlers() in sync adaptor?

2019-05-04 Thread LinOnetwo
Thank you, Jeremy,

I decide to use the following strategy to speed up the initial load speed:


   1. only load title from the container on the startup.
   2. load all metadata (maybe a little expensive) on the second 
   getSkinnyTiddlers(), maybe these metadata will be used in searching? (*I'm 
   not sure about this*!)
   3. only load title and modified from the container on subsequent 
   getSkinnyTiddlers(), only for TW to determine whether to trigger 
   loadTiddler(). (In case you have changes from other devices or other people 
   in your collaboration team.)


Best wishes

LinOneTwo

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/75e966bc-a563-4d2f-b3b9-bdb770fc7f7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] [TW5] Should I load all TiddlerFields (only without text field) of all tiddlers for getSkinnyTiddlers() in sync adaptor?

2019-05-04 Thread LinOnetwo
Sorry I've just found that this forum is based on email, so I update it 
here:

---

We are quite not sure about this 

https://github.com/bourgeoa/tiddlywiki-node-solid-server/issues/5#issuecomment-489087397

Guessed from the doc:

If an adaptor does implement it, then every 60s (this function get called, 
by default)
if there are any changes from other devices to TiddlyWiki store,
then the modified field will change.
So TiddlyWiki on this device will know it's changed...then trigger 
loadTiddler() for it.


I'll need to keep an index file storing a list of all tiddler's 
tiddlerfields (only without their text field), and each time 
getSkinnyTiddlers() get called, I GET this file and return it. This is 
expensive on SoLiD backend.

So if i've guessed right, I can only return a list of title field and 
modified field, then TiddlyWiki will have enough information to decide 
whether to trigger loadTiddler().
Am I right?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/998ad703-530c-461d-ab89-2eef314fadea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Should I load all tiddlers' all tiddlerfields (only without text field) for getSkinnyTiddlers() ?

2019-05-03 Thread LinOnetwo
Update...
---
We are quite not sure about this 
https://github.com/bourgeoa/tiddlywiki-node-solid-server/issues/5#issuecomment-489087397

Guessed from the doc:

If an adaptor does implement it, then every 60s (this function get called, 
by default)
if there are any changes from other devices to TiddlyWiki store,
then the modified field will change.
So TiddlyWiki on this device will know it's changed...then trigger 
loadTiddler() for it.


I'll need to keep an index file storing a list of all tiddler's 
tiddlerfields (only without their text field), and each time 
getSkinnyTiddlers() get called, I GET this file and return it. This is 
expensive on SoLiD backend.

So if i've guessed right, I can only return a list of title field and 
modified field, then TiddlyWiki will have enough information to decide 
whether to trigger loadTiddler().
Am I right?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/ca12883b-0170-4c9c-b038-7f854fb93592%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Should I load all tiddlers' all tiddlerfields (only without text field) for getSkinnyTiddlers() ?

2019-05-03 Thread LinOnetwo
We are quite not sure about this 
https://github.com/bourgeoa/tiddlywiki-node-solid-server/issues/5#issuecomment-489087397

If so, I where will these fields used? I guess, allow searching without 
search text?

I'll need to keep an index file storing a list of all tiddler's 
tiddlerfields (only without their text field), and each time 
getSkinnyTiddlers() get called, I GET this file and return it. 

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/29494325-dc37-4e78-bf2a-984503dd3ef7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] What does bag actuall means

2019-05-02 Thread LinOnetwo
tiddlyweb use bag for the location path it stores a tiddler.
https://github.com/Jermolene/TiddlyWiki5/blob/c05c0d3df66e587f35c5cd3eedcac432b1eed012/plugins/tiddlywiki/tiddlyweb/tiddlywebadaptor.js#L229

What does it actually means?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/ca70c2b6-0a8b-4e96-8348-044cd5024fca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: What is that browser-messaging in the console?

2019-05-02 Thread LinOnetwo
Hi,

I'm running 

tiddlywiki demo-wiki --listen host=localhost

Maybe it's from some filesystem syncadaptor?

I'm overwhelmed by the message generated, my own debug console.log are 
washed away by those logs...


在 2019年5月2日星期四 UTC+8下午5:54:14,PMario写道:
>
> Hi, 
>
> There is no browser-messaging.js module in the TW core.  Which system 
> do you use?
>
> -m
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/3674efbe-e577-430c-987d-690c6a4ca37d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] How to support multiple languages in my plugin?

2019-05-02 Thread LinOnetwo
How can 
\define lingo-base() $:/language/ControlPanel/Saving/SoLiD/Config
automatically change based on current language selected by user?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/e73ec75f-c3dd-4825-a2cf-b012ee2264a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: How to deal with window is not defined

2019-05-02 Thread LinOnetwo
I finally use this webpack config:

const path = require('path');
require('dotenv').config();

module.exports = {
  devtool: process.env.NODE_ENV === 'development' ? 'inline-source-map' : 
false,
  entry: './src/index.js',
  output: {
filename: 'SyncAdaptor.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'commonjs',
  },
  module: {
rules: [
  {
test: /\.js$/,
exclude: /node_modules/,
use: {
  loader: 'babel-loader',
},
  },
],
  },
  optimization: {
minimize: process.env.NODE_ENV !== 'development',
  },
  externals: [],
};
在此输入代码...


And use a index.js to guard if it's browser:

// prevent execution on server side, or there will be ReferenceError: 
window is not defined raised from solid-auth-client
if (typeof window !== 'undefined') {
  require('./SyncAdaptor');
}

Then it's fine to import browser only npm packages.



-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/01e4852d-a2ec-40e1-8acb-194f268074ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] What is that browser-messaging in the console?

2019-05-02 Thread LinOnetwo
It's quite much

browser-messaging:  http://127.0.0.1:8080/ 
$:/core/modules/browser-messaging.js:148:3
browser-messaging: Received message from https://solid.community 
$:/core/modules/browser-messaging.js:149:3
browser-messaging: Message content 
Object { "solid-auth-client": {…} }
$:/core/modules/browser-messaging.js:150:3
browser-messaging:  http://127.0.0.1:8080/ 
$:/core/modules/browser-messaging.js:148:3
browser-messaging: Received message from https://solid.community 
$:/core/modules/browser-messaging.js:149:3
browser-messaging: Message content 
Object { "solid-auth-client": {…} }
$:/core/modules/browser-messaging.js:150:3
browser-messaging:  http://127.0.0.1:8080/ 
$:/core/modules/browser-messaging.js:148:3
browser-messaging: Received message from https://solid.community 
$:/core/modules/browser-messaging.js:149:3
browser-messaging: Message content 
Object { "solid-auth-client": {…} }
$:/core/modules/browser-messaging.js:150:3
browser-messaging:  http://127.0.0.1:8080/

Can it be turn off in the tiddlywiki cli?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/792388e4-6714-4d49-92c5-587f9193a39c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: How to deal with window is not defined

2019-05-01 Thread LinOnetwo
This is a typical SSR issue, use following webpack config solves it:

output: {
globalObject: 'this',
},

在 2019年5月2日星期四 UTC+8上午12:36:07,LinOnetwo写道:
>
> if ($tw && $tw.browser) exports.adaptorClass = SoLiDTiddlyWikiSyncAdaptor
>
> But when starting tiddlywiki from command line, it still throws 
>
> ReferenceError: window is not defined
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/eefdb42e-37f8-4522-9e77-3d6b30661d75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: How to deal with window is not defined

2019-05-01 Thread LinOnetwo
How can I prevent tiddlywiki run this plugin on nodejs?

在 2019年5月2日星期四 UTC+8上午12:36:07,LinOnetwo写道:
>
> if ($tw && $tw.browser) exports.adaptorClass = SoLiDTiddlyWikiSyncAdaptor
>
> But when starting tiddlywiki from command line, it still throws 
>
> ReferenceError: window is not defined
>

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/b8e18333-38a1-478b-ac39-08c2eda60caa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] How to deal with window is not defined

2019-05-01 Thread LinOnetwo
if ($tw && $tw.browser) exports.adaptorClass = SoLiDTiddlyWikiSyncAdaptor

But when starting tiddlywiki from command line, it still throws 

ReferenceError: window is not defined

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/3ea9efa1-ca8c-4419-b8a5-8a864d9f3df9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Will state likes tab-1749438307 change in the future?

2019-05-01 Thread LinOnetwo
In this page https://tiddlywiki.com/static/ActionSetFieldWidget.html
How do you know state is inside $:/state/tab-1749438307?
Will this value change in the future?

-- 
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 tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/16145e58-46b8-4967-a884-b0426c3210b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.