[twdev] How to transform HTML nodes to tiddler's tree?

2018-08-16 Thread bimlas
I'm working on a parser plugin to render Asciidoctor formated text.

The plugin is using Asciidoctor.js 
(https://github.com/asciidoctor/asciidoctor.js) and basically works, but 
the content of the tiddler is the HTML code itself instead of the correctly 
rendered text. For example if I creating a new tiddler with the content

  *bold* _italic_

then it's transforming to

   bold italic 


when I save the tiddler. (screenshot: https://i.imgur.com/aHtHneJ.png)

As I looked in to the Markdown parser plugin, it seems that the Markdown.js 
returns a HTML tree (thanks to JsonML). I assume my plugin should do the 
same, but there is no option for this in Asciidoctor.js. How can I achieve 
this? Is there a builtin method to transform HTML nodes to HTML tree or 
should I use JsonML?

To try out:

* Clone https://github.com/bimlas/tiddlyWiki5/ and check out 
`asciidoctor-plugin` branch, or simply download 
https://github.com/bimlas/TiddlyWiki5/archive/asciidoctor-plugin.zip
* Run `bin/serve.sh editions/full`
* Press the second Markdown icon in the right panel (move the mouse over 
it, the tooltip should be related to Asciidoctor)
* Write `*bold* _italic_` in it and save the tiddler

-- 
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/e223b36a-353e-43c2-aaef-72b72de34d92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] How to transform HTML nodes to tiddler's tree?

2018-08-18 Thread bimlas
Thanks for the advice. I just found a way to transform HTML to node tree 
(?), now the plugin works nicely 
(screenshot: https://i.imgur.com/VMyePPW.png). I'll have to do some makeup, 
but basically everything seems to be OK. How should I do a pull request: 
using the plugins/tiddlywiki/asciidoctor is right or should I move under my 
own "namespace" (plugins/bimlas/asciidoctor)? Should I keep on my own repo 
without sending a PR, will you merge by yourself if you like the plugin?

-- 
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/a7abd9cb-703e-4dfc-a8c3-9dccf27773b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Plugin works only in the example wiki

2018-08-29 Thread bimlas
Found the root of the problem: Asciidoctor.js does not works without 
dependencies on Node. For details, 
see https://github.com/asciidoctor/asciidoctor.js/issues/539

-- 
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/e56cffbc-be14-4569-8ddd-82c6bcc5dfee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Plugin works only in the example wiki

2018-08-29 Thread bimlas
Thanks for help! I just solved the problem, the plugin is working on both 
Node and single page 
versions: https://groups.google.com/d/msg/tiddlywiki/PvoDxAWgziE/A0Ys8vWHAwAJ

-- 
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/8efee867-9856-4d97-aaa7-3d5db407d06d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Plugin works only in the example wiki

2018-08-27 Thread bimlas
Hi!

I just created a plugin to parse Asciidoctor in TiddlyWiki:

http://bimlas.gitlab.io/tw5-asciidoctor/

It works but only in this wiki - when I trying to install to my own, then 
it prints the following error after restart:

Internal JavaScript Error 
Well, this is embarrassing. It is recommended that you restart TiddlyWiki 
by refreshing your browser 
Uncaught TypeError: Cannot read property 'call' of undefined


Screenshot:  https://i.imgur.com/0EEC32l.png

Somebody can help me to find the problem? The source code of the plugin can 
be found at https://gitlab.com/bimlas/tw5-asciidoctor

-- 
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/45526661-3d3e-4282-bcfc-919c9342337d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Plugin works only in the example wiki

2018-08-27 Thread bimlas
Just tried out to install Markdown plugin, it shows the same warning 
message on terminal:

For $:/plugins/tiddlywiki/markdown, type is application/json hasMetaFile is 
false filepath is /home/nyolcas/src/tiddly-test/tiddlers/
$__plugins_tiddlywiki_markdown.tid

-- 
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/7ad4e7e6-7bd7-4f65-8b24-a5e4981b25b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Plugin works only in the example wiki

2018-08-27 Thread bimlas
Maybe I found something - I looked at the wrong place for logs: the 
terminal contains warning messages besides the developer console:

┌─[23:27] ~/src/tiddly-test
└─ $ tiddlywiki --init server
Copied edition 'server' to /home/nyolcas/src/tiddly-test


┌─[23:27] ~/src/tiddly-test
└─ $ tiddlywiki --server 
Serving on 127.0.0.1:8080
(press ctrl-C to exit)
 syncer-server-filesystem: Dispatching 'save' task: $:/StoryList 
For $:/StoryList, type is application/x-tiddler hasMetaFile is false 
filepath is /home/nyolcas/src/tiddly-test/tiddlers/$__StoryList.tid
 filesystem: Saved file /home/nyolcas/src/tiddly-test/tiddlers/$__StoryList.tid 

 syncer-server-filesystem: Dispatching 'save' task: $:/StoryList 
 filesystem: Saved file /home/nyolcas/src/tiddly-test/tiddlers/$__StoryList.tid 

 syncer-server-filesystem: Dispatching 'save' task: $:/StoryList 
 filesystem: Saved file /home/nyolcas/src/tiddly-test/tiddlers/$__StoryList.tid 


 # THIS IS WHERE I DROPPED THE PLUGIN IN TO THE WIKI

 syncer-server-filesystem: Dispatching 'save' task: 
$:/plugins/bimlas/asciidoctor 

For $:/plugins/bimlas/asciidoctor, type is application/json hasMetaFile is 
false filepath is /home/nyolcas/src/tiddly-test/tiddlers/
$__plugins_bimlas_asciidoctor.tid
 filesystem: Saved file /home/nyolcas/src/tiddly-test/tiddlers/
$__plugins_bimlas_asciidoctor.tid 

The interesting part is this:

For $:/plugins/bimlas/asciidoctor, type is application/json hasMetaFile is 
false filepath is /home/nyolcas/src/tiddly-test/tiddlers/
$__plugins_bimlas_asciidoctor.tid

... but a similar message was shown above (with plain, newly created wiki):

For $:/StoryList, type is application/x-tiddler hasMetaFile is false 
filepath is /home/nyolcas/src/tiddly-test/tiddlers/$__StoryList.tid

Thus I don't think that this is a real bug - if the plain Tiddly shows the 
same, then it's OK. ... A plain wiki without any tiddlers... Hmm... I have 
to check the filelist...

Nope, the filenames and plugin.info seems to be OK (see the code 
at https://gitlab.com/bimlas/tw5-asciidoctor/tree/master and the tiddlers 
inside the plugin's contents). I compared it to the Markdown plugin 
(https://tiddlywiki.com/plugins/tiddlywiki/markdown/), this is what I 
modified to use Asciidoctor.

I don't know... Maybe it's a bug in Tiddly? What works on single HTML does 
not works on Node?

-- 
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/b1e4f845-22f7-42b2-b355-f883a8309c30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Plugin works only in the example wiki

2018-08-27 Thread bimlas
This is how I bundling the plugin (if this helps):

https://gitlab.com/bimlas/tw5-asciidoctor/blob/6c74c727e26b5211d3cfc4c0fd720c99d119212f/.gitlab-ci.yml

The tiddlers of the wiki (eg. Example) are on `gl-pages` branch, this is 
why I checking out 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/7a5fab26-eeaf-44f8-b574-ef1a72cac3b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Plugin works only in the example wiki

2018-08-27 Thread bimlas
Sorry, just realized that the project was private... (-_-') Now it's 
available to view.

-- 
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/d605d2ff-fbc0-4c0e-90ab-8a3a044c087b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Plugin works only in the example wiki

2018-08-27 Thread bimlas
No, it's not finished - the problem still exists, but the source code was 
private.

-- 
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/3256ba00-f5b8-4e97-aaa9-668740be6380%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Custom filter operator overriding the results

2018-10-18 Thread bimlas
I working on a filter operator that gathering the "family" of a tiddler, 
the "field of connection" can be set (defaults to "tags"):

[kindred:[]]

For details, 
see https://groups.google.com/d/msg/tiddlywiki/VeRlS9Qti8I/CX3F7P62BwAJ
Example wiki is attached 
to https://groups.google.com/d/msg/tiddlywiki/VeRlS9Qti8I/UmcavFe_BwAJ
The current version of the code itself (which works only on prerelease 
version, needs restart after importing) is 
on 
https://github.com/bimlas/TiddlyWiki5/blob/f5790f0973d8c46156cd6ad995491732cbc16b2f/core/modules/filters/kindred.js

About my problem:

The filter works well if I using only one at a time, for example:

[[Drag and Drop]kindred[]]

It's returning the "family" of "Drag and Drop" (every tiddler related to it 
by tag, recursively):

   - Features
   - TableOfContents 
   - $:/tags/SideBar 
   - DragAndDropMechanism

The problem comes alive when I try to filter this list by another "kindred" 
filter:

[[Drag and Drop]kindred[]] +[[Features]kindred[]]

With this expression, I would like to get the intersection of the two 
lists, but it's returning only the results of the second expression. I 
tried to swap the expressions, in this case the "family" of "Drag and Drop" 
shown, thus I'm sure that my operator overriding the results list at all. I 
did another probe:

[[Features]kindred[]] +[tag[Drag and Drop]]

Only "DragAndDropMechanism" is shown in the list (which is good), but when 
I swap the expressions:

[tag[Drag and Drop]] +[[Features]kindred[]]

than the "family" of "Features" is listed.

I looked at another filter operators ("tag" for example), but I cannot 
recognize the root of the problem: my operator seems to be correct.

What I doing wrong?

Again, here's the current code (try on prerelease, restart after 
importing): 
https://github.com/bimlas/TiddlyWiki5/blob/f5790f0973d8c46156cd6ad995491732cbc16b2f/core/modules/filters/kindred.js

-- 
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/5a4ae310-e891-49c3-b1dc-6bcbbc41ce0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Custom filter operator overriding the results

2018-10-19 Thread bimlas
I just fixed the issue, 
see https://groups.google.com/d/msg/tiddlywiki/VeRlS9Qti8I/IJOM5p4TCAAJ for 
a working demo 
and 
https://github.com/bimlas/TiddlyWiki5/blob/5890ea92cea5252003c5d122e7f408c6ce1c69de/core/modules/filters/kindred.js
 
for the code.

-- 
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/b934c15a-b60c-408b-850c-9e13304b27c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Custom filter operator overriding the results

2018-10-19 Thread bimlas
Ok, I think I found the problem:

I misunderstood the + operator, because I thought that it means 
"intersection". I just 
read 
https://tiddlywiki.com/static/Introduction%2520to%2520filter%2520notation.html 
-> Combination which says that the results of the first filter is the input 
to the second (+ signed) filter. So my filter operator not works, because

+[[Features]kindred[]]

is overwriting the "input" and replacing it with "Features" tiddler.

I just made some small modifications on the code, 
see https://github.com/bimlas/TiddlyWiki5/tree/kindred-filter branch for 
the latest.

-- 
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/0c2e22cb-3032-4706-bbcb-281550e1956f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Big list of TWs

2018-10-02 Thread bimlas
Here's an already exist "big list":

https://www.reddit.com/r/TiddlyWiki5/wiki/index

Check Plugins/Resources and Other User generated TiddlyWikis

-- 
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/526fa1fd-484b-4b8e-bcc3-3a8e5eb35a2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Programmatic generation of macros

2018-11-20 Thread bimlas
Just played with nested macro 
definitions: https://bimlas.gitlab.io/demo/tw5/nested-macro-definition.html

If I could use variables in transclusion, I could modify 
https://bimlas.gitlab.io/demo/tw5/generate-macros-by-tags.html 

 to 
let it work, but the macro is exists only "inside" wikify widget, you 
cannot acces it from outside.

-- 
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/2ba43cde-9356-4a38-90e4-a9ff36799da0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Programmatic generation of macros

2018-11-20 Thread bimlas
It's not an answer, but maybe helps: 
https://tobibeer.github.io/tb5/#Ad-Hoc%20Macro

-- 
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/d2b28575-5610-45b3-a7de-5c1eb7b69eba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Simple script to sync TW to Git Repo

2018-09-18 Thread bimlas
It seems to work, but storing the password in the remote URL seems to be a 
bad idea for me: `git remote show origin` prints the password as is.

BTW here's a .gitlab-ci.yml to generate HTML for GitLab 
Pages: 
https://gitlab.com/bimlas/bimlas.gitlab.io/blob/250f1cb4bd70f9311e11c2c90924b85381970027/.gitlab-ci.yml
It's generating index.html from the .tid files, but it restricted to 
`master` branch.

-- 
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/915513a7-c3cf-4703-aed8-8d19b1254a18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: First call for planned release of v5.1.20

2019-06-18 Thread bimlas
I'm very sorry, but it was a false alarm, 
see https://github.com/Jermolene/TiddlyWiki5/issues/3998#issuecomment-503312664

-- 
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/d977557c-566a-40ab-b7e1-b47010e26133%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: First call for planned release of v5.1.20

2019-06-18 Thread bimlas
Maybe it's just the plugin's fault, but it seems that for some reason the 
Kin filter is slower on prerelease (heavily using cache mechanism). I don't 
know if it's a new indexing system or a performance log issue.

The code of the 
filter: 
https://github.com/bimlas/tw5-kin-filter/blob/66e2cbbf85761daa4c33e9c422db0fce3b6ea6f9/plugins/kin-filter/kin.js

Steps of testing:

   - Download current and prerelease
   - Install Kin filter from https://bimlas.gitlab.io/tw5-kin-filter/
   - Enable performance instrumentation
   - Save and reload wikis
   - Close all opened tiddlers and open "Open" sidebar
   - Open Developer Tools Console
   - Use "[kin::to[TableOfContents]]" filter in Advanced Search

Results for me on Windows:

   - Chrome 75.0.3770.90
  - Current:
 - mainRefresh: 861.93ms 
 - +filter: 691.76ms
  - Prerelease
 - mainRefresh: 1317.06ms 
 - (from $tw.perf.log()) filter "[kin::to[TableOfContents]]"; 
 invocations 3; avgTime 331.3600013155; totalTime 
994.080003946; 
 percentTime 78.02397042426841
 - Firefox 67.0.2
  - Current
 - 
 - mainRefresh: 890.00ms
 - +filter: 657.00ms 
  - Prerelease
 - mainRefresh: 1108.00ms 
 - 
 - (from $tw.perf.log()) filter "[kin::to[TableOfContents]]"; 
 invocations 3; avgTime 270; totalTime 810; percentTime 
71.87222715173026
  

-- 
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/f549acfa-fc56-4826-9d7a-bac9bd63aa93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: First call for planned release of v5.1.20

2019-06-18 Thread bimlas
The results of the first two case are above, so I just doing the test again 
on prerelease with disabled indexing:


   - Chrome:
  - Prerelease
 - mainRefresh: 1206.61ms
 - (from $tw.perf.log()) filter "[kin::to[TableOfContents]]"; 
 invocations 3; avgTime 300.819991727; totalTime 902.45997518; 
 percentTime 82.29843968466753
 - Firefox
  - Prerelease
 - mainRefresh: 1141.00ms
 - (from $tw.perf.log()) filter "[kin::to[TableOfContents]]"; 
 invocations 3; avgTime 275; totalTime 825; percentTime 
 47.79837775202781
 
The results of Firefox are almost the same, but percentTime differs a much! 
Tried to run the filter again multiple times (indexing still disabled):


   - Chrome:
  - Prerelease
 - mainRefresh: 1285.50ms 
 - (from $tw.perf.log()) filter "[kin::to[TableOfContents]]"; 
 invocations 15; avgTime 523.386669201; totalTime 
7850.80003801; 
 percentTime 88.23785602723082
 - Firefox
  - Prerelease
 - mainRefresh: 1078.00ms
 - (from $tw.perf.log()) filter "[kin::to[TableOfContents]]"; 
 invocations 15; avgTime 376.94; totalTime 5654; 
 percentTime 81.83528730641193
  


2019. június 18., kedd 10:59:26 UTC+2 időpontban Jeremy Ruston a következőt 
írta:
>
> Hi Bimlas
>
> Thanks for the report, that’s very helpful.
>
> There’s quite a lot that’s changed between v5.1.19 and the current 
> prerelease, not just the indexing. One quick thing to try might be to make 
> some more timings while manually enabling and disabling the indexing 
> mechanism in the prerelease.
>
> The easiest way to disable the indexing is to overwrite the following two 
> tiddlers with new tiddlers that don’t have a module-type field:
>
> $:/core/modules/indexers/field-indexer.js
> $:/core/modules/indexers/tag-indexer.js
>
> Then we’d be able to compare three timings:
>
> * v5.1.19
> * v5.1.20-prerelease (including indexing)
> * v5.1.20-prerelease (without indexing)
>
> Many thanks,
>
> Jeremy.
>
> On 18 Jun 2019, at 07:30, bimlas > wrote:
>
> Maybe it's just the plugin's fault, but it seems that for some reason the 
> Kin filter is slower on prerelease (heavily using cache mechanism). I don't 
> know if it's a new indexing system or a performance log issue.
>
> The code of the filter: 
> https://github.com/bimlas/tw5-kin-filter/blob/66e2cbbf85761daa4c33e9c422db0fce3b6ea6f9/plugins/kin-filter/kin.js
>
> Steps of testing:
>
>- Download current and prerelease
>- Install Kin filter from https://bimlas.gitlab.io/tw5-kin-filter/
>- Enable performance instrumentation
>- Save and reload wikis
>- Close all opened tiddlers and open "Open" sidebar
>- Open Developer Tools Console
>- Use "[kin::to[TableOfContents]]" filter in Advanced Search
>
> Results for me on Windows:
>
>- Chrome 75.0.3770.90
>   - Current:
>  - mainRefresh: 861.93ms 
>  - +filter: 691.76ms
>   - Prerelease
>  - mainRefresh: 1317.06ms 
>  - (from $tw.perf.log()) filter "[kin::to[TableOfContents]]"; 
>  invocations 3; avgTime 331.3600013155; totalTime 
> 994.080003946; 
>  percentTime 78.02397042426841
>  - Firefox 67.0.2
>   - Current
>  - 
>  - mainRefresh: 890.00ms
>  - +filter: 657.00ms 
>   - Prerelease
>  - mainRefresh: 1108.00ms 
>  - 
>  - (from $tw.perf.log()) filter "[kin::to[TableOfContents]]"; 
>  invocations 3; avgTime 270; totalTime 810; percentTime 
> 71.87222715173026
>   
>
> -- 
> 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 post to this group, send email to tiddly...@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/f549acfa-fc56-4826-9d7a-bac9bd63aa93%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/f549acfa-fc56-4826-9d7a-bac9bd63aa93%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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/9f1ddb56-9ca6-4133-9e64-c8625036ae32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Progressive Web Apps

2019-05-09 Thread bimlas
Hi TonyM!

I've heard the PWA phrase, but I didn't know what it was. Seems to be very 
useful area.

Whether Tiddly can be PWA, I'm not sure. According to 
https://developers.google.com/web/progressive-web-apps/checklist

   - First load fast even on 3G:
   ...verify time to interactive <10s for first visit...
   - Site's content is indexed by Google
   - (not sure) Pages use the History API
   For single page apps, ensure the site doesn't use fragment identifiers. 
   For example everything after the #! in https://example.com/#!user/26601.
   
In addition, if I understand well, the "core" of PWA will not change as 
tw.com cannot be changed, the newly added tiddlers will be lost when the 
page is reloaded. In this form, it would be possible to TW as a PWA by 
using different savers (TiddlySpot, GitHub, etc.), but without them, it 
would not be possible to save the changes (as you download the single HTML 
and next time you open the downloaded version to continue extending your 
notes).


2019. május 9., csütörtök 9:13:23 UTC+2 időpontban TonyM a következőt írta:
>
> 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/350ba581-5467-4690-861f-ae8984d3e549%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] How to use Node modules in browser?

2019-07-11 Thread bimlas
Dear all,

In a Node.js Javascript project, I want to use TiddlyWiki to display data.

To run Node methods, I need to create modules with "module-type: 
utils-node" (if I understand it well), thus I can reach them through 
$tw.utils. These will only be loaded by TiddlyWiki if $:/info/node is "yes" 
(so the value of $tw.node is not null). I have several Node wiki, checked 
in each (in the browser), but it seems that nowhere does it detects that 
the wiki is running under Node, because viewing $:/info/node in the browser 
says "no".

I'm confused, because if I check in the code, it detects that it is running 
under Node.

$tw.boot.argv = ['myproject', '--listen'];
$tw.boot.boot();


console.log($tw.node);
// {}
console.log($tw.wiki.getTiddlerText('$:/info/node'));
// yes

If I create a widget that uses this Node module, it doesn't work in the 
browser, instead of the widget, RSOD appears: $tw.utils.myNodeFunction is 
not a function

My question is how can I use the Node module in the browser?

-- 
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/4acae129-913e-4be6-a925-71bb998a5aa2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: How to use Node modules in browser?

2019-07-11 Thread bimlas
Maybe it's basically a bad way of thinking, so I am reformatting the 
question: how can I use NPM modules in a widget?

-- 
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/72c2fe2f-b746-4a2b-9d50-224b6e18ff4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: How to use Node modules in browser?

2019-07-11 Thread bimlas
The sync mechanism seems to be usable, I go around the topic, thank you for 
the idea!

PS.: According to your comment 
, 
if you would like GitLab saver to 5.1.20, please merge the request 
, otherwise mark it 
with "post-v5.1.20" just to give me some feedback. :) 

-- 
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/0a206645-1cfa-4de9-9563-f4b91dc43bf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: How to use Node modules in browser?

2019-07-11 Thread bimlas
To be clear: I need Node because I want to use NPM modules.

2019. július 11., csütörtök 11:34:31 UTC+2 időpontban bimlas a következőt 
írta:
>
> Dear all,
>
> In a Node.js Javascript project, I want to use TiddlyWiki to display data.
>
> To run Node methods, I need to create modules with "module-type: 
> utils-node" (if I understand it well), thus I can reach them through 
> $tw.utils. These will only be loaded by TiddlyWiki if $:/info/node is "yes" 
> (so the value of $tw.node is not null). I have several Node wiki, checked 
> in each (in the browser), but it seems that nowhere does it detects that 
> the wiki is running under Node, because viewing $:/info/node in the browser 
> says "no".
>
> I'm confused, because if I check in the code, it detects that it is 
> running under Node.
>
> $tw.boot.argv = ['myproject', '--listen'];
> $tw.boot.boot();
>
>
> console.log($tw.node);
> // {}
> console.log($tw.wiki.getTiddlerText('$:/info/node'));
> // yes
>
> If I create a widget that uses this Node module, it doesn't work in the 
> browser, instead of the widget, RSOD appears: $tw.utils.myNodeFunction is 
> not a function
>
> My question is how can I use the Node module in the browser?
>

-- 
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/3e0d6bc9-86c3-443c-8146-81acc7c98809%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: How to use Node modules in browser?

2019-07-11 Thread bimlas
Jeremy,

Thank you for your reply, but I still don't understand that although it can 
recognize Node in the code, $:/info/node is always "no" in the browser, so 
it does not load utils-node modules. How do I use them, for example, in 
widgets? For example, if I want to use the $tw.utils.getEditionInfo() 

 
method in my browser, how do I do 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/bb100b08-1aea-4ea2-9096-03680064faba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[twdev] Re: Hey plugin authors! Where do you serve your plugins?

2019-07-12 Thread bimlas
I think the first point covers most of the cases, but I can still imagine 
that you are storing JSON tiddlers in a shared Dropbox.

Otherwise, it would be best to have community plugins listed directly in 
the TW.com plugin library. If it had any categorization, it could 
completely replace the TiddlyWiki Toolmap 
.

-- 
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/99c0888a-46b1-4e56-b690-5eda72ebcebb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [twdev] Re: How to use Node modules in browser?

2019-08-27 Thread bimlas
I think I found the solution: I have to use this (after the tiddler is 
modified) in the browser (by an ActionWidget for example):

  $tw.utils.nextTick(function() {
$tw.syncer.enqueueSyncTask({type: "load", title: 
"$:/communicate-with-server"})
  });

-- 
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/030d5158-3cac-472c-8044-5c48284b40f1%40googlegroups.com.


Re: [twdev] Re: How to use Node modules in browser?

2019-08-27 Thread bimlas
Jeremy,

... have the browser create a tiddler with some flags that gets synced to 
> the server. The serverside code picks up the tiddler (by searching for the 
> same flags), and then performs some operation, putting the results back in 
> the same tiddler.
>

 So far it works so that the server receives the query and executes the 
change, but how can I "upload" the changes? On the file system I can see 
that the tiddler has changed, but how can I update it in the browser? There 
I still see the query, not the response.

Example code:

* Create a new directory and cd into it
* `npm init && npm install --save tiddlywiki`
* Create `index.js` with this content:

// Start TiddlyWiki
var $tw = require('tiddlywiki').TiddlyWiki();
$tw.boot.argv = ['gui', '--listen'];
$tw.boot.boot(function() {});

$tw.wiki.addEventListener("change", function (changedTiddlers) {
  if (!"$:/communicate-with-server" in changedTiddlers) return;
  var tiddler = $tw.wiki.getTiddler("$:/communicate-with-server");
  if (!tiddler || (tiddler.fields["sender"] === "server")) return;
  console.log("Query got from browser");

  var query = tiddler.fields.text;
  var response = $tw.wiki.getModificationFields();
  response["sender"] = "server";
  
  // Parse query...
  console.log("Original query:" + query);
  response.text = query.toUpperCase();
  
  $tw.wiki.addTiddler(new $tw.Tiddler(tiddler,response));
});

* `node index.js`
* Create "$:/communicate-with-server" and write something in it

When you save it, it notifies you in the terminal (where Node is running) 
that it has received a request from the browser and executes the change 
(capitalizing the text), saves the file, but the browser knows nothing 
about it: it still does shows the version in memory. (If you want to send a 
request again, make sure the "sender" field is cleared)

How do I get the browser to read the file system change? And how do I tell 
the browser when the change was made (so I don't have to use a timer after 
I send the request)?


-- 
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/17d5d753-6874-4a88-936e-eabf03db3a39%40googlegroups.com.


Re: [twdev] Re: How to use Node modules in browser?

2019-08-28 Thread bimlas
I also tried Node 12.9.1 installed through NVM, which is the result.

Need to create a skinny tiddler and it will be synced? As far as I know it 
doesn't work with text files:

$ mkdir files
$ echo "Some text" > ./files/foo.txt
$ tiddlywiki --listen


   - Check that http://localhost:8080/files/foo.txt works by opening it in 
   browser
   - Create a new tiddler with _canonical_uri: ./files/foo.txt
   - It says "Trying to load external content from ./files/foo.tid", file 
   is not found
   - Set type: text/plain
   - The text is empty, so the file is not found

To sum up my thoughts:

I want to solve the communication between browser and server by modifying a 
tiddler, which I see on both sides, and if I change it, the other party 
updates itself. Server side modification works, only browser side update is 
missing. This requires the syncadaptor to load the tiddlers from the file 
system at intervals or for a specific event. This does not seem to work, it 
updates only skinny tiddlers, but they do not work with text files.

At the moment, I see the only workable solution is 
$tw.syncer.enqueueSyncTask({type: 
"load", title: "New Tiddler"}).

Am I right? If not, what do I do wrong?

-- 
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/6f991900-5266-4b14-9aaa-0dbfd641dc9a%40googlegroups.com.


Re: [twdev] Re: How to use Node modules in browser?

2019-08-28 Thread bimlas
Jeremy,

To make the browser to pick up changes from the server then you can trigger 
> polling with the tm-server-refresh message. In my own experiments I often 
> just change the default polling interval from 60s down to 3-5s 
> (via $:/config/SyncPollingInterval).
>
 
I'm afraid something is wrong: I created a new wiki ("tiddlywiki --init 
server"), made a tiddler, changed the text on the file system and issued 
the $tw.rootWidget.dispatchEvent({type: "tm-server-refresh"}) command in 
the browser console, but the tiddler has not been updated.

I also set the configuration value as you wrote it, restarted the Node 
server, and saw in the console that it searches for changes at specified 
intervals ("syncer-browser-tiddlyweb: retrieving skinny tiddler list"), but 
the tiddler did not take over the file system changes made.

Called $tw.syncer.syncFromServer() directly, same results.

The only solution that really updated it is the 
$tw.syncer.enqueueSyncTask({type: 
"load", title: "New Tiddler"}) command issued in the browser.

$ tiddlywiki --version
5.1.20
$ node --version
v8.10.0

Is it possible that Node 10 is needed for proper operation?

You may also be interested in this pending PR which attempts to address 
> some of these issues by introducing a new framework for invoking external 
> tasks on the server:
>
> https://github.com/Jermolene/TiddlyWiki5/pull/3461
>

It looks promising, but I'm not digging into it yet if I'm so close to the 
goal. In fact, maybe this may be closer to my needs if I really understand 
what it is: https://github.com/Jermolene/TiddlyWiki5/pull/4123 

PS.: $:/config/SyncPollingInterval could be documented at 
https://tiddlywiki.com/#Hidden%20Settings if you agree.

-- 
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/0cd9d225-d507-4b24-abdd-98db0c0e9e4c%40googlegroups.com.


Re: [twdev] Re: How to use Node modules in browser?

2019-08-29 Thread bimlas
Jeremy

I found why my files didn't load: the code above 
(https://groups.google.com/d/msg/tiddlywikidev/wKqzwaMfBJw/YwJVbBjGBAAJ) 
works, but only if I am not using a system tiddler, as they are not loaded 
by Syncadapter.

The description of Syncadaptor is ambiguous 
(https://tiddlywiki.com/dev/#Syncadaptor): "provides functionality ... to 
load, save and delete single tiddlers ... honours a special system tiddler 
$:/config/SyncFilter containing a filter string. Tiddlers matching this 
filter string are not synced with a syncadapter." The reality is that it 
uses the *$:/config/SyncFilter* filter when saving *from* *browser to 
server*, but ignores all system tiddlers when syncing *from* *server to 
browser* (by using */recipes/default/tiddlers.json*).

[image: tiddly-sync.png]

*(Not a real UML, but I hope it helps understanding.)*

As far as I can track back in Git history, filtering system tiddlers is 
intentional (and logical), but not mentioned in the documentation.

-- 
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/570cad60-2bd8-473a-aa9e-71fcd0ceba2d%40googlegroups.com.


Re: [twdev] Re: How to use Node modules in browser?

2019-08-29 Thread bimlas
Opened https://github.com/Jermolene/TiddlyWiki5/pull/4211 
and https://github.com/Jermolene/TiddlyWiki5/pull/4212

-- 
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/3d4f66cb-bd00-4e8d-ba63-28f599086729%40googlegroups.com.


Re: [twdev] Re: How to use Node modules in browser?

2019-08-29 Thread bimlas
 

> Yes, it should be documented there.
>

Opened https://github.com/Jermolene/TiddlyWiki5/pull/4213 

-- 
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/49a9e3e1-d2c8-4a4e-bd4d-3076c6bcb776%40googlegroups.com.


Re: [twdev] How to use WebServer without Node.js?

2020-03-05 Thread bimlas
Mohammad,

 Not sure if this Python Script can do the Job
>
> https://kookma.github.io/TW-Scripts/#Easy%20local%20saving%20with%20Python
>

 Unfortunately this only works with the single HTML wiki, so I can't query 
individual tiddlers. Nonetheless, it may be helpful, thank you for the tip.

-- 
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/ec49c52a-d7d4-49eb-b04b-8805d7039cd6%40googlegroups.com.


[twdev] Re: How to use WebServer without Node.js?

2020-03-05 Thread bimlas
Jed,

I didn't even think about Bob, because it's a binary file that I can't run 
on a web host's server. The server is not my own, only accessed through the 
cPanel interface. Do you know how to get started?

-- 
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/eff9ec0a-ba58-43e4-a85f-dd1f9820e208%40googlegroups.com.


[twdev] Re: How to use WebServer without Node.js?

2020-03-05 Thread bimlas
I remember there was a web page that used Tiddly just like this: the look 
was maybe PHP and Tiddly was the database. A dark red color dominated the 
site. Does anyone remember which side it was?

-- 
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/0ed56a24-18cd-4224-b9e4-249fd6b19027%40googlegroups.com.


[twdev] Re: How to use WebServer without Node.js?

2020-03-05 Thread bimlas
TonyM,

I want to get Tiddly to keep and edit notes that I can display on a web 
page independently of Tiddly. So Tiddly would be the "editor", but the 
display would be eg. In PHP. On the other hand, I also want to make the 
wiki completely online, so that I can access it anywhere and the changes 
are all in one place.

I don't like the idea of a VPN because I don't think I get it through a 
webhost, on the other hand, it would have to run at home on a continuously 
running server. If I already have a web host, I'd like to use it for this 
purpose.

-- 
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/b9309792-5598-4e16-bdcb-4be0d65d67b1%40googlegroups.com.


Re: [twdev] Hook defined in startup module not working

2020-01-31 Thread bimlas
Jeremy,

The "th-renaming-tiddler" hook is invoked by "$:/core/modules/wiki-bulkops.js" 
-> "renameTiddler()" 

.
This function is called by the "
NavigatorWidget.prototype.handleRenameTiddlerEvent() 
"
 
triggered by the "tm-rename-tiddler" 

 
event.
However, this event is only sent by the "text-slicer" and "xslx-utils" 
plugins, I have not found it anywhere else 


So the "tm-renaming-tiddler" event will not be executed for example in 
empty edition, the "th-renaming-tiddler" hook will not execute.

-- 
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/f589c0ef-d860-4cb9-8d08-48df1282bb4e%40googlegroups.com.


Re: [twdev] Hook defined in startup module not working

2020-01-31 Thread bimlas
I tried importing the above example into the Text-Slicer edition and after 
slicing the example text when I turned on the toolbar (which sends the 
"tm-rename-tiddler" message) in the left sidebar and renamed the tiddler 
there, in the console "RENAME" appeared, so the hook is executed here, but 
if for example i open the tiddler itself in edit mode and rewrite its name, 
the hook doesn't execute.

-- 
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/480cbb8a-0ad2-46a1-a861-cf3c452358fe%40googlegroups.com.


[twdev] Hook defined in startup module not working

2020-01-31 Thread bimlas
Dear all,

I would like to execute events when a tiddler is renamed, but even though I 
wrote my startup module from the snippets of 
"$:/plugins/tiddlywiki/savetrail/savetrail.js", for some reason only the 
default text "Relinking 'X' to 'Y'" appears in the developer console, 
"RENAMED" and "RELINKED" no (so it doesn't seem to execute the hook). On 
page load it prints "LOADED" to the console, so it loads the startup 
module. I also thought that I might just not be able to write to the 
console, so I also tried to create a tiddler, but that didn't happen 
either. What could be the problem?

/*\
title: $:/plugins/bimlas/my-plugin/startup/relink-or-rename.js
type: application/javascript
module-type: startup

Hook on rename

\*/
(function() {

 /*jslint node: true, browser: false */
 /*global $tw: true */
 "use strict";

 // Export name and synchronous status
 exports.name = "my-rename-hook";
 exports.platforms = ["browser"];
 exports.after = ["startup"];
 exports.synchronous = true;

 exports.startup = function() {

   console.log('LOADED');

   $tw.hooks.addHook("th-renaming-tiddler",function handleEvent(newTiddler, 
tiddler) {
 console.log('RENAME',newTiddler);
 $tw.wiki.addTiddler(new $tw.Tiddler({title: "NAME CHANGED", text: 
"rename"}));
 return newTiddler;
   });

   $tw.hooks.addHook("th-relinking-tiddler",function handleEvent(newTiddler, 
tiddler) {
 console.log('RELINK', newTiddler);
 $tw.wiki.addTiddler(new $tw.Tiddler({title: "NAME CHANGED", text: 
"relink"}));
 return newTiddler;
   });
 };
})();



-- 
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/08c12df3-02f4-4077-b1c0-73cd7561556e%40googlegroups.com.


[twdev] Re: Hook defined in startup module not working

2020-01-31 Thread bimlas
I've found the problem: the tiddler I wanted to rename was not listed in 
othe tiddler's fields (neither in the "tags" nor in the "list" field), so 
the hook didn't executed and therefore the messages didn't appear.

Can I create hooks that will be executed anyway when renaming, even if they 
have not been changed in the "list" or "tags" field?

-- 
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/08efea4e-0b4f-4913-b26b-f070d4b3dc33%40googlegroups.com.


Re: [twdev] Hook defined in startup module not working

2020-01-31 Thread bimlas
For readers of this thread, I've opened the pull request: 
https://github.com/Jermolene/TiddlyWiki5/pull/4434

-- 
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/eae12b1b-4090-45f7-8380-2ebcd1faa269%40googlegroups.com.