Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Setting a date attribute from a date in note text (Read 6415 times)
Fionnbar Lenihan
Full Member
*
Offline



Posts: 18

Setting a date attribute from a date in note text
Nov 15th, 2007, 6:54pm
 
Hi
I am experimenting with using Tinderbox for creating a log or a work time diary  to account for every minute of my day for a few weeks (it's part of our appraisal process God Bless the NHS).

Using the email to Tinderbox function I can email in my notes from work or from my PDA on the move.

Basically, when I finish something I send the document email address an email with the thing I've been doing in the email header.

eg
Did pointless paperwork

The text of the email is like this

date:15-11-2007
start:15.10
end:15.45

I've created attributes called diaryday, starttime, endtime and a prototype, protodiaryitem which has these as key attributes.

I've set an OnAdd action for the mail container to make incoming notes use the protodiaryitem prototype.

prototype=protodiaryitem

I would like to be able to have a note set it's own diaryday, starttime and endtime from the text in the note.  I initially thought it would be simple (like on page 75 of the Tinderbox Way) but I hadn't thought it through - each note will have a different time and/or date.  

I guess it would need the date and time text to be stored in a variable of some sort and then the attribute is set to the variable rather than a constant if that makes sense.  

Not sure how to do that though

Help gratefully received

Fionnbar

Back to top
 
 
  IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Setting a date attribute from a date in note t
Reply #1 - Nov 15th, 2007, 7:28pm
 
Suggested outline: use regex to isolate the dates and times in $1, $2, etc.

Then assign date attribute from the regex.

Busy prepping for Tinderbox weekend here -- happy to flesh this out after the event, but you vcan likely solve it from this.
Back to top
 
 
WWW   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: Setting a date attribute from a date in note t
Reply #2 - Nov 16th, 2007, 12:36pm
 
There's an experimental feature in the latest Tinderbox beta, incidentally, that lets you email notes to Tinderbox with instructions for setting attributes.  This means you could say:
Quote:
Tinderbox: /UrgentIdeas [Color=red;Status=Important;]

in your email, and Tinderbox would act accordingly.

I'm breaking the rule here about discussing beta features.  This is a one-time event; the rule is still the rule. -- MarkBernstein
Back to top
 
 
WWW   IP Logged
Fionnbar Lenihan
Full Member
*
Offline



Posts: 18

Re: Setting a date attribute from a date in note t
Reply #3 - Nov 16th, 2007, 7:28pm
 
All legal systems require exceptions

Smiley

Thanks for that.  The latter feature might be easier than mastering regexps at my age

Fionnbar
Back to top
 
 
  IP Logged
richratzan
Full Member
*
Offline



Posts: 3

Re: Setting a date attribute from a date in note t
Reply #4 - Jun 17th, 2008, 4:16pm
 
i apologize in advance if this has already been covered and/or worse am in wrong thread

what i have just started doing for dates is using an attribute for date and setting it to a string and then writing date out yyyymmddtime where time is a four digit military time

for example, if a character dies at any age, at 4:30pm on june 22, 1948, i set key atttribute to datehap (or some such shorthand for it being a date) and enter 194806221630 and then switch to outline and sort by datehap (which is really sorting strings)

i initially tried above with setting attribute to number, not string, but once you get past 8 digits, e.g. 201206171604 (the date and time of this note), tinderbox converts it into the number 2147483647, a number i do not understand (does not look like hex). this is not a problem with string

works better for me than the date attribute, which i have found quirky depending whether you write june 22, 1948 4:30pm, or 6/22/48 4:30pm


rich ratzan, an admittedly wet behind the ears tbx newbie and scripting/programming ignoramus
using tbx 4.2.3 on a macbook 2.16 intelcore 2 duo, 2 GB ram, os 10.5.3
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print