[tw] Re: [TWC] Fet script question

2015-01-26 Thread sklpns
Works like a charm. Thank you very much sir.
sklpns

-- 
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.


[tw] Re: [TWC] Fet script question

2015-01-25 Thread Tobias Beer

>
> Tobias, I'm at a loss for words, thank you very much indeed.


You're welcome. 
 

> I'm testing the script for the last couple of hours, 
>
finding a minor glitch, as it doesn't show January expenses (first row).
>

Of course. Fixed. ^^

Get the update from here...
S: yearly income report @ scripts 


Best wishes, Tobias. 

-- 
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.


[tw] Re: [TWC] Fet script question

2015-01-25 Thread sklpns
Tobias, I'm at a loss for words, thank you very much indeed.
I'm testing the script for the last couple of hours, finding
a minor glitch, as it doesn't show January expenses (first row).
 Could be I mistyped something, as my data fields have different
names (01 instead of Jan), though the other month rows work.
Again, Tobias, thank you very much.
sklpns

On Sunday, January 25, 2015 at 7:38:27 PM UTC+2, Tobias Beer wrote:
>
> Hi sklpns,
>
> Here's that inline script...
> S: yearly income report @ scripts 
> 
>
> Best wishes, Tobias.
>

-- 
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.


[tw] Re: [TWC] Fet script question

2015-01-25 Thread Tobias Beer
Hi sklpns,

Here's that inline script...
S: yearly income report @ scripts 


Best wishes, Tobias.

-- 
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.


[tw] Re: [TWC] Fet script question

2015-01-25 Thread sklpns

Hi Tobias and, again, thank you very much for your input.

Indeed, using fields would be cleaner but in my actual case I'm using
form tiddler plugin  
(along with data tiddler plugin) 
 as a means of an 
interface
to input values and I wouldn't know how to make that store data in generic 
fields.

Also, in my actual wiki, years are taken into consideration, ie there are
separate data fields for days, months and years for each expense tiddler,
so the fet you provided does brilliantly what its asked to do: create a 
table row for
each expense with the relevant fields. In my case they are sorted by date.

The thought was to create a table with a different perspective:
show me only twelve rows per year. Each represents a month.
Show me total month expenses, income, and their difference.
And show me the expenses and income sums in the course
of a year. Something like

   
expenses expense line income income line monthly result  JAN 2014 379  379  
374  374  -5   FEB 2014 231  610  374  748  143   MAR 2014 264  874  374  
1.122  110   APRIL 2014 207  1.081  913  2.035  706   MAY 2014 491  1.572  
368  2.403  -123   JUNE 2014 430  2.002  374  2.777  -56   JULY 2014 861  
2.863  374  3.151  -487   AUG 2014 221  3.084  317  3.468  96   SEP 2014 945  
4.029  929  4.397  -16   TOTAL

which in turn would be used to create a meaningful graph like this 



which represents both monthly and total budget progression 

In essence, the same fet you provided, but focusing on monthly sums.

Found this inline script

 
   var out=[]; 
   var sum=0; 
   var tids=store.getTaggedTiddlers('
timesheet'); 
  for (var i=0; i
 
thread which will return the result for each tiddler tagged expense BUT I 
don't know how to fliter in the appropriate tiddlers. In my case all 
tiddlers are tagged with expense (and nothing else). If we write something 
like
  
var tids=store.getTaggedTiddlers('
expense') && tiddler.data("month") == "Dec";
the script wont work.

A solution would be to make script check for specific words in the tiddler 
text but I haven't found a way to do that.

I can define the appropriate tiddlers using a fet (fetch all the tiddlers 
needed by writing 


[tw] Re: [TWC] Fet script question

2015-01-21 Thread Tobias Beer
Hi sklpns,
 

> Would it be remotely possible, using FET or, maybe, inline javascript 
> plugin, to somehow automate the process?
>

Sure, but at that point I would stop trying to stuff it into FET,
as it's far too inflexible and cumbersome.

gather the monthly data with fet
>

The first problem I notice is that you never even talk about years.
At what point do you need to take that into consideration?
Anyhow, I would calculate that with an inline script.
Much simpler, and easier to read.

Also, do you really need (hidden) data?
Why not use generic slices or even fields?
Wouldn't that be cleaner?

click a button to update the content of the tiddler which holds the graph 
> data
>

That should automatically update when you open it,
unless you want it to only render at the click of a button.
 

> http://charts.tiddlyspace.com 
> 
> automatically update the tiddler that holds the graph and view it?
>

Same as above.
I never worked with those charts, though,
so I'm not sure what format they expect precisely,
as you seem to want multiple bars per month, i.e. table rows.

Perhaps you try to figure that part out yourself, first,
e.g. construct a demo table and see if you can
get that plugin to show you a meaningful graph?

Best wishes, Tobias.

-- 
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.


[tw] Re: [TWC] Fet script question

2015-01-21 Thread sklpns

Tobias, friends, a couple of follow up questions, If I may:
1. how would we go about to produce the same kind of report but on a 
monthly basis?

something like

 |TOTAL EXPENSES | TOTAL INCOME | RESULT | TOTAL 
EXPENSES SUM | TOTAL INCOME SUM|
JAN 2015   
FEB 2015
MAR 2015
APRIL 2015

2. TiddlyChartsPlugin (http://charts.tiddlyspace.com/) allows the creation 
of graphs 
based on data of the following format

|Month|1|2|3|4|5|
|Jon's Money|100|200|700|800|300|
|Colm's Money|50|500|300|900|700|
|Matt's Money|250|550|330|400|2700|

stored on tiddlers.

Would it be remotely possible, using FET or, maybe, inline javascript 
plugin, to somehow automate the process?
Something like 
*gather the monthly data with fet
*click a button to update the content of the tiddler which holds the graph 
data
*automatically update the tiddler that holds the graph and view it?

Just wishing here, manually editing the relevant tiddlers is of course no 
biggie,
just thinking out loud.

Again, Tobias, thank you very much indeed.

sklpns  





-- 
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.


[tw] Re: [TWC] Fet script question

2015-01-13 Thread sklpns
This is brilliant Tobias, thank you very much indeed.

sklpns

-- 
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.


[tw] Re: [TWC] Fet script question

2015-01-12 Thread Tobias Beer
And here's a demo...

http://scripts.tiddlyspace.com/#%5B%5BF%3A%20income%20report%5D%5D

Best wishes, Tobias. 

-- 
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.


[tw] Re: [TWC] Fet script question

2015-01-12 Thread Tobias Beer
Now, let's make all that a little more readable...

<>


Best wishes, Tobias.

-- 
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.


[tw] Re: [TWC] Fet script question

2015-01-12 Thread Tobias Beer
The below assumes...

   1. that you tag any individual receipt with *receipt*
   2. that you define expenses as an *expenses* data field (can be 
   undefined)
   3. that you define revenues as an *revenues* data field (can be 
   undefined)

<>

Best wishes, Tobias.

-- 
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.