[tw5] Re: [tw] Re: Continue order list numbering after code block?

2021-08-14 Thread Shareda
Thanks! I'm going to use this too!

суббота, 14 августа 2021 г. в 06:22:36 UTC+6, Eric Shulman: 

> On Friday, August 13, 2021 at 3:17:28 PM UTC-7 dgle...@gmail.com wrote:
>
>> Although this is an old thread,
>
>
> As you note, this is an old thread (over 6 years old!).
>
> *A general solution has long ago been documented* here:
> https://tiddlywiki.com/#Lists%20in%20WikiText 
> Scroll down to the end of the tiddler and you will see a heading
> labeled "Paragraphs in Lists", which describes enclosing the
> desired content within a ..., like this:
>
> # Step 1
> # Step 2
> # Step 3
>
> Here is the first of several paragraphs. Note that the double linebreak 
> preceding this paragraph is significant.
>
> And here is the second of several paragraphs.
> 
> # Step 4
> # Step 5
> # Step 6
>
> Note that this technique will work with ANY pair of matching HTML tags.  *You 
> can even use made up tags, like ...*.  The key points are 
> these:
>
>- *the opening tag is placed at the end of the first line that starts 
>the the bullet item*
>- *there is a double linebreak following that opening tag.*
>
> enjoy,
> -e
>

-- 
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/a04009c2-f151-40d1-96e7-f85d5fe9d020n%40googlegroups.com.


[tw5] Change link syntax [[text|link]] -> [[link|text]] for .md files stored by TW on Node.js

2021-08-13 Thread Shareda
Hello! I need to unify links in my tiddlers stored in md files (TW on 
Node.js) with external storage of markdown files (Obsidian vault). Now I 
use default TiddlyWiki 5.1.23 system tiddlers an settings.

I've set  $:/config/FileSystemExtensions 
  to .md 
and got fine .md files containing text of my tiddlers. But now I need to 
find a way to convert the link syntax from [[text|link]] to [[link|text]] 
before saving md files. And convert it back when read md files to my 
TiddlyWiki.

Please, help me to find a way to do so! 

There is an interesting line in boot.js:
$tw.utils.registerFileType("text/markdown","utf8",[".md",".markdown"],{deserializerType:"text/x-markdown"});
  

Maybe I need some custom "deserializer"? 
I don't understand where and what should I do :^)
   

-- 
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/2d2d2d0c-f11e-4d46-bddf-44e7c3bc2f09n%40googlegroups.com.


[tw5] Re: How do I store fields inside *.md files? As if it were a .tid file, without separating fields to the .meta file

2021-08-06 Thread Shareda
Hello! (sorry for my English) 

I have made the converter scripts for html/fb2 books that slices a book to 
the atomic tiddlers and maps all the keywords as links to the keywords 
tiddlers wich are the summary of all occurrences. So I get something like 
tiddlybook or hyperbook. Then I can read the book "non-linear" :)  and make 
any notes, attatch favmarks and so on, getting my own research and 
extract of the source.

Recently I saw the Obsidian Graphs. That is beautiful for me. Not useful 
:^) And now I am making and testing some custom integrations between 
TiddlyWiki on Node.js and Obsidian Markdown vault.

Yesterday I noticed that TiddlyWiki has [[text|link]] syntax, but Obsidian 
has [[link|text]]. Not beautiful :)   

четверг, 5 августа 2021 г. в 17:57:42 UTC+6, PMario: 

> Hi Shereda, 
>
> I think we didn't have this usecase yet. ... As I understand it, you want 
> to keep the .md file extension but use the TW .tid fields section and be 
> able to load the .md files into TW as if they where .tid files. ... That's 
> new!
>
> I'm not sure if we can and if we should provide this functionality. ... 
> Markdown editors expect a common format if they read .md files. Using TW 
> fields at the top is not standard for markdown. 
>
> What is your reasoning behind that? What makes it impossible for you to 
> have a .md.meta file which contains the field info?
>
> -mario
>
>

-- 
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/fee4565e-6f97-4940-bcf9-5fec43b86319n%40googlegroups.com.


[tw5] Re: How do I store fields inside *.md files? As if it were a .tid file, without separating fields to the .meta file

2021-08-05 Thread Shareda
Got it! 
But to do that you have to edit boot.js

After this lines

$tw.utils.registerFileType("text/vnd.tiddlywiki","utf8",".tid");

$tw.utils.registerFileType("application/x-tiddler","utf8",".tid");

Add this ones

$tw.utils.registerFileType("text/vnd.tiddlywiki","utf8",".md");

$tw.utils.registerFileType("application/x-tiddler","utf8",".md");
And change this lines 


$tw.utils.registerFileType("text/markdown","utf8",[".md",".markdown"],{deserializerType:"text/x-markdown"});

$tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]);
to


$tw.utils.registerFileType("text/markdown","utf8",[".mdX",".markdown"],{deserializerType:"text/x-markdown"});

$tw.utils.registerFileType("text/x-markdown","utf8",[".mdX",".markdown"]);
среда, 4 августа 2021 г. в 17:14:22 UTC+6, Shareda: 

> Thank you for answering! I did so, but got unwanted .meta files
>
> среда, 4 августа 2021 г. в 17:10:51 UTC+6, saq.i...@gmail.com: 
>
>> Look at the section on "File System Extensions" at 
>> https://tiddlywiki.com/#Customising%20Tiddler%20File%20Naming
>>
>> On Wednesday, August 4, 2021 at 12:53:46 PM UTC+2 Shareda wrote:
>>
>>>
>>> Hello! I am setting up my workflow using TiddlyWiki 5.1.23 on Node.js. 
>>> I would like to store and edit all of my tiddlers within the *.md files 
>>> with all their fields.
>>>
>>> How can I switch off the generating of the separate *.meta files for MD 
>>> format and store the filds the same way as they are stored in .tid files ? 
>>>
>>> My own research is about to fail :^)
>>
>>

-- 
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/72003cd0-04fb-4b23-b006-ff79466a862en%40googlegroups.com.


[tw5] Re: How do I store fields inside *.md files? As if it were a .tid file, without separating fields to the .meta file

2021-08-04 Thread Shareda
Thank you for answering! I did so, but got unwanted .meta files

среда, 4 августа 2021 г. в 17:10:51 UTC+6, saq.i...@gmail.com: 

> Look at the section on "File System Extensions" at 
> https://tiddlywiki.com/#Customising%20Tiddler%20File%20Naming
>
> On Wednesday, August 4, 2021 at 12:53:46 PM UTC+2 Shareda wrote:
>
>>
>> Hello! I am setting up my workflow using TiddlyWiki 5.1.23 on Node.js. 
>> I would like to store and edit all of my tiddlers within the *.md files 
>> with all their fields.
>>
>> How can I switch off the generating of the separate *.meta files for MD 
>> format and store the filds the same way as they are stored in .tid files ? 
>>
>> My own research is about to fail :^)
>
>

-- 
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/8ace33ba-fa75-42ba-a118-eed8ed714f3fn%40googlegroups.com.


[tw5] Re: How do I store fields inside *.md files? As if it were a .tid file, without separating fields to the .meta file

2021-08-04 Thread Shareda
In another words I want to replace ".tid" by ".md" for the filesystem.

среда, 4 августа 2021 г. в 16:53:46 UTC+6, Shareda: 

>
> Hello! I am setting up my workflow using TiddlyWiki 5.1.23 on Node.js. 
> I would like to store and edit all of my tiddlers within the *.md files 
> with all their fields.
>
> How can I switch off the generating of the separate *.meta files for MD 
> format and store the filds the same way as they are stored in .tid files ? 
>
> My own research is about to fail :^)

-- 
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/92f4483c-39af-4dda-b0a7-cd7407daf241n%40googlegroups.com.


[tw5] How do I store fields inside *.md files? As if it were a .tid file, without separating fields to the .meta file

2021-08-04 Thread Shareda

Hello! I am setting up my workflow using TiddlyWiki 5.1.23 on Node.js. 
I would like to store and edit all of my tiddlers within the *.md files 
with all their fields.

How can I switch off the generating of the separate *.meta files for MD 
format and store the filds the same way as they are stored in .tid files ? 

My own research is about to fail :^)

-- 
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/ea5cf27d-12bc-4e24-8037-4bc599e95ce0n%40googlegroups.com.


[tw5] Autoclose feature. Max 10 recent open tiddlers.

2020-10-30 Thread Shareda
Hello! Maybe someone knows some plugin doing something like this. If there 
are 10 tiddlers already open then the first one is closed automatically  
when navigating to the 11th one. 

As I understand there should be navigate history and the navigate event to 
do that.  
Now I found the LinkCatcherWidget. But I'm not sure where I can get the 
list of recent navigations. Does anyone know that? Or how i can get that 
list from 

If I get it then I plan to 
1. Place the LinkCatcherWidget to the PageTemplate with
2. Filter [rest[10]] tiddlers
3. Apply WidgetMessage: tm-close-tiddler.

Is this a good plan?
 
That would be super great to forget about finding and closing old tiddlers.

-- 
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/507f6a4c-167c-4d94-84de-11bcd851d571n%40googlegroups.com.


[tw5] Re: Detect if sidebar breakpoint is reached

2020-10-30 Thread Shareda
TW Tones, thank you! I've found out the same but I don't understand how i 
should get the page width, how I assign it to the variable available for 
tiddler wikitext.

пятница, 30 октября 2020 г. в 04:30:48 UTC+6, TW Tones: 

> Shareda,
>
> The trick is to find out how tiddlywiki already does it, and do similar.
>
>- See here https://tiddlywiki.com/#%24%3A%2FControlPanel
>- and $:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint which 
>sets the break point
>- Then search 
>for $:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint in the advanced 
>search system and shadows tabs.
>- Then we find its in the $:/themes/tiddlywiki/vanilla/base which 
>means its theme dependant
>- This is possible all in the Page Template and uses standard html/css 
>but you could just use the value in 
>$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint if you want 
>depending on what you are trying to achieve.
>
> Tones
>
>
>
>
> On Friday, 30 October 2020 06:47:00 UTC+11, Shareda wrote:
>>
>> Hello! I'm using JD's Mobile Layout. The sidebar does not hide when I 
>> click any navigate button, e.g. navigating to AdvancedSearch or my custom 
>> buttons.
>>
>> I would like to use ActionSetFieldWidget inside of my buttons to hide the 
>> sidebar if the breakpoint is reached. *How should I detect this 
>> condition?*
>>
>> JD's Mob uses *Sidebar Breakpoint* set at *Control Panel *and standard 
>> top bar buttons to show or hide the sidebar, so I think my question is 
>> about common tiddlywiki features.
>>
>

-- 
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/a9b39583-1d75-4d21-9171-297136e16869n%40googlegroups.com.


[tw5] Detect if sidebar breakpoint is reached

2020-10-29 Thread Shareda
Hello! I'm using JD's Mobile Layout. The sidebar does not hide when I click 
any navigate button, e.g. navigating to AdvancedSearch or my custom buttons.

I would like to use ActionSetFieldWidget inside of my buttons to hide the 
sidebar if the breakpoint is reached. *How should I detect this condition?*

JD's Mob uses *Sidebar Breakpoint* set at *Control Panel *and standard top 
bar buttons to show or hide the sidebar, so I think my question is about 
common tiddlywiki features.

-- 
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/9814ba4d-3362-4c87-9230-b6e9bc9dd137n%40googlegroups.com.


[tw5] Re: $list with filter stored in a variable with inside

2020-10-17 Thread Shareda
Hello, Mark S! Thank you for your attention to my question. The reason I 
have not included the entire text is because of its complexity. In 
particular, validate.search.regexp is a macro that uses another macro. And 
this whole tiddler doesn't work without it's transclusion through  the 
ViewTemplate. I can attach the export of all the necessary tiddlers, but it 
seemed to me that the right way to go by a more precise formulation of the 
question. 

Your answer inspired me with the idea that *I should apply $wikify not only 
to the final macro, but also to the nested one*. And voila! Everything 
works fine! Thank you for answering me, it really helped! 

воскресенье, 18 октября 2020 г. в 01:09:05 UTC+6, Mark S.: 

> You're showing us bits and pieces. In particular, you're not showing us 
> your regular expression.
>
> When I try this on TiddlyWiki.com :
>
> <$set name=validate.search.regexp value="\bmes.*\b">
> <$set name=full.filter value="[all[tiddlers]!is[system]has[caption]] 
> +[search:text:regexp]" >
>
> <$list filter=<>>
>
> 
>
> 
>
>
> it runs fine. So I think we need to know more about your regular 
> expression, and maybe sample data. Better yet would be a page somewhere we 
> could look at.
>
>
> On Saturday, October 17, 2020 at 3:24:03 AM UTC-7, Shareda wrote:
>>
>> Hello! 
>> I have  full.filter  variable  containing one or more +runs evaluated 
>> dynamically. The simplest value is like this:
>> [all[tiddlers]!is[system]has[cite_no]] 
>> +[search:text:regexp]
>>
>> <> gives a valid regexp that can contain sqare 
>> brackets, etc.
>>
>> I am trying to run 
>> <$list filter=<>>
>> search results representation
>> 
>>
>> Also I tried to add 
>> <$wikify name="full.filter" text=<>>
>> before the list widget. But still no correct results.
>>
>> What syntax should I use?
>>
>

-- 
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/7598d3a6-111e-47c0-8d0e-e89dbb653522n%40googlegroups.com.


[tw5] $list with filter stored in a variable with inside

2020-10-17 Thread Shareda
Hello! 
I have  full.filter  variable  containing one or more +runs evaluated 
dynamically. The simplest value is like this:
[all[tiddlers]!is[system]has[cite_no]] 
+[search:text:regexp]

<> gives a valid regexp that can contain sqare 
brackets, etc.

I am trying to run 
<$list filter=<>>
search results representation


Also I tried to add 
<$wikify name="full.filter" text=<>>
before the list widget. But still no correct results.

What syntax should I use?

-- 
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/40733cde-e2a8-4f0f-8a4b-fb7bc379a9bcn%40googlegroups.com.


[tw5] Re: Put the title list to the variable for further modification

2020-10-15 Thread Shareda
SOLVED. Here is the syntax from the SetWidget 
<https://tiddlywiki.com/#SetWidget>example with my additional enlist line:
<$set name="myVariable" filter="[tag[HelloThere]]">
<$text text=<>/>
{{{ [enlistcount[]] }}}


четверг, 15 октября 2020 г. в 23:14:03 UTC+6, Shareda: 

> Hello, community! I am making a flexible many step filtration of a tiddler 
> list with 4 or 5 $edit-text or $select widgets. And I would like to show 
> (at least) the current count of the filtered tiddlers on each step.
>
> How can I put into a variable the result of each filtering step? And what 
> is the syntax in a filter to use a variable as an input header list?
>  
> I start with this:
> <$edit-text field="search.words" tag="input" type="search" 
> class="tc-popup-handle" style="width: 300px;"/>
> <$edit-text field="search.phrase" tag="input" type="search" 
> class="tc-popup-handle" style="width: 300px;"/>
> <$edit-text field="search.regexp" tag="input" type="search" 
> class="tc-popup-handle" style="width: 300px;"/>
> <$edit-text field="search.keywords" tag="input" type="search" 
> class="tc-popup-handle" style="width: 300px;"/>
> <$edit-text field="highlight" tag="input" type="search" 
> class="tc-popup-handle" style="width: 300px;"/>
>

-- 
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/7e005201-219e-4d10-8a54-30f51ce00700n%40googlegroups.com.


[tw5] Put the title list to the variable for further modification

2020-10-15 Thread Shareda
Hello, community! I am making a flexible many step filtration of a tiddler 
list with 4 or 5 $edit-text or $select widgets. And I would like to show 
(at least) the current count of the filtered tiddlers on each step.

How can I put into a variable the result of each filtering step? And what 
is the syntax in a filter to use a variable as an input header list?
 
I start with this:
<$edit-text field="search.words" tag="input" type="search" 
class="tc-popup-handle" style="width: 300px;"/>
<$edit-text field="search.phrase" tag="input" type="search" 
class="tc-popup-handle" style="width: 300px;"/>
<$edit-text field="search.regexp" tag="input" type="search" 
class="tc-popup-handle" style="width: 300px;"/>
<$edit-text field="search.keywords" tag="input" type="search" 
class="tc-popup-handle" style="width: 300px;"/>
<$edit-text field="highlight" tag="input" type="search" 
class="tc-popup-handle" style="width: 300px;"/>

-- 
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/946de523-b305-4d17-ab96-7bd5d9569e25n%40googlegroups.com.


[tw5] Re: Can't apply my JS Macro result into the filter.

2020-10-15 Thread Shareda
Eric, thanks for the clarity in my head! I assumed that the problem was the 
difference between a field and a macro from a filter point of view, but I 
did not understand exactly. I understand now. ...
Tested, IT IS OK! Yes! :)

So there are 
1. validateregexp.js macro module
2. 
\define validFilter()<$macrocall $name="validateregexp" 
regexp={{!!add.filter}}/>
3. <$wikify name="thefilter" text=<>>
4. use in filter expression

If that's optimal way to use such macro then I should implement it in 
another 3 places that I have
  

четверг, 15 октября 2020 г. в 14:07:05 UTC+6, Eric Shulman: 

> On Wednesday, October 14, 2020 at 11:29:25 PM UTC-7, Shareda wrote:
>>
>>
>> \define validFilter()<$macrocall $name="validateregexp" 
>> regexp={{!!add.filter}}/>
>> and change filter
>> [search:text:regexp{!!add.filter}]
>> to 
>> [search:text:regexp]
>> then the second filter always returns nothing even if {!!add.filter} 
>> and  are equal and the first filter works correctly.
>>
>
> This is, perhaps, the most frequently misunderstood concept in TiddlyWiki:
>
> *** Macros are NOT functions ***
>
> They do not "evaluate their contents and return the results".   Rather, 
> they just perform TWO actions:
>
> 1) replace occurrences of $param$ with corresponding values passed as 
> macro parameters
> 2) replace occurrences of $(variable)$ with corresponding values of 
> variables define outside the macro
>
> After doing these replacements, the macro's literal contents are inserted 
> in place of the macro call itself.
> It is then up to the calling context to do any rendering (aka, 
> "wikification") of the results.
>
> Thus, your second filter becomes:
> [search:text:regexp<$macrocall $name="validateregexp" regexp={{!!add.
> filter}}/>]
> and filter operators do NOT process widgets.  Thus, the regexp filter 
> operator sees it's parameter
> as a reference to a variable named "$macrocall".  In addition, variable 
> references inside filters do
> not allow use of arguments, so the rest of the $macrocall -- the $name... 
> and regexp... parts -- are ignored.
>
> In effect, your filter is:
> [search:text:regexp<$macrocall>]
> and since there is no variable named "$macrocall", it is trying to match a 
> blank pattern which,
> of course, produces no results.
>
> To actually get the rendered results of the validateregexp $macrocall, you 
> need to use the
> <$wikify> widget to process and capture the *output* of the validFilter() 
> macro into a variable,
> and then use that variable in the filter.  Something like this:
>
> <$wikify name="thefilter" text=<>>
> ...
> [search:text:regexp]
> ...
> 
>
> I hope this explanation doesn't make your head explode.  :)
> https://www.youtube.com/watch?v=B_Lnz64vXB8
>
> Let me know how it goes...
>
> -e
>

-- 
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/71de9f86-9077-448f-935a-cc7d9294229bn%40googlegroups.com.


[tw5] Can't apply my JS Macro result into the filter.

2020-10-15 Thread Shareda
If I take the value from a tiddler field  like {{!!add.filter}}  then it 
works fine but I need to check and clean this value before it goes to the 
filter. Otherwise [search:text:regexp{!!add.filter}] crashes my wiki if it 
contains "||" somewhere or "|" at the edge. There shoud be more checks but 
I start with this one.

So i've made JS macro and checked its results - ok. It replaces || to | and 
removes | prefix an suffix
...
exports.run = function(regexp) {
regexp= regexp.replace(/([\|\\\{\}]){2,}/g, "$1");
regexp= regexp.replace(/^([\|]){1,}/g, "");
regexp= regexp.replace(/([\|]){1,}$/g, "");
return regexp;
}; 

But when I 
\define validFilter()<$macrocall $name="validateregexp" 
regexp={{!!add.filter}}/>
and change filter
[search:text:regexp{!!add.filter}]
to 
[search:text:regexp]
then the second filter always returns nothing even if {!!add.filter} 
and  are equal and the first filter works correctly.

I would like to understand why. And how I should apply my macro to the 
filter.





-- 
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/a3c8adc8-18be-4ae4-a6f8-609270347c2dn%40googlegroups.com.


[tw5] Re: Can't call my JS macro

2020-10-14 Thread Shareda
Felicia, Yes, I've reloaded wiki after saving/importing the macro. But 
there was no error message or I just don't know where(?) to look for it. 
Anyway, I removed str(), and macros is ok now! So thank you! I did not know 
about that error! Now I remove $:/tags/Macro..

четверг, 15 октября 2020 г. в 03:45:54 UTC+6, Felicia Crow: 

> Hi,
>
> first question since it is a javascript macro: Have you reloaded your wiki 
> after saving/importing the macro? Unlike wiki text macros javascript macros 
> only get loaded in when the wiki itself is loaded.
> The reason I am asking is because when I try to call your plugin after a 
> reload it gives me a very clear error message of what is wrong: str is not 
> defined.
> Seeing how the input is already a string converting it to one - which I 
> assume is what you wish to do - is not necessary. So if you just remove 
> str() around each regexp you should be able to call your macro without 
> problems.
>
> Also as an aside: Javascript macros are global by default and don't need 
> to be tagged with $:/tags/Macro.
>
> Hope this helps.
> Felicia
>
>
>
> On Wednesday, 14 October 2020 20:52:40 UTC+2, Shareda wrote:
>>
>> Hello! What is wrong? I don't understand how to find out this and debug.
>>
>> 1. I created my macros tiddler;
>> 2.  Added   $:/tags/Macro  tag;
>> 3. Try to use these ways. It results just nothing.
>>   3.a. <>
>>   3.b. <$macrocall $name="validateregexp" text="Text to be made into 
>> italics"/>
>> 4. checked <>. There is no my macros...
>> Here is my macro exportred:
>>
>> module-type: macro
>> tags: $:/tags/Macro
>> title: $:/hyperbook/validateregexp.js
>> type: application/javascript
>>
>> /*\
>> title: $:/hyperbook/validateregexp.js
>> type: application/javascript
>> module-type: macro
>>
>> Macro to return a clean regexp that does not hang-up the whole wiki and 
>> does not get out-of-memory 
>>
>> \*/
>> (function(){
>>
>> /*jslint node: true, browser: true */
>> /*global $tw: false */
>> "use strict";
>>
>> /*
>> Information about this macro
>> */
>>
>> exports.name = "validateregexp";
>>
>> exports.params = [
>> {name: "regexp"}];
>>
>> /*
>> Run the macro
>> */
>> exports.run = function(regexp) {
>> regexp= str(regexp).replace(/([\|\\\{\}]){2,}/g, "$1");
>> regexp= str(regexp).replace(/^([\|]){1,}/g, "");
>> regexp= str(regexp).replace(/([\|]){1,}$/g, "");
>> return regexp;
>> // if(!baseName) {
>> // baseName = $tw.language.getString("DefaultNewTiddlerTitle");
>> // }
>> // return this.wiki.generateNewTitle(baseName, options);
>> };
>>
>> })(); 
>>
>>

-- 
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/a05b4868-c537-4ebd-b29e-2088ddd739f1n%40googlegroups.com.


[tw5] Re: Exclude first N items from the list

2020-10-14 Thread Shareda
So simple! Thank you! I've already take that to my Tiddlywiki! 

среда, 14 октября 2020 г. в 03:33:48 UTC+6, Eric Shulman: 

> On Tuesday, October 13, 2020 at 2:25:26 PM UTC-7, Shareda wrote:
>>
>> What is more pretty and fast way to exclude first N items from the list?
>> Now I have
>> \define fastFilter() [all[tiddlers]b{!!b} 
>> +[putlast:$(curN)$[]limit[$(CountMinusN)$]]
>>
>
> The rest[] operator does this.  Thus:
> \define fastFilter() [all[tiddlers]b{!!b}rest[$(curN)$]]
>
> -e
>

-- 
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/6c936670-44ab-4157-b120-8ef458bdb243n%40googlegroups.com.


[tw5] Can't call my JS macro

2020-10-14 Thread Shareda
Hello! What is wrong? I don't understand how to find out this and debug.

1. I created my macros tiddler;
2.  Added   $:/tags/Macro  tag;
3. Try to use these ways. It results just nothing.
  3.a. <>
  3.b. <$macrocall $name="validateregexp" text="Text to be made into 
italics"/>
4. checked <>. There is no my macros...
Here is my macro exportred:

module-type: macro
tags: $:/tags/Macro
title: $:/hyperbook/validateregexp.js
type: application/javascript

/*\
title: $:/hyperbook/validateregexp.js
type: application/javascript
module-type: macro

Macro to return a clean regexp that does not hang-up the whole wiki and 
does not get out-of-memory 

\*/
(function(){

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

/*
Information about this macro
*/

exports.name = "validateregexp";

exports.params = [
{name: "regexp"}];

/*
Run the macro
*/
exports.run = function(regexp) {
regexp= str(regexp).replace(/([\|\\\{\}]){2,}/g, "$1");
regexp= str(regexp).replace(/^([\|]){1,}/g, "");
regexp= str(regexp).replace(/([\|]){1,}$/g, "");
return regexp;
// if(!baseName) {
// baseName = $tw.language.getString("DefaultNewTiddlerTitle");
// }
// return this.wiki.generateNewTitle(baseName, options);
};

})(); 

-- 
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/29a80145-2075-4100-9b6d-3682548b32f4n%40googlegroups.com.


[tw5] Exclude first N items from the list

2020-10-13 Thread Shareda
What is more pretty and fast way to exclude first N items from the list?
Now I have
\define fastFilter() [all[tiddlers]b{!!b} 
+[putlast:$(curN)$[]limit[$(CountMinusN)$]]

-- 
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/dac16a9d-dd1d-426c-826b-c90cfd88bb0dn%40googlegroups.com.


[tw5] Re: Sidebar in popup for mobile view

2020-10-13 Thread Shareda
SOLVED! Now I disabled some option in  plugin's config, and scroll is back. 
Here is it:
Here we can try to stop the fist tiddler in the story river from scrolling 
past the topbar
*Side effects:*
- For *classic* and *pop* story view: tiddlers won't automatically scroll 
into view on link click
- Browser search bar won't automatically hide on scroll up (tested on 
Chrome for Android)
 Apply
 Don't apply  

Thank you for your quick answer!

вторник, 13 октября 2020 г. в 20:15:41 UTC+6, Ste: 

> How odd. You should be able to give JD a shout. He's active in here. 
> In the meantime would would 
> https://github.com/felixhayashi/TW5-TopStoryView
> Solve your problem? 
>
> On Tuesday, 13 October 2020 at 15:06:37 UTC+1 Shareda wrote:
>
>> Problem: no auto-scrolling when navigate. 
>> Hi!
>> When I turn on JD Mobile Layout -- autoscrolling turns off. If I click 
>> any link then the target tiddler opens somwhere down, but current scroll 
>> position does not change.
>> Maybe someone know where I should look to unterstand and solve this?
>>  
>> суббота, 10 октября 2020 г. в 22:17:41 UTC+6, Shareda: 
>>
> Oh, thank you! I did not know about JD Mobile Layout. It looks great and 
>>> fits my needs! 
>>> суббота, 10 октября 2020 г. в 16:06:14 UTC+6, Ste: 
>>>
>>>> Jd's mobile layout is good and the official menu bar plugin might do 
>>>> for you.
>>>> I can't remember if that's in the current release or just the pre 
>>>> release of the next update. 
>>>> Jd's is here: 
>>>> http://j.d.simplemobile.tiddlyspot.com/ 
>>>> On Saturday, 10 October 2020 at 08:04:32 UTC+1 Shareda wrote:
>>>>
>>>>> Hello! Is there any common solution for mobile to get the sidebar 
>>>>> appearing in popup frame? Now sidebar appears in the start of the story 
>>>>> river and that is not handy to scroll up and down loosing the current 
>>>>> position.
>>>>
>>>>

-- 
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/a605c565-0ca1-4bfb-bcf9-797610df983dn%40googlegroups.com.


[tw5] Re: Sidebar in popup for mobile view

2020-10-13 Thread Shareda
Problem: no auto-scrolling when navigate. 
Hi!
When I turn on JD Mobile Layout -- autoscrolling turns off. If I click any 
link then the target tiddler opens somwhere down, but current scroll 
position does not change.
Maybe someone know where I should look to unterstand and solve this?
 
суббота, 10 октября 2020 г. в 22:17:41 UTC+6, Shareda: 

> Oh, thank you! I did not know about JD Mobile Layout. It looks great and 
> fits my needs! 
> суббота, 10 октября 2020 г. в 16:06:14 UTC+6, Ste: 
>
>> Jd's mobile layout is good and the official menu bar plugin might do for 
>> you.
>> I can't remember if that's in the current release or just the pre release 
>> of the next update. 
>> Jd's is here: 
>> http://j.d.simplemobile.tiddlyspot.com/ 
>> On Saturday, 10 October 2020 at 08:04:32 UTC+1 Shareda wrote:
>>
>>> Hello! Is there any common solution for mobile to get the sidebar 
>>> appearing in popup frame? Now sidebar appears in the start of the story 
>>> river and that is not handy to scroll up and down loosing the current 
>>> position.
>>
>>

-- 
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/d05faa48-c38c-4d6b-bc30-eda2b736b771n%40googlegroups.com.


[tw5] Re: What is faster: <$list> all[current]get[field]compare.. VS <$reveal>?

2020-10-12 Thread Shareda
Yeah! You are fully right! I should test and debug an example before 
posting it :-/
I really appreciate your time, and I'm sorry that you had to sort out my 
mistakes (first three of your notes). 
But without that I would not get your cool advises (the other three ones). 
All of them are useful for me! Thanks!
Especially THIS looks much more optimal and beautiful comparing to mine, so 
i take it: 
<$list filter='[{$:/hb/Scrollable!!text}prefix[yes]]'>
понедельник, 12 октября 2020 г. в 13:54:17 UTC+6, Eric Shulman: 

> On Monday, October 12, 2020 at 12:17:40 AM UTC-7, Shareda wrote:
>>
>> TW Tones, here is an example code from UI preferences:
>> <$reveal type="match" state="$:/hb/Scrollable" text="yes">
>>   <$edit-text tiddler="$:/hb/CiteDivHeight" 
>> default="600" size="1" rows="1" autoHeight="no"tag=input/> <$range 
>> tiddler="$:/hb/CiteDivHeight" min="300" max="999" 
>> default="600" increment="10" tooltip='300-999px'/>
>> 
>> Instead of this I can use List like <$list 
>> filter='[all[$:/hb/Scrollable]get[text]prefix[yes]]'> 
>> and so on.
>>
>
> Just a few notes about the example $list you posted:
>
> The all[...] operator takes one or more *keywords* (current, missing, 
> orphans, shadows, tags, tiddlers) as a parameter, not a tiddler title.
> To specify a literal tiddler title, use title[TiddlerName] or just 
> [TiddlerName], like this:
> <$list filter='[[$:/hb/Scrollable]get[text]prefix[yes]]'>
>
> In place of the combination of [TiddlerName]get[text], you could write 
> {TiddlerName!!text}, like this:
> <$list filter='[{$:/hb/Scrollable!!text}prefix[yes]]'>
>
> By default, the $list widget sets "currentTiddler" within the body of the 
> <$list>
> Thus, in your example code, the value of <> within the 
> $list body will be "yes".
>
> To leave the value of currentTiddler unchanged, you must specify an 
> alternative variable name, like this:
> <$list filter='[[$:/hb/Scrollable]get[text]prefix[yes]]' 
> variable="something">
>
> As an alternative, you could also preserve the value currentTiddler by 
> adding "then" at the end of your test, like this:
> <$list filter='[[$:/hb/Scrollable]get[text]prefix[yes]then
> ]'>
>
> Of course, if you don't use the result within the body of the $filter (as 
> in your example, which explicitly specifies tiddler="$:/hb/CiteDivHeight"), 
> then you can omit the variable="..." syntax entirely.
> Even so, it's a good convention to use a variable whenever the $list is 
> just being used as a conditional test. I like to use a name that describes 
> the purpose of the test, like this:
> <$list filter='[[$:/hb/Scrollable]get[text]prefix[yes]]' 
> variable="if_scrollable_flag_is_set">
>
> enjoy,
> -e
>
>>

-- 
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/4c48eaa2-728b-4907-ab4f-e3848c592d65n%40googlegroups.com.


[tw5] Re: avoid page refresh when I change the 'global' variable

2020-10-12 Thread Shareda
Eric, thank you for showing what I've missed about macros, that is 
important for me! I will use that with any variable/macros used only in the 
Story River. 

But in this case and on the present time links are to be refreshed 
everywhere including the Sidebar. 

Here is my custom piece of link.js. Later i'll optimize it, as it is my 
first touch of JavaScript, styles, etc..
if(!this.isMissing && !this.isShadow) {
  var toTiddler = self.wiki.getTiddler(self.to),
  toFreq = Number(toTiddler.getFieldString("freq")),
  toWeight = Number(toTiddler.getFieldString("weight")),
  highlightGain = 
Number(this.getVariable("hb-highlight-intensity-kw"));
if (toWeight || toFreq) {

domNode.setAttribute("style","font-weight:"+(highlightGain*4.99*(toFreq)+400-200*highlightGain)+";
 background:rgba("+(150+toWeight)+","+(250-toWeight)+",235,"+ 
(highlightGain*(toFreq/(150)+0.5)) + "); text-decoration: none; color: 
inherit;border-color: rgba("+(155+toWeight)+","+(255-toWeight)+",255,"+ 
(highlightGain*(toFreq/(150)+0.5)) + "); border-radius: 4px; 
border-bottom-width: 0px; border-left-width: 2px; border-right-width: 2px; 
border-top-width: 0px; padding-inline-end: 1px; padding-inline-start: 
1px;border-style: solid");
   domNode.setAttribute("data-toWeight",toWeight);
    }  }


понедельник, 12 октября 2020 г. в 03:47:55 UTC+6, Eric Shulman: 

> On Sunday, October 11, 2020 at 11:51:14 AM UTC-7, Shareda wrote:
>>
>> TW Tones, yes, maybe I can do so, but.. I made this variable to get the 
>> desired value from inside of my custumized link.js widget, which redraws 
>> all internal links. The $:/hb/HighlightIntensityKW value can be changed 
>> only by RangeWidget from UI, that's what I need. It works as i need except 
>> of loosing  current scroll position. 
>>
>> Eric, can I get value of such  <> macro inside 
>> of my customized link.js by some JavaScript  expression? 
>> If so, wouldn't that make it slower (compared to using a variable)? Now i 
>> have *10 109 * linked tiddlers, and soon there will be ~ 25 000.  
>
> Now I get value by this JS line: 
>> var highlightGain = Number(this.getVariable("hb-highlight-intensity-kw"));
>
>
> Macros *are* variables.  Internally, in the TWCore, they are one and the 
> same.
>
> The only difference is that the macro declaration syntax allows you to 
> pass in
> optional parameters to be substituted into the macro value before 
> returning.
>
> See https://tiddlywiki.com/#Macros, in which Jeremy writes:
>
>> Most macros are in fact just parameterised variables 
>> <https://tiddlywiki.com/#Variables>.
>
> and
>
>> The dumpvariables <https://tiddlywiki.com/#dumpvariables%20Macro> macro 
>> lists all variables (including macros) that are available at that position 
>> in the widget tree.
>
>
> You should be able to get the value of the macro using Javascript in your 
> customized
> link.js widget, as long as that widget is being rendered in a tiddler 
> view, since the
> macro/variable defininition is being loaded via $:/tags/Macro/View.
>
> However, I can't test this myself since I don't have your customized code.
>
> I suggest placing the <> macro somewhere just before an 
> occurrence of a link that uses your customized link.js code
> to see if it lists your hb-highlight-intensity-kw variable and value.
>
> You could also add
> console.log("highlight gain is:" + hightlightGain);
> somewhere in your link.js code, and then check the output in the browser's 
> developer console window.
>
> -e
>

-- 
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/3d1fb434-4a79-4530-890e-a691a2c6c7e6n%40googlegroups.com.


[tw5] Re: What is faster: <$list> all[current]get[field]compare.. VS <$reveal>?

2020-10-12 Thread Shareda
TW Tones, here is an example code from UI preferences:
<$reveal type="match" state="$:/hb/Scrollable" text="yes">
  <$edit-text tiddler="$:/hb/CiteDivHeight" 
default="600" size="1" rows="1" autoHeight="no"tag=input/> <$range 
tiddler="$:/hb/CiteDivHeight" min="300" max="999" 
default="600" increment="10" tooltip='300-999px'/>

Instead of this I can use List like <$list 
filter='[all[$:/hb/Scrollable]get[text]prefix[yes]]'> 
and so on.

bimlas, thanks! If (or when) I face some disturbing slow down of my wiki 
then I will measure the difference and place results here! Now I prefer 
<$list>.
понедельник, 12 октября 2020 г. в 12:01:21 UTC+6, bimlas: 

> Shareda,
>
> I've researched this before too and I'm using the "list" widget because of 
> the unnecessary DOM elements of the "reveal" widget 
> <https://github.com/Jermolene/TiddlyWiki5/pull/3654#issuecomment-453920404>. 
> There is virtually no difference in speed between them, maybe the "list" is 
> a little faster, but measure yourself: 
> https://tiddlywiki.com/#Performance%20Instrumentation
>

-- 
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/f0c51b58-fb95-4ccc-9248-d5cf9c8d69b4n%40googlegroups.com.


[tw5] What is faster: <$list> all[current]get[field]compare.. VS <$reveal>?

2020-10-11 Thread Shareda
The reason is that my reveal widget implicitly adds some css class or style 
to my UI elements, so I have unexpected space to the right of my button. 
But when I use ListWidget instead -- it's ok. The only doubt is speed of my 
wiki. 
So, what is faster and is the difference big: <$list> 
all[current]get[field]prefix[X].. VS <$reveal> depending on that value?

-- 
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/a0e4a744-202a-4fe0-a99d-01f92bb7dbd5n%40googlegroups.com.


[tw5] Re: avoid page refresh when I change the 'global' variable

2020-10-11 Thread Shareda
TW Tones, yes, maybe I can do so, but.. I made this variable to get the 
desired value from inside of my custumized link.js widget, which redraws 
all internal links. The $:/hb/HighlightIntensityKW value can be changed 
only by RangeWidget from UI, that's what I need. It works as i need except 
of loosing  current scroll position. 

Eric, can I get value of such  <> macro inside 
of my customized link.js by some JavaScript  expression? 
If so, wouldn't that make it slower (compared to using a variable)? Now i 
have *10 109 * linked tiddlers, and soon there will be ~ 25 000. 

Now I get value by this JS line: 
var highlightGain = Number(this.getVariable("hb-highlight-intensity-kw"));




 

воскресенье, 11 октября 2020 г. в 07:46:31 UTC+6, Eric Shulman: 

> On Saturday, October 10, 2020 at 9:39:43 AM UTC-7, Shareda wrote:
>>
>> How i can avoid page refresh when I change the 'global' variable? I need 
>> redraw, but i don't want to loose page's scroll position. Now this variable 
>> is declared inside of $:/core/ui/PageTemplate and linked to some config 
>> tiddler:
>>
>> <$set name="hb-highlight-intensity-kw" value={{$:/hb/HighlightIntensityKW}}>
>> Is there any better place for my 'global' variable?  
>>
>
> If your "global variable" is only needed when *viewing* tiddlers in the 
> Story River, or when *previewing* while editing a tiddler, but *not* in the 
> Sidebar, SiteTitle, etc., you can do this:
>
> 1) In $:/hb/HighlightIntensityKW, instead of just containing the value 
> (e.g., "12345"), use \define, like this:
> \define hb-highlight-intensity-kw() 12345
>
> 2) Tag $:/hb/HighlightIntensityKW with "$:/tags/Macro/View"
>
> Then, you can use <> in tiddler content or as a 
> widget parameter value and it will be replaced by 12345 as before, but 
> without causing the entire PageTemplate to be re-rendered. Thus, the Story 
> River's current scroll position will not be lost.
>
> enjoy,
> -e
>

-- 
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/83595c07-e43e-4182-8677-6cefa3b43028n%40googlegroups.com.


[tw5] avoid page refresh when I change the 'global' variable

2020-10-10 Thread Shareda
How i can avoid page refresh when I change the 'global' variable? I need 
redraw, but i don't want to loose page's scroll position. Now this variable 
is declared inside of $:/core/ui/PageTemplate and linked to some config 
tiddler:

<$set name="hb-highlight-intensity-kw" value={{$:/hb/HighlightIntensityKW}}>

Is there any better place for my 'global' variable?  

-- 
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/4b8007d6-9b8e-4c41-8af2-85a2a02400f4n%40googlegroups.com.


[tw5] Re: Sidebar in popup for mobile view

2020-10-10 Thread Shareda
Oh, thank you! I did not know about JD Mobile Layout. It looks great and 
fits my needs! 
суббота, 10 октября 2020 г. в 16:06:14 UTC+6, Ste: 

> Jd's mobile layout is good and the official menu bar plugin might do for 
> you.
> I can't remember if that's in the current release or just the pre release 
> of the next update. 
> Jd's is here: 
> http://j.d.simplemobile.tiddlyspot.com/ 
> On Saturday, 10 October 2020 at 08:04:32 UTC+1 Shareda wrote:
>
>> Hello! Is there any common solution for mobile to get the sidebar 
>> appearing in popup frame? Now sidebar appears in the start of the story 
>> river and that is not handy to scroll up and down loosing the current 
>> position.
>
>

-- 
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/788be740-d0bf-4827-a2c2-4d357215d9abn%40googlegroups.com.


[tw5] Sidebar in popup for mobile view

2020-10-10 Thread Shareda
Hello! Is there any common solution for mobile to get the sidebar appearing 
in popup frame? Now sidebar appears in the start of the story river and 
that is not handy to scroll up and down loosing the current position.

-- 
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/62cc4b70-ea70-463a-9fdf-57a3a2a1d96an%40googlegroups.com.


[tw5] Re: Global wikilink styling depending on the target "weight" field value

2020-09-06 Thread Shareda
(that's why i drill to link.js widget). Soon I will try to apply your way 
(Transclusion with Templates) with backlinks and other link structure 
features in my wiki.

воскресенье, 6 сентября 2020 г. в 21:29:27 UTC+6, Shareda: 

> Oh, good and clear enough for me! Thank you! One more detail: what if i 
> have links like [[form of keyword|original keyword]] ? How can I remake it 
> or play around?
> I already have one mechanism based on macros like < "original keyword">> but it is not good becuse of backlinks are not tracing 
> throuh this macro. 
> воскресенье, 6 сентября 2020 г. в 18:53:15 UTC+6, Eric Shulman: 
>
>> On Sunday, September 6, 2020 at 4:52:32 AM UTC-7, Shareda wrote:
>>>
>>> Hello! I want to improve link styling in my TiddlyWiki, and I need some 
>>> help. In my wiki almost every tiddler describes some concept. Each concept 
>>> (tiddler) has a numerical field "weight". I want links to any concept 
>>> tiddler that has a "weight" field to be displayed with style="background: 
>>> rgba(255,0,0,)". I found the widget link.js, but for some 
>>> reason my changes do not affect the display. Where exactly should I insert 
>>> my code so that all wikilinks follow this style. I am new to JavaScript and 
>>> TW inner architecture , so it would be very good to get correct code.  
>>>
>>
>> You can achieve this styling with just a small change in the way you 
>> enter your links, without modifying any TWCore javascript code.
>>
>> First, wherever you want to embed a weighted link instead of writing just
>> TiddlerTitle or [[Tiddler Title]]
>> you write:
>> {{TiddlerTitle||wlink}} or {{Tiddler Title||wlink}}
>> This syntax is called "Transclusion with Templates" (see 
>> https://tiddlywiki.com/#Transclusion%20with%20Templates).
>> What it does is to render the indicated tiddler title, using the content 
>> from "wlink" (short for "weighted link").
>>
>> Then, create the "wlink" tiddler, containing this text:
>> <$link>
>>> addsuffix[ / 100));]] }}}>
>>   <>
>>
>> 
>>
>> Notes:
>> * Within this "template" tiddler, the currentTiddler value is the 
>> TiddlerTitle you specified in the transclusion syntax
>> * The $link widget outputs a link (using the currentTiddler value as its 
>> default target)
>> * The span inside the $link constructs the style using an "inline filter" 
>> (the {{{ [...] }}} syntax)
>> * This inline filter starts with literal text: "
>> *background:rgba(255,0,0,calc(*", then appends a value retrieved from 
>> the "weight" field of the currentTiddler, and then adds the remaining 
>> literal text:  "*/ 100));*"
>> * Thus, the resulting style is: "*background:rgba(255,0,0,calc(nnn **/ 
>> 100));*", where "nnn" is the value from the weight field.
>> * Finally, inside the span, the actual tiddler title is displayed
>>
>> enjoy,
>> -e
>>
>

-- 
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/7aefe96f-2b29-455f-b91b-85c64c1bbc92n%40googlegroups.com.


[tw5] Re: Global wikilink styling depending on the target "weight" field value

2020-09-06 Thread Shareda
Oh, good and clear enough for me! Thank you! One more detail: what if i 
have links like [[form of keyword|original keyword]] ? How can I remake it 
or play around?
I already have one mechanism based on macros like <> but it is not good becuse of backlinks are not tracing 
throuh this macro. 
воскресенье, 6 сентября 2020 г. в 18:53:15 UTC+6, Eric Shulman: 

> On Sunday, September 6, 2020 at 4:52:32 AM UTC-7, Shareda wrote:
>>
>> Hello! I want to improve link styling in my TiddlyWiki, and I need some 
>> help. In my wiki almost every tiddler describes some concept. Each concept 
>> (tiddler) has a numerical field "weight". I want links to any concept 
>> tiddler that has a "weight" field to be displayed with style="background: 
>> rgba(255,0,0,)". I found the widget link.js, but for some 
>> reason my changes do not affect the display. Where exactly should I insert 
>> my code so that all wikilinks follow this style. I am new to JavaScript and 
>> TW inner architecture , so it would be very good to get correct code.  
>>
>
> You can achieve this styling with just a small change in the way you enter 
> your links, without modifying any TWCore javascript code.
>
> First, wherever you want to embed a weighted link instead of writing just
> TiddlerTitle or [[Tiddler Title]]
> you write:
> {{TiddlerTitle||wlink}} or {{Tiddler Title||wlink}}
> This syntax is called "Transclusion with Templates" (see 
> https://tiddlywiki.com/#Transclusion%20with%20Templates).
> What it does is to render the indicated tiddler title, using the content 
> from "wlink" (short for "weighted link").
>
> Then, create the "wlink" tiddler, containing this text:
> <$link>
> addsuffix[ / 100));]] }}}>
>   <>
>
> 
>
> Notes:
> * Within this "template" tiddler, the currentTiddler value is the 
> TiddlerTitle you specified in the transclusion syntax
> * The $link widget outputs a link (using the currentTiddler value as its 
> default target)
> * The span inside the $link constructs the style using an "inline filter" 
> (the {{{ [...] }}} syntax)
> * This inline filter starts with literal text: "
> *background:rgba(255,0,0,calc(*", then appends a value retrieved from the 
> "weight" field of the currentTiddler, and then adds the remaining literal 
> text:  "*/ 100));*"
> * Thus, the resulting style is: "*background:rgba(255,0,0,calc(nnn **/ 
> 100));*", where "nnn" is the value from the weight field.
> * Finally, inside the span, the actual tiddler title is displayed
>
> enjoy,
> -e
>

-- 
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/9156fd55-d7e5-4e3c-bba2-b3c297b222adn%40googlegroups.com.


[tw5] Global wikilink styling depending on the target "weight" field value

2020-09-06 Thread Shareda
Hello! I want to improve link styling in my TiddlyWiki, and I need some 
help. In my wiki almost every tiddler describes some concept. Each concept 
(tiddler) has a numerical field "weight". I want links to any concept 
tiddler that has a "weight" field to be displayed with style="background: 
rgba(255,0,0,)". I found the widget link.js, but for some 
reason my changes do not affect the display. Where exactly should I insert 
my code so that all wikilinks follow this style. I am new to JavaScript and 
TW inner architecture , so it would be very good to get correct code.  

-- 
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/b03179ad-b100-4501-9972-5ca39c45a126n%40googlegroups.com.


[tw] Re: Serving TW5 on remote Node.js server. When access tiddlywiki from browser, tw5 script fails with error: The header content contains invalid characters

2017-08-23 Thread Shareda
Wow! 
As I initialize new empty wiki with username "u1" & password "p1", the 
problem disappears. I can create new tiddlers. I even can replace new 
tiddlywiki files by files from the first one. 

But if i change username and password (when starting this new tiddlywiki), 
the problem is back.

So, by now i found only this way to use node.js version of TW5 on remote 
VPS (CentOS 6): 
1. init new tiddlywiki; 
2. sart tiddlywiki server with final username & password;
3. use, use, use;
4. don't change username & password when restarting server; 
5. don't run another instances on differnt ports with different 
username
6. if 4 or 5 is violated, then access became impossible, go to 1.


-- 
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/2506a1fd-f297-4ced-b2b4-52f252a69474%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Serving TW5 on remote Node.js server. When access tiddlywiki from browser, tw5 script fails with error: The header content contains invalid characters

2017-08-23 Thread Shareda
I've reinstalled node.js LTS and even tried  Node.js 8, but error is the 
same (ecxept line numbers). Hmm... What can it be? 

среда, 23 августа 2017 г., 1:29:51 UTC+6 пользователь Shareda написал:
>
> вторник, 22 августа 2017 г., 15:03:02 UTC+6 пользователь 
> RichardWilliamSmith написал:
>>
>> Does it work locally, if you run the same server on your own machine?
>>
>
>
> Yes! It works locally, if i run server with the same prms. I can set any 
> usernames, passwords, ports, and access from any browser, tw5 is ok!
>
> Thanks, RichardWilliamSmith!  
> As I see now, the problem is on my VPS/CentOS6/Node.js installation. Is it 
> correct? And what i should try first?
>
>

-- 
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/decdda20-b424-41c5-bbe8-02833dca870b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Serving TW5 on remote Node.js server. When access tiddlywiki from browser, tw5 script fails with error: The header content contains invalid characters

2017-08-22 Thread Shareda
вторник, 22 августа 2017 г., 15:03:02 UTC+6 пользователь 
RichardWilliamSmith написал:
>
> Does it work locally, if you run the same server on your own machine?
>


Yes! It works locally, if i run server with the same prms. I can set any 
usernames, passwords, ports, and access from any browser, tw5 is ok!

Thanks, RichardWilliamSmith!  
As I see now, the problem is on my VPS/CentOS6/Node.js installation. Is it 
correct? And what i should try first?

-- 
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/b992fc78-4955-482c-bfc0-acc37c0d3c0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Serving TW5 on remote Node.js server. When access tiddlywiki from browser, tw5 script fails with error: The header content contains invalid characters

2017-08-22 Thread Shareda
Hi, Tony and RichardWilliamSmith! Thanks for your answers!
Tony, yes I restarted whole VPS to exclude other test instances of 
TiddlyWiki, but behaviour just the same: as I request : from 
browser, password-protected TW5 server fails with that error. 

I tried oter ports - the same result. Also I tried different simple 
usernames and passwords:  & , user & pass, "uu" & "pp",  "" & "" , 
but only the last combination works. 

Yet I did not try to find, learn and start server my own local machine.

Single file copy works fine.

вторник, 22 августа 2017 г., 15:03:02 UTC+6 пользователь 
RichardWilliamSmith написал:
>
> Could it just be an "invalid character" in your username? Have you tried 
> it with the simplest possible username/password combo? 
>
> Does it work locally, if you run the same server on your own machine?
>
>
 

-- 
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/7022ff60-4834-4bf0-8a6e-1301aa24c5b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Serving TW5 on remote Node.js server. When access tiddlywiki from browser, tw5 script fails with error: The header content contains invalid characters

2017-08-21 Thread Shareda
If I remove username & password, then everything works fine, but i need to 
limit access.

-- 
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/d7077302-4d4c-4c72-a697-25bdbbab3708%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Re: Serving TW5 on remote Node.js server. When access tiddlywiki from browser, tw5 script fails with error: The header content contains invalid characters

2017-08-21 Thread Shareda
Maybe somebody knows, what can I fix to make tw5 work with this parameters?

-- 
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/fbc3cf71-6716-494a-9f89-94d97ea8c79e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] Serving TW5 on remote Node.js server. When access tiddlywiki from browser, tw5 script fails with error: The header content contains invalid characters

2017-08-21 Thread Shareda


Hi there! 

Serving TW5 on remote Node.js server. When access tiddlywiki from browser, tw5 
script fails with error: The header content contains invalid characters

[root@mrv ~]# tiddlywiki --version  
   
5.1.14  
   
[root@mrv ~]# tiddlywiki /var/www/alx/data/mi/mrv --server 7776 
$:/core/save/all text/plain text/html "u3" 
"p3" 134.0.112.34   
   
Serving on 134.0.112.34:7776
   
(press ctrl-C to exit)  
   
syncer-server-filesystem: Dispatching 'save' task: $:/StoryList 
   
FileSystem: Saved file /var/www/alx/data/mi/mrv/tiddlers/$__StoryList.tid   
   
_http_outgoing.js:318   
   
throw new TypeError('The header content contains invalid characters');  
   
^   
   

   TypeError: The header content contains invalid 
characters  
at storeHeader (_http_outgoing.js:318:11)   
   
at ServerResponse.OutgoingMessage._storeHeader (_http_outgoing.js:227:9)
   
at ServerResponse.writeHead (_http_server.js:221:8) 
   
at SimpleServer.requestHandler ($:/core/modules/commands/server.js:110:13)  
   
at emitTwo (events.js:106:13)   
   
at Server.emit (events.js:191:7)
   
at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:546:12) 
   
at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)

-- 
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/6344bbb9-8143-4474-9860-be0bb64f16a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.