--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@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/ebad32fa-60c1-4434-a943-350812eb47d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Mark
thanks for the clarification, it would be nice if the filter could detect all links sourrounded by double brackets.
-Jan
PS:
It would be great if the LinksOperator hat a field parameter...
Am 14.07.2019 um 12:03 schrieb Mat:
>or else it would probably be veeery tricky to find them.--
Pah! I'm exaggerating. It is "just" a matter of creating the right regexp for it. Not that I could do 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 tiddl...@googlegroups.com.
Hi Mat,
Unfortunately filtersyntax gets so terribly complicated when the param contains squarebrackets.
This here causes a syntax error: [!is[system]regexp[/\[.*?\]/g]]
And how do I enter the suffix for the field?
-Jan
Am 14.07.2019 um 12:03 schrieb Mat:
>or else it would probably be veeery tricky to find them.--
Pah! I'm exaggerating. It is "just" a matter of creating the right regexp for it. Not that I could do 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 tiddl...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@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/3989d192-3218-4d29-8eef-114071e5fcc4%40googlegroups.com.
/*\
title: $:/core/modules/macros/roles.js
type: application/javascript
module-type: macro
Making some replacements in Textinputs
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name = 'roles';
exports.params = [{ name: 'text' }];
/*
Run the macro
*/
exports.run = function(text) {
text = text.match("/\[.*?\]/g");
return text
} ;
})();
Hi Mark!
I have tried out your proposition but alas, the filter is not working the way I would like it to work:
So far it looks for Tiddlers that have the field "myfield", it should look for Links in this field.
I have tired several variations with get[] and list[] to have the dialoguebut it nearly seems impossible to filter the result for [[square brackets.
Jan
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@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/d6d097cf-30ba-41fd-8a98-4f033553737f%40googlegroups.com.
Widget
/*\
title: $:/core/modules/macros/roles.js
type: application/javascript
module-type: macro
Making some replacements in Textinputs
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name
= 'roles';
exports.params = [{ name: 'text' }];
/*
Run the macro
*/
exports.run = function(text) {
var regex = /\[.*?\]\]/g;
var found = text.match(regex);
var remove = found.join();
var result = remove.replace(/,/g, ' ');
return result
} ;
Macro
\define preroll()
<$macrocall $name="roles" text={{!!dialogue}}/>
\end
\define rollen()
<$wikify name=rollo text=<<preroll>>
output="text">
<$list filter=<<rollo>> >
{{!!title}} <br>
</$list>
</$wikify>
\end
How can I handle that?
Jan
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@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/7ea4f8ae-889d-4664-a6f5-5c49ba5d14a9%40googlegroups.com.
var regex = /\[.*?\]\]/g;
Should be this
var regex = /\[\[.*?\]\]/g;
So then we end up with:
/*\
title: $:/core/modules/macros/roles.js
type: application/javascript
module-type: macro
Making some replacements in Textinputs
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name
= 'roles';
exports.params = [{ name: 'text' }];
/*
Run the macro
*/
exports.run = function(text) {
var regex = /\[\[.*?\]\]/g;
var found = text.match(regex);
var remove = "[[" + found.join("]] [[") + "]]";
//var result = remove.replace(/,/g, ' ');
var result = remove ;
return result
} ;
})();
Now you get the links listed one after another. However, they're not listed AS links because they're viewed as text strings. You
can probably use <$link> widget to turn them back into links, if that's what you want.
Good luck
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@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/85a2bf4f-58e3-4d63-ad4c-4e1df9567dee%40googlegroups.com.
if (text !== null) {...
avoids red alerts which were happend before so we have this:
/*\
title: $:/core/modules/macros/roles.js
type: application/javascript
module-type: macro
Making some replacements in Textinputs
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
/*
Information about this macro
*/
exports.name
= 'roles';
exports.params = [{ name: 'text' }];
/*
Run the macro
*/
exports.run = function(text) {
if (text == null) {
var text = " ";
}
var regex = /\[\[.*?\]\]/g;
var text = text.match(regex);
if (text !== null) {
var text = "[[" + text.join("]] [[") + "]]";
return text
}
} ;
})();
It would be nice to turn this into a general extract macro with
start and end parameters and the option to keep or chop start and
end. So far Thomas Elmingers extract Macro did this Job for me but
some things like those brackets are stubborn. I will see what I
can achieve.--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@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/6155117b-6ad0-4e1a-bce6-721a09de8d8a%40googlegroups.com.
I will see what I can achieve.
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/944ac564-ed79-4571-8df6-950e73f493d9%40googlegroups.com.
Hej Mat,
I am a little stuck, I ve been looking for the site for the site Widgets for beginners but it seems to be down. (https://groups.google.com/forum/#!topic/TiddlyWiki/qgNY0iKRrOU) but it seems to be gone.
The extract.js widget should have the following params:
filter: A filter defining on which tiddlers the widget shall be applied,
start: A start string
end: An end string (which is the same as the start-string if nothing is defined
skip: A value determening whether start-string and end-string shall be chopped from the result. Default:yes/remove
Sorry, at the moment it appears that I can't even enter the params properly. Defining the filter and getting seems to be the hardest task.
Jan
Am 21.07.2019 um 22:30 schrieb Jan:
Hi Mark,
you are right, I will try to finish this right now. I was preoccupied with the importing of text-files as you can see in Szenio.de/Test the last days
Jan.
Am 21.07.2019 um 21:57 schrieb Mat:
--Jan wrote:
I will see what I can achieve.
Jan, are you making any progress with this? I'm really curious to see what you achieve. As you may know, I once created the cherrypicker macro which was later a basis for T.Elmigers exctract macro, and I've always felt there should be a proper js solution to this (mine is only wikitext).
<:-)
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 tiddl...@googlegroups.com.