> I have different work routines for Monday, Tuesday,..., and i would
> like to generate a journal entry each day were the content would be
> the routine for that day? (Kind of a TODO list for that day with the
> task i have to do)

"generate a journal entry" == <<newJournal ...>> macro

"content ... for that day" == default text for new journal tiddler

First, define default content for each day using 7 separate tiddlers
(e.g., DailyList-Sunday, DailyList-Monday, DailyList-Tuesday, etc.).
Then, embed the following <<newJournal>> macro into your desired
location (e.g., MainMenu):

<<newJournal "YYYY0MM0DD" text:{{
   var day=config.messages.dates.days[new Date().getDay()];
   store.getTiddlerText("DailyList_"+day,"");}}>>

What it does:

The text:"..." macro parameter is used to set the default content for
the newly created tiddler.  By using the *evaluated parameter* ("eval
param") syntax, {{...}}, we can generate the desired default content
programmatically, instead of just using static text.  In this case,
the eval param first uses the current date to lookup the day name in
an array defined by the TWCore (config.messages.dates.days).  It then
uses the day name to construct a 'source' tiddler name (i.e.,
"DailyList_"+day) and retrieves it's content.  If the source tiddler
is absent, the content for the new journal tiddler will be blank.

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

*** HELP ME TO CONTINUE TO HELP YOU! ***
TiddlyTools NEEDS your FINANCIAL support...
Make a generous donation today:
   http://www.TiddlyTools.com/#Donations

*** ANALYSIS, DESIGN, and CUSTOM SOLUTIONS ***
Professional TiddlyWiki Consulting Services...
   http://www.TiddlyTools.com/#Contact

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to