Re: [tw] Re: FeT - For Each Tiddler Questions.

2014-06-13 Thread Eric Shulman
On Tuesday, May 27, 2014 2:29:09 AM UTC-7, Jan wrote:
>
>  Wow, what a change a little ' can do...
> The script works fine now allso when it is called in the Template.
> One last wish: Is there a way to supress the reportline for the tiddlers 
> where the field important is undefined?
>

The following script will produce the same output as before, but will skip 
any tiddlers that do not have the "important" field defined... and, if no 
tiddlers have that field, then the entire output is skipped.

var pre="@@font-size:2em;[img(30px,)[Tag.png]] Denken an:\n";
var post="@@";
var out="";
var tids=store.getTiddler("$1").getLinks();
for (var i=0; i

Re: [tw] Re: FeT - For Each Tiddler Questions.

2014-05-27 Thread Jan Johannpeter

Hi Eric
Wow, what a change a little ' can do...
The script works fine now allso when it is called in the Template.
One last wish: Is there a way to supress the reportline for the tiddlers 
where the field important is undefined?


Again thanks a lot Jan.






Am 27.05.2014 01:17, schrieb Eric Shulman:

On Monday, May 26, 2014 3:52:17 PM UTC-7, Jan wrote:

Hello Eric, hello whatever.
Thanks for your two approaches, I think Erics is the one I need,
because I need to call it in a template
I would like to call it up with a macro:
<>
unfortunately it gives me this syntax error message: SyntaxError:
unterminated string literal
Unfortunately I am not able to fix it...


Unlike ForEachTiddler, which requires the snippets of javascript code 
to be enclosed in their own quote delimiters, InlineJavascript allows 
you to write clean pure javascript code without using up some of the 
quotes in the process.  Unfortunately, when I copy/pasted your fET 
code to create my javascript example, I left behind one tiny single 
quote at the end of a line, where it doesn't belong!


Remove the trailing ' from this line, and it should be OK:
|
out+="Für [["+tids[i]+"]]: "+store.getValue(tids[i],"important")+"\n"'
|

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
 http://TiddlyTools.github.com/fundraising.html#MakeADonation

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact
--
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 http://groups.google.com/group/tiddlywiki.
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: FeT - For Each Tiddler Questions.

2014-05-26 Thread Eric Shulman
On Monday, May 26, 2014 3:52:17 PM UTC-7, Jan wrote:
>
>  Hello Eric, hello whatever.
> Thanks for your two approaches, I think Erics is the one I need, because I 
> need to call it in a template
> I would like to call it up with a macro:
> <>
> unfortunately it gives me this syntax error message: SyntaxError: 
> unterminated string literal
> Unfortunately I am not able to fix it...
>

Unlike ForEachTiddler, which requires the snippets of javascript code to be 
enclosed in their own quote delimiters, InlineJavascript allows you to 
write clean pure javascript code without using up some of the quotes in the 
process.  Unfortunately, when I copy/pasted your fET code to create my 
javascript example, I left behind one tiny single quote at the end of a 
line, where it doesn't belong!

Remove the trailing ' from this line, and it should be OK:
out+= "Für [["+tids[i]+"]]: "+store.getValue(tids[i], "important")+"\n"'

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
   http://TiddlyTools.github.com/fundraising.html#MakeADonation

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: FeT - For Each Tiddler Questions.

2014-05-26 Thread Jan Johannpeter

Hello Eric, hello whatever.
Thanks for your two approaches, I think Erics is the one I need, because 
I need to call it in a template

I would like to call it up with a macro:
<>
unfortunately it gives me this syntax error message: SyntaxError 
: unterminated string literal

Unfortunately I am not able to fix it...

Thanks again Jan


Am 26.05.2014 09:27, schrieb Eric Shulman:

On Sunday, May 25, 2014 2:43:51 PM UTC-7, Jan wrote:

I need this to generate a report giving out the value of the field
"important" in the the tiddlers which are Tiddlylinks in a
StoryTiddler created by Erics SaveStoryPlugin.
If the links are:
[[Tiddler1]]
[[Tiddler2]]
...
I want generate
important@Tiddler1
important@Tiddler2

 as wikified output


For some kinds of generated output, it's can be easier to write inline 
javascript code, rather than trying to "shoehorn" fragments of 
javascript into the ForEachTiddler macro syntax.  Here's the code for 
producing the output you desire, using

   http://www.TiddlyTools.com/#InlineJavascriptPlugin


var out="";
var tids=store.getTiddler("SomeStoryTiddler").getLinks();
if (tids.length) {
   out+="@@font-size:2em;[img(30px,)[Tag.png]] Denken an:\n";
   for (var i=0; i  out+= "Für [["+tids[i]+"]]: "+store.getValue(tids[i], 
"important")+"\n"'
   out+="@@";
}
return out;


If you put the above script into a tiddler, e.g. [[ShowStoryStatus]], 
and replace

   var tids=store.getTiddler("SomeStoryTiddler").getLinks();
with
   var tids=store.getTiddler("$1").getLinks();

You can then invoke the script for any desired "story" tiddler by writing:
   <>

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
 http://TiddlyTools.github.com/fundraising.html#MakeADonation

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact
--
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 http://groups.google.com/group/tiddlywiki.
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: FeT - For Each Tiddler Questions.

2014-05-26 Thread Eric Shulman
On Sunday, May 25, 2014 2:43:51 PM UTC-7, Jan wrote:
>
>  I need this to generate a report giving out the value of the field 
> "important" in the the tiddlers which are Tiddlylinks in a StoryTiddler 
> created by Erics SaveStoryPlugin.
> If the links are:
> [[Tiddler1]]
> [[Tiddler2]]
> ...
> I want generate
> important@Tiddler1
> important@Tiddler2
> 
>  as wikified output
>

For some kinds of generated output, it's can be easier to write inline 
javascript code, rather than trying to "shoehorn" fragments of javascript 
into the ForEachTiddler macro syntax.  Here's the code for producing the 
output you desire, using
   http://www.TiddlyTools.com/#InlineJavascriptPlugin


var out="";
var tids=store.getTiddler("SomeStoryTiddler").getLinks();
if (tids.length) {
   out+="@@font-size:2em;[img(30px,)[Tag.png]] Denken an:\n"; 
   for (var i=0; i

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
   http://TiddlyTools.github.com/fundraising.html#MakeADonation

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
   http://www.TiddlyTools.com/#Contact

-- 
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: FeT - For Each Tiddler Questions.

2014-05-25 Thread whatever
Hey!
Try this:
where 'tiddler.title.contains("YourStoryTiddlerTitle")'
Just replace YourStoryTiddlerTitle with the actual tiddler title.
w

On Sunday, May 25, 2014 11:43:51 PM UTC+2, Jan wrote:
>
>  Hey whatever
> Thanks a lot...but it is more complicated...or different.
> I need this to generate a report giving out the value of the field 
> "important" in the the tiddlers which are Tiddlylinks in a StoryTiddler 
> created by Erics SaveStoryPlugin.
>
> If the links are:
> [[Tiddler1]]
> [[Tiddler2]]
> ...
> I want generate
> important@Tiddler1
> important@Tiddler2
> 
>  as wikified output.
>
> I know the rest of the expression (see below), but not the where clause...
> I could not find this in the FeT-Documentation.
>
> Again Thanks a lot
> Jan
>
> (below...)
> < where 
>  ??? 
> write 
> '"Für [["+tiddler.title+"]]: "+store.getValue(tiddler, "important")+"\n"' 
> begin '"...@@font-size:2em;[img(30px,)[Tag.png]] Denken 
> an:\n"' 
>
> end '"@@"' 
> none '""' 
> >> 
>
>
>
>
>
> Am 25.05.2014 15:09, schrieb whatever:
>  
> Hey!
>
> The following outputs all the links in tiddlers tagged "test":
> < 'tiddler.getLinks()+"\n"'>>
> The links are in the same order as they appear in the tiddler, no 
> duplicates.
>
> hth
> w
>
>
> On Saturday, May 24, 2014 7:15:26 PM UTC+2, Jan wrote: 
>>
>> Hello! 
>> I have got questions regarding FeT - where Clause expressions... 
>>
>> How do you formulate a where clause which gives out all Tiddlers linked 
>> in a tiddler. Since it will be transcluded in a <> it 
>> should address the Tiddler containing the macro calling up the FeT 
>> plugin, and not the plugin itself. (See 
>> http://tiddlywiki.abego-software.de/#whereClause%20About) 
>>
>> could this be something like: Tiddler.prototype.getLinks? 
>>
>>
>>
>>
>>
>>
>>
>> I need this to generate a report giving out the value of the field 
>> "important" in the the tiddlers in a storyTiddler containing the Macro 
>> calling up this: 
>> <> where 
>>   ??? 
>> write 
>> '"Für [["+tiddler.title+"]]: "+store.getValue(tiddler, "important")+"\n"' 
>>  begin '"@@font-size:2em;[img(30px,)[Tag.png]] Denken an:\n"' 
>>  end '"@@"' 
>>  none '""' 
>> >> 
>>
>>
>>
>> Thanks for your help 
>> Jan. 
>>
>>
>>  -- 
> 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 http://groups.google.com/group/tiddlywiki.
> 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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: FeT - For Each Tiddler Questions.

2014-05-25 Thread Jan Johannpeter

Hey whatever
Thanks a lot...but it is more complicated...or different.
I need this to generate a report giving out the value of the field 
"important" in the the tiddlers which are Tiddlylinks in a StoryTiddler 
created by Erics SaveStoryPlugin.


If the links are:
[[Tiddler1]]
[[Tiddler2]]
...
I want generate
important@Tiddler1
important@Tiddler2

 as wikified output.

I know the rest of the expression (see below), but not the where clause...
I could not find this in the FeT-Documentation.

Again Thanks a lot
Jan

(below...)
<>





Am 25.05.2014 15:09, schrieb whatever:

Hey!

The following outputs all the links in tiddlers tagged "test":
<'tiddler.getLinks()+"\n"'>>
The links are in the same order as they appear in the tiddler, no 
duplicates.


hth
w


On Saturday, May 24, 2014 7:15:26 PM UTC+2, Jan wrote:

Hello!
I have got questions regarding FeT - where Clause expressions...

How do you formulate a where clause which gives out all Tiddlers
linked
in a tiddler. Since it will be transcluded in a <> it
should address the Tiddler containing the macro calling up the FeT
plugin, and not the plugin itself. (See
http://tiddlywiki.abego-software.de/#whereClause%20About
)

could this be something like: Tiddler.prototype.getLinks?







I need this to generate a report giving out the value of the field
"important" in the the tiddlers in a storyTiddler containing the
Macro
calling up this:
<>



Thanks for your help
Jan.


--
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 http://groups.google.com/group/tiddlywiki.
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.