[tw5] Re: [plugin] TOC generic - shows toc,backlinks,list and listed up front

2020-03-19 Thread ILYA Khlopotov
Hello, 

The plugin is great. One problem I noticed it is not compatible with 
comments plugin from standard library. Is there a quick hack I could use to 
be able to use both?

Best regards,
iilyak

On Friday, January 24, 2020 at 3:04:55 AM UTC-8, HC Haase wrote:
>
> Inspired from this thread on bi-directional linking 
> https://groups.google.com/forum/#!topic/tiddlywiki/LUVTps01UBU I polished 
> a TOC solution I have made for my self.
>
> Demo/download: 
> https://hchaase.github.io/HC-Plugins/#TOC-Generic%20Introduction 
> 
>
>
> Now it is a plugin that puts a toc, baclinks, list, and listed at the 
> bottom of every tiddler but only if there is something to show.
>
> This plugin adds the view template $:/core/ui/ViewTemplate/TOCgeneric/. 
>
> at the bottom of tiddlers that has is tagging, has backlinks, list, is 
> listed or any combination hereof, there will be shown
>
>
>-  a list of tagged (TOC), backlinks, list and listed
>-  a button to hide the lists 
>-  a button to show the lists 
>
>
> The lists will ONLY appear if there is something in them. If you don't see 
> e.g. the backlink list, it is because there are no backlinks to that 
> tiddler. if you don't see the show the lists button, none of the lists are 
> present.
>
> Example:
>
>
> It works nice, but I haven't yet considered other things like e.g. 
> performance impact. this is a first edition.
>
> thanks to Mohammad for help with filtering 
> https://groups.google.com/forum/#!topic/tiddlywiki/tOeRa6973As
>
> I hope you like it. please comment on use and tech.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8bf3061c-812a-4d96-98c6-a49e5c96e837%40googlegroups.com.


[tw5] How to disable lazy loading for specific tiddler

2020-03-08 Thread ILYA Khlopotov
I noticed a strange problem while developing a plugin. The plugin doesn't
work correctly on nodejs if plugin displays some content via PageTemplate
based on filter. Because the tiddlers of the plugin lazy loaded, Tiddlywiki
has no way of knowing that filter need to be executed. Is there a special
tag or something I can use to disable lazy loading for tiddlers of the
plugin.

Best regards,
iilyak

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbTvk2sfWbDNMk6%3DPH78SkEG6vo7eAvRM3mOzLWv5qaUmA%40mail.gmail.com.


[tw5] Announcement a new plugin - splitweb

2019-12-25 Thread ILYA Khlopotov
Hello,

The splitweb plugin is a custom sync adapter which allows the designer to
create a read-only versions of the wiki and host them on any generic web
server (for example github pages).
The web server doesn't need to have any backend language. The plugin works
by employing a lazy  loading mechanism available in tiddlywiki.

In a nutshell the directory structure on the web server is the same as in
nodejs based installation with one exception. There is a tiddlers.json file
at the root of the directory. The file contains all information about the
tiddler except its text. The file is using the following format (see here
https://iilyak.github.io/tiddlywiki-splitweb/tiddlers.json):
```
[
{
"title": "bar",
"created": "20191128223719980",
"modified": "20191128223730628",
"tags": [
"css",
"example"
],
"type": "text/vnd.tiddlywiki",
"fields": {
"author": "@iilyak"
},
"filepath": "tiddlers/bar.tid"
},
{
"title": "foo",
"created": "20191128223719980",
"modified": "20191128223730628",
"tags": [
"www",
"example"
],
"type": "text/vnd.tiddlywiki",
"fields": {
"date": "2019-12-17"
},
"filepath": "tiddlers/foo.tid"
}
]
```

The source code of the plugin is available here
https://github.com/iilyak/tiddlywiki-splitweb
The demo is located on github pages based hosting here
https://iilyak.github.io/tiddlywiki-splitweb/

This is my first finished plugin for tiddlywiki. One of the goals for this
plugin was to test the plugin translation mechanism. So far documentation
and UI of the plugin available in two languages English and Russian. The
language can be changed using a corresponding button on the demo page.

WARNING: This is Alpha version and should be used carefully.

# ROADMAP

- testing
- more documentation
- more translations
- configurable split filter

Best regards,
iilyak

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbRmd70m5LydQHVG9%3DMz70JfmbutS%2BQXU-panCMi6CEuvw%40mail.gmail.com.


Re: [tw5] Tiny Todolist Plugin 1.00 final release: Create todo item with different categories

2019-11-05 Thread ILYA Khlopotov
Hello Mohammad,

I am quite new to Tiddlywiki and I am trying to adapt your plugin to create
independent tiddlers instead of using JSON tiddlers. I was able to create
new tiddler but I cannot update view template to display these tiddlers.

The way I create the tiddler is:
```
\define todolist-add-task-action()
<$set name=item value=<> >
<$action-setfield $tiddler=<> caption={{{
[getindex[itemtext]] }}} parent=<>
type="text/x-markdown"/>
<$action-setfield $tiddler=<> $index=<>
$value="undone" />
<$action-setfield $tiddler=<> $index=<>
$value="none" />

<$action-setfield $tiddler=<> $index="itemtext" $value=""/>
\end
```

My question is. Is it really doable to modify your plugin or it would be
easier to write it from scratch?

Best regards,
ILYA

On Sun, Jul 21, 2019 at 10:38 PM Mohammad 
wrote:

> *Announcement: Todolist Plugin*
>
> *Date: July 22, 2019*
> *Release: 1.0.0 final release*
>
> *Change log*
>
> 22th July 2019
>
>- New categories added: share, tip, horn
>- Show/hide item created timestamp
>- Min width of ui is 320px to fit the small screen of cell phones
>- Minor issues fixed
>
>
>
> I highly appreciate to receive your feedback, comments and idea
> *If you like it star it at GitHib*
>
>
> Demo: https://kookma.github.io/TW-Todolist/
> Code: https://github.com/kookma/TW-Todolist
>
> Best wishes
> Mohammad
>
> References
>
>- https://groups.google.com/d/msg/tiddlywiki/oUGvi4hPEvw/gECfF4DsDwAJ
>- https://groups.google.com/d/msg/tiddlywiki/GPCpShBbaYA/UZOQ_o2DEAAJ
>
>
>
>
> *___*
>
> *Announcement: Todolist Plugin*
>
> *Date: July 19, 2019*
> *Release: 1.0 release candidate 7*
>
> *Change log*
>
> *19th July 2019*
> [NEW] Priority button cycles through five levels of priority and use
> colors for levels
> [NEW] New minimal interface
> [NEW] New internal tiddlers explorer lets you to delete individual todo
> list
> [NEW] Documentation example shows to create multiple todo list in a single
> tiddler
> [Fixed] priority macros does not insert symbols any more
>
>
> I highly appreciate to receive your feedback, comments and idea
> If you like it star it at GitHib
>
>
> Demo: https://kookma.github.io/TW-Todolist/
> Code: https://github.com/kookma/TW-Todolist
>
> Best wishes
> Mohammad
>
> References
>
>- https://groups.google.com/d/msg/tiddlywiki/oUGvi4hPEvw/gECfF4DsDwAJ
>- https://groups.google.com/d/msg/tiddlywiki/GPCpShBbaYA/UZOQ_o2DEAAJ
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/a140a58d-bfb0-432f-b0d6-8e4399cde4c2%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbQbFSyuyN_Y1mFu-6e6Q7r91atKGVPh_pRGsvw2wmutZg%40mail.gmail.com.


Re: [tw5] Re: Problems with installation of Bob under termux on android

2019-04-17 Thread ILYA Khlopotov
Hello Jed,

Following works
```
diff --git a/WebSockets/BrowserWebSocketsSetup.js
b/WebSockets/BrowserWebSocketsSetup.js
index e031cd8..3e93050 100755
--- a/WebSockets/BrowserWebSocketsSetup.js
+++ b/WebSockets/BrowserWebSocketsSetup.js
@@ -51,7 +51,7 @@ socket server, but it can be extended for use with other
web socket servers.
   $tw.connections = $tw.connections || [];
   $tw.connections[connectionIndex] = $tw.connections[connectionIndex]
|| {};
   $tw.connections[connectionIndex].index = connectionIndex;
-  $tw.connections[connectionIndex].socket = new WebSocket(WSScheme +
IPAddress +":" + WSSPort);
+  $tw.connections[connectionIndex].socket = new WebSocket(WSScheme +
IPAddress +":" + WSSPort + '/wiki');
```

However I cannot use `$tw.settings['ws-server'].pathprefix` because it
causes front-end to return undefined error.

On Wed, Apr 17, 2019 at 6:28 AM Jed Carty  wrote:

> If the problem is that the browser can not connect than
> BrowserWebsocketsSetup.js, not NodeWebsocketsSetup.js, but I think that you
> have found the problem.
>
> on line 47 of BrowserWebsocketsSetup.js it uses window.location.hostname,
> when it should be using
>
> window.location.hostname+$tw.settings['ws-server'].pathprefix
>
> I am not certain that will fix the problem, but I think that it is worth
> trying.
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/12914719-fab7-42eb-89be-a0a6690df909%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbQ6Ko0TV9upy5SmZcU6Z-fO-pDsLN_1Ztu%3DuqhVWOp%2BkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Re: Problems with installation of Bob under termux on android

2019-04-17 Thread ILYA Khlopotov
Hello,

I looked into a web console and see that there are messages like:
```
Firefox can’t establish a connection to the server at ws://127.0.0.1:8080/.
```
I think ws server should use pathprefix and listen on ws://
127.0.0.1:8080/wiki. So I updated the code as follows:
```
diff --git a/WebSockets/NodeWebSocketsSetup.js
b/WebSockets/NodeWebSocketsSetup.js
index 7d7a6c0..6d3f6a5 100755
--- a/WebSockets/NodeWebSocketsSetup.js
+++ b/WebSockets/NodeWebSocketsSetup.js
@@ -56,7 +56,7 @@ if($tw.node) {
 */
 function finishSetup () {
   if(!$tw.settings['ws-server'].useExternalWSS) {
-$tw.wss = new WebSocketServer({noServer: true});
+$tw.wss = new WebSocketServer({noServer: true, path:
$tw.settings['ws-server'].pathprefix});
 // Set the onconnection function
 $tw.wss.on('connection', handleConnection);
 // I don't know how to set up actually closing a connection, so
this doesn't
```

It didn't help the error is the same. I'll keep trying to find the right
place to update.

On Wed, Apr 17, 2019 at 12:33 AM Jed Carty  wrote:

> The part that aren't working with caddy all use websockets. So it is
> probably related to that. But I don't know what to check to test it.
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/214579b5-ec2a-4938-964f-bee5fb9ac0ac%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbSVaXtONBu_2vEHYthZ2HsLoXDRZAiVCNkmJTYTix9cUQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Re: Problems with installation of Bob under termux on android

2019-04-16 Thread ILYA Khlopotov
More progress and info

I moved my testing to linux in order to avoid dealing with android issues
during debugging.
My config is pretty standard (except pathprefix):
```
"ws-server": {
 "port": 8090,
 "host": "127.0.0.1",
 "autoIncrementPort": false,
 "pathprefix": "/wiki"
},
"wikisPath": "./Wikis",
"editionsPath": "./editions",
"pluginsPath": "./plugins",
"themesPath": "./themes",
```

Caddyfile
```
127.0.0.1:8080 {
  proxy /wiki 127.0.0.1:8090 {
websocket
  }
}
```

Testing results:
- I can create tiddlers in BobWiki instance http://127.0.0.1:8090/wiki/ as
well as in any sub-wikis on http://127.0.0.1:8090/wiki/test
- I can create new wiki from edition in BobWiki instance
http://127.0.0.1:8090/wiki/
- I cannot create tiddlers on port 8080 (Caddy) there are no error from UI
perspective everything is fine however tiddlers are gone after browser
refresh
- List of available editions is empty when accessed via 8080 port

There is an commands/externalserver.js file. However it is not documented.

Anyway I am going to debug further

On Sun, Apr 14, 2019 at 1:04 PM 'Mark S.' via TiddlyWiki <
tiddlywiki@googlegroups.com> wrote:

> @Jed
>
> I can put this in a separate thread if you prefer. I thought I'd see what
> Bob looked like on Termux.
>
> I followed the first set of install directions (install via git clones).
>
> After running, the first thing I attempted was to set to 0.0.0.0 with the
> button on the Bob home page. That didn't seem to work (it didn't write the
> change).
>
> Then I edited it with the ws-server setting and restarted the server.
>
> Then I attempted to create an empty edition. The edition may have been
> created, but the Bob list wouldn't populate. There is an error:
>
> WebSocket error:  TypeError: Cannot read property 'forEach' of undefined
> at Object.ServerSide.sendBrowserAlert
> ($:/plugins/OokTech/Bob/ServerSide.js:594:24)
> at Object.$tw.nodeMessageHandlers.saveSettings
> ($:/plugins/OokTech/Bob/NodeServerHandlers.js:348:20)
> at Object.$tw.nodeMessageHandlers.findAvailableWikis
> ($:/plugins/OokTech/Bob/NodeBasicHandlers.js:356:31)
> at WebSocket.$tw.Bob.handleMessage
> ($:/plugins/OokTech/Bob/NodeWebSocketsSetup.js:151:52)
> at WebSocket.emit (events.js:197:13)
> at Receiver.receiverOnMessage
> ($:/plugins/OokTech/Bob/External/WS/lib/websocket.js:720:20)
> at Receiver.emit (events.js:197:13)
> at Receiver.dataMessage
> ($:/plugins/OokTech/Bob/External/WS/lib/receiver.js:415:14)
> at Receiver.getData
> ($:/plugins/OokTech/Bob/External/WS/lib/receiver.js:347:17)
> at Receiver.startLoop
> ($:/plugins/OokTech/Bob/External/WS/lib/receiver.js:134:22)
>
> Thanks!
> -- Mark
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/982d16ca-42a3-457b-afc5-df142c2a99d9%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbRjgbvgSGUaMva7JghpNKwaWFr-EahtuQ6uh72DwBG_4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw5] Re: Problems with installation of Bob under termux on android

2019-04-14 Thread ILYA Khlopotov
Hello,

I tried all recommendations no luck so far.
I am still quite sure that the problems are caused by the fact that I
rewrite path in Caddy
I remove wiki suffix in caddy. It is not only about discovery of editions.
There is another problem I am getting red error message on every attempt to
save in any wiki.
Stock wikitiddlywiki has $:/config/tiddlyweb/host parameter  (I used to set
it to $protocol$//$host$/wiki) which doesn't seem to have an alternative in
Bob.
I am trying to find a place in the source of Bob where to hardcode the wiki
suffix to check my hypothesis.
```
Internal JavaScript Error
Well, this is embarrassing. It is recommended that you restart TiddlyWiki
by refreshing your browser
TypeError: path is undefined
```

On Fri, Apr 12, 2019 at 9:46 AM Brent Hall  wrote:

> I've found that the proxy for Bob requires "websocket". My Caddyfile looks
> like this.
>
> https://bobwiki.com   {
> proxy / xxx.xxx.xxx:   {
>  websocket
>  }
> }
>
>
> On Fri, Apr 12, 2019 at 11:32 AM 'Mark S.' via TiddlyWiki <
> tiddlywiki@googlegroups.com> wrote:
>
>> I wonder if the "shared" symlink is giving problems? Maybe try changing
>> all your pathing to use the direct route to the various wiki directories
>> (e.g. WIKI_ROOT=/storage/0/emulated/Wiki/)
>>
>> -- Mark
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "TiddlyWiki" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to tiddlywiki+unsubscr...@googlegroups.com.
>> To post to this group, send email to tiddlywiki@googlegroups.com.
>> Visit this group at https://groups.google.com/group/tiddlywiki.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/tiddlywiki/8583a57a-379a-415e-a702-c0b42d7fb2bb%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Brent Hall
>
> brentlh...@gmail.com
>
> "Learn from yesterday, live for today, hope for tomorrow." Albert Einstein
>
> "the door out is the door to everywhere else" Anne Herbert
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/CAK4e8kjGv%2B8Rph5v6A7yyQMrnvCcAyVHsykO2N7X7412%2BEP14Q%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbSMp1h3SywL15Ss7D5OXDo%2Ba9WyW1HARWHfyjZ8Y_f1Og%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Problems with installation of Bob under termux on android

2019-04-10 Thread ILYA Khlopotov
Hello,

I am in the process of converting my working installation of Tiddlywiki5 to
Bob. However I am experiencing some weird issues which I cannot figure out
myself, yet.

My setup is documented here
https://gist.github.com/khia/2d3f1cfa42bc9a7734a785d59d550e36

I use caddy to provide https and basic authentication as well as serve some
other unrelated services. The caddy listens on port 8080 and uses Bob
started at port 8090. Caddy strips the *wiki* part from the path.

The problems are:

   - List of editions is empty on "Create wiki from an edition"
   - Available Wikis list is empty

Nevertheless navigation to https://phone.local:8080/wiki/main displays the
content of main wiki.
main wiki is created by simple copying of existent nodejs based wiki into
correct directory
It could be due to `wiki` suffix in the url. In nodejs installation I set
*$protocol$//$host$/wiki* in $:/*config/tiddlyweb/host*

```
$ cat \$__config_tiddlyweb_host.tid
created: 20180124115358305
creator: iilyak
modified: 20181224053744204
modifier: iilyak
title: $:/config/tiddlyweb/host
type: text/vnd.tiddlywiki

$protocol$//$host$/wiki
```

Any hints on where to look to fix the problem?

Best regards,
ILYA

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbS3dLFnO2g4mjxbMAmyN99eb20tYxyE%3Dxq4RUtp9Li%3DFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: How to do plugin translations

2018-11-19 Thread ilya . khlopotov
One more failed attempt

create $:/languages/ru-RU/plugins/vendor/plugin/Language/Node/Text with 
translated text

create tiddler to hold translation macro
```
tags: $:/plugins/vendor/plugin/Macros
title: $:/plugins/vendor/plugin/Language
type: text/vnd.tiddlywiki

\define translate(path)
  <$macrocall $name="_translate" language={{$:/language}} path="$path$"/>
\end
\define _translate(language, path)
{{$language$/plugins/vendor/plugin/Language/$path$}}
\end
```

It can be used as
```
<$importvariables filter="[tag[$:/plugins/vendor/plugin/Macros]]">
<>

```

Again it cannot be used in widgets. Following will not work
```
<$importvariables filter="[tag[$:/plugins/vendor/plugin/Macros]]">
   <$edit-text
 tiddler="$:/temp/idea"
 field="provisory_title"
 placeholder=<>
 tag="input" class="tw-edit-texteditor"/>

```

Best regards,
iilyak

On Monday, November 12, 2018 at 1:46:48 PM UTC-8, ILYA Khlopotov wrote:
>
> I am completely lost with plugin translations.
>
> The core has `lingo` macro. So I tried to use it as follows:
>
> languages/ru-RU/Note.multids:
> ```
> title: $:/language/plugins/plugin_vendor/plugin_name/
>
> Note: New Note
> ```
>
> I used it in tiddlers as follows
> ```
> \define lingo-base() $:/language/plugin_vendor/plugin_name/
>
> <>
> ```
>
> This seem to work at first. However when I added more translations only 
> one was always selected. The values were overwritten because all 
> translations are mapped to the same tiddler. I found another problem with 
> this approach it didn't work inside widgets. For example following syntax 
> didn't work
> ```
><$edit-text
>  tiddler="$:/temp/idea"
>  field="provisory_title"
>  placeholder=<>
>  tag="input" class="tw-edit-texteditor"/>
> ```
>
> So I came to a conclusion that lingo macro is internal thing which is not 
> supposed to be used in plugins (I could be wrong). 
>
> Therefore I need to find another way to achieve my goal (bundle plugin 
> with multiple translations). I think I should rely on the value returned by 
> `$:/language/`, but I don't know how to write a macro which would 
> concatenate the result returned by `$:/language/` with path to namespace of 
> the plugin. I thought to store translation tiddlers under either:
> - `$:/language/ru_RU/plugins/plugin_vendor/plugin_name/Note.multids`
> - `$:/plugins/plugin_vendor/plugin_name/languages/ru-RU/Note.multids`
>
> Macro is a simple text substitution so it doesn't get the value of 
> `$:/language/`. Do I need:
> - a nested transclusion syntax
> - use of macrocall
> - use set or vars widget
>
> Best regards,
> iilyak
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/03606d74-168d-44c7-b0ea-fe122b257eff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: How to do plugin translations

2018-11-15 Thread ILYA Khlopotov
One idea I tried and cannot make it work is

create $:/language/ru-RU/plugins/vendor/name/Note/Text

\define translate(title)
 <$wikify name="location"
text="""$:/language/{{{[title{$:/language}removeprefix[$:/languages/]]}}}/plugins/vendor/name/$title$""">
<>
<$wikify>
\end

<>

The generated link to translation tiddler is correct (it opens the right
tiddler on click), but I cannot transclude it.

Best regards,
iilyak



On Mon, Nov 12, 2018 at 1:46 PM ILYA Khlopotov 
wrote:

> I am completely lost with plugin translations.
>
> The core has `lingo` macro. So I tried to use it as follows:
>
> languages/ru-RU/Note.multids:
> ```
> title: $:/language/plugins/plugin_vendor/plugin_name/
>
> Note: New Note
> ```
>
> I used it in tiddlers as follows
> ```
> \define lingo-base() $:/language/plugin_vendor/plugin_name/
>
> <>
> ```
>
> This seem to work at first. However when I added more translations only
> one was always selected. The values were overwritten because all
> translations are mapped to the same tiddler. I found another problem with
> this approach it didn't work inside widgets. For example following syntax
> didn't work
> ```
><$edit-text
>  tiddler="$:/temp/idea"
>  field="provisory_title"
>  placeholder=<>
>  tag="input" class="tw-edit-texteditor"/>
> ```
>
> So I came to a conclusion that lingo macro is internal thing which is not
> supposed to be used in plugins (I could be wrong).
>
> Therefore I need to find another way to achieve my goal (bundle plugin
> with multiple translations). I think I should rely on the value returned by
> `$:/language/`, but I don't know how to write a macro which would
> concatenate the result returned by `$:/language/` with path to namespace of
> the plugin. I thought to store translation tiddlers under either:
> - `$:/language/ru_RU/plugins/plugin_vendor/plugin_name/Note.multids`
> - `$:/plugins/plugin_vendor/plugin_name/languages/ru-RU/Note.multids`
>
> Macro is a simple text substitution so it doesn't get the value of
> `$:/language/`. Do I need:
> - a nested transclusion syntax
> - use of macrocall
> - use set or vars widget
>
> Best regards,
> iilyak
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbSVnvrTzpNHZJUmqKekNqkx_oxXzg%2BJ_XqEMewxuaGH8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] How to do plugin translations

2018-11-12 Thread ILYA Khlopotov
I am completely lost with plugin translations.

The core has `lingo` macro. So I tried to use it as follows:

languages/ru-RU/Note.multids:
```
title: $:/language/plugins/plugin_vendor/plugin_name/

Note: New Note
```

I used it in tiddlers as follows
```
\define lingo-base() $:/language/plugin_vendor/plugin_name/

<>
```

This seem to work at first. However when I added more translations only one
was always selected. The values were overwritten because all translations
are mapped to the same tiddler. I found another problem with this approach
it didn't work inside widgets. For example following syntax didn't work
```
   <$edit-text
 tiddler="$:/temp/idea"
 field="provisory_title"
 placeholder=<>
 tag="input" class="tw-edit-texteditor"/>
```

So I came to a conclusion that lingo macro is internal thing which is not
supposed to be used in plugins (I could be wrong).

Therefore I need to find another way to achieve my goal (bundle plugin with
multiple translations). I think I should rely on the value returned by
`$:/language/`, but I don't know how to write a macro which would
concatenate the result returned by `$:/language/` with path to namespace of
the plugin. I thought to store translation tiddlers under either:
- `$:/language/ru_RU/plugins/plugin_vendor/plugin_name/Note.multids`
- `$:/plugins/plugin_vendor/plugin_name/languages/ru-RU/Note.multids`

Macro is a simple text substitution so it doesn't get the value of
`$:/language/`. Do I need:
- a nested transclusion syntax
- use of macrocall
- use set or vars widget

Best regards,
iilyak

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbT0d1J4kkzzTZ%2BuDUurk4ns4JFAr21VM_Sa2xbozch7RQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Weird issue with plugin

2018-10-25 Thread ILYA Khlopotov
Hello,

I am very new to plugin development. I tried to convert metaTabs (
http://slidesnstories.tiddlyspot.com/#About%20MetaTabs) to plugin but
encounter a weird problem.

- code https://github.com/khia/MetaTabs/tree/wip
- demo https://khia.github.io/MetaTabs/

The problem is when you just install the plugin save and reload your wiki
you would see two buttons at the bottom of every tiddler `+` and `x`. When
you click `+` nothing happen. If you then go to
$:/plugins/jr/MetaTabs/newIdea
 tiddler
and add new tag to it (any tag). You would see `Idea` tab after wiki
reload. If you do the same for $:/plugins/jr/MetaTabs/newNote
 you
would see `Note` tab.

Am I missing something?

Best regards,
iilyak

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAP2DrbT-asOi9f5XXK8%2B_Sxfr66Cn9hmvNZ%3D%2B%2B4ro2kUX%2BjDLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Work on Spaced Repetition System

2018-09-06 Thread ilya . khlopotov
This is a great work!! 

I am interested in a slightly different feature compared to flashcard use 
case which I hope would be possible to implement. 
Human brain forget the information it doesn't use, so I wanted a simple 
mechanism which would prompt me to work on the tiddler. 
I wanted to use SR algorithm to schedule review of tiddler (every tiddler 
in wiki except pluggins and assets) so I can recall the information, 
refactor the tiddler and do maintenance if needed.
The interface would be a simple list filter which would show list of 
tiddler titles (or captures) scheduled for review. 
By clicking on the item in the list the tiddler opens in view mode. I would 
click ok if I don't want to refactor it. 
Otherwise I would click edit icon in the toolbar. Does anyone know if such 
plugin exists or can provide some ideas how to implement it?

Best regards,
ILYA



On Thursday, February 1, 2018 at 1:58:04 PM UTC-8, Diego Mesa wrote:
>
> Hey all,
>  
> I mentioned in other places that I would be working on something like 
> this. Instead of polluting other threads, Ill post updates and misc in here 
> (though specific questions related to other things will still leak outside 
> of this thread!).
>
> So far, I've been reading 
>
> https://apps.ankiweb.net/docs/manual.html
>
> and
>
> https://www.supermemo.com/english/ol/sm2.htm
>
> And have come up with a *basic* design for now which will evolve. Right 
> now, I have questions as cards tagged with "Flash Card", and when you input 
> a new one, they begin with the following fields:
>
> question: 3+1
> answer: 4
> repetition: 1
>
> We then have two major parts:
>
>- Quizzer
>   - Shows a question
>   - Lets you rate its difficulty
>   - Calculate the next minimum time this question should be shown
>   - Selector
>- When you're ready to begin quizzing, get all questions whos time is 
>   up and are ready to be shown
>   
>
> So far I've worked on the quizzer (question/answering), and have a 
> template with the following content:
>
> \define againQuality() 0
> \define hardQuality() 1
> \define goodQuality() 2
> \define easyQuality() 3
> \define updateActions()
> 
> <$formula-vars eq="$(quality)$ + 1">
> <$action-setfield $field="eq" $value=<>/>
> <$formula-vars repetition="{{!!repetition}} + 1">
> <$action-setfield $field="repetition" $value=<>/>
> <$formula-vars due="<> + 20">
> <$action-setfield $field="due" $value=<>/>
>  
> 
> 
>
> 
> <$action-sendmessage $message="tm-remove-field" $param="state"/>
>
> 
> <$action-sendmessage $message="tm-close-tiddler"/>
> \end
>
> 
> <$list filter="[all[current]tag[Flash Card]]">
> <$fieldmangler>
> Question: {{!!question}}
> 
> 
>
> 
> <$list filter="[all[current]!has:field[state]]">
> <$button>
> Show Answer
> 
> <$action-sendmessage $message="tm-add-field" $param="state"/>
> 
> 
>
> 
> <$list filter="[all[current]has:field[state]]">
> Answer: {{!!answer}}
> 
> 
> 
> 
>
> <$button>
> Again
> 
> <$action-setfield $field="quality" $value=<>/>
> <>
> 
> 
> <$button>
> Hard
> 
> <$action-setfield $field="quality" $value=<>/>
> <>
> 
> 
> <$button>
> Good
> 
> <$action-setfield $field="quality" $value=<>/>
> <>
> 
> 
> <$button>
> Easy
> 
> <$action-setfield $field="quality" $value=<>/>
> <>
> 
> 
>
> 
> 
>
> This will at least let you answer a question, and mark how hard/easy it 
> was for you, and calculate the relevant fields for the next time it should 
> be shown. 
>
> I still have to actually implement the correct calculations for due, eq, 
> etc. These are just place holders for right now. 
>
> The next piece is the selector, which will be responsible for going 
> through all questions "due" field and selecting the ones that are ready to 
> be shown - this should very straight forward. 
>
> Any comments/feedback is very welcome!
>
> Diego
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/39fc0b42-427b-4112-b9d7-628a07c70f34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.