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

Titles and text exactly correct? Out-of-the-box, almost! The 'no' part is note titles as these are taken from the body copy of the new note using the first c.64 characters - see this aTbRef page for more (I just added it as part of this answer).

However, this TB wiki page discusses TB code you can use to truncate a note's title to the first sentence. Actually, it would be neat if that were an explode option, but meanwhile you can do some automation. For instance an agent could find all notes that are children of 'Exploded Text' and (re-)set their titles. To keep the agent in limted scope (i.e. doing less searching) you might use a container specifically as your 'Explode Centre' and limit the agents query to only search within that containers children.

You could even, in v4.1+, use the Container attribute in your actions/rules to move the exploded content automatically to a new location in your TB file.

So whilst it's not all done for you, with a little coding in TB you should be able to achieve all you want for your import & explode process.

If your notes from the handheld, etc., are plain text format (i.e. no bold, etc. mark-up) then you can drag the note to a TB view, and select Note menu -> Explode...

The result of Explode is that your selected (exploded) note gains a child container called 'Exploded Text' that in turn contains all the new notes from the Explode process. Using this extra container allows for the edge case where the note to be exploded already has children and thus keeping the Explode-created notes separate from them.

Ideally, another similar rule might/would delete the title text+delimiting marker from the start of the body copy, otherwise the start of each note would look a bit strange. Apologies - I'm not sure-footed enough with regular expressions to suggest what that code would be.

For those not used to using it, the bullet symbol (•) is easily typed with the Opt+8 key combo.

Use a single agent to set correctly both title and text:_Query: #inside(Exploded Text)&Text((.*)(~)(.*))Action: Name=$1;Text=$3

The first part of the query seeks to limit the scope of the query, but would still match more than one current 'Exploded Text' container. So, if you're using this method a lot you could leave this agent in place a permanent utility.

If your title/text delimiter were tilde+space rather than just tilde, change the (~) in the query to (~ ) or whatever delimiter variant you need, e.g. (~~), (##), etc.

I'm aware the smart way to do this is with regexp lookahead/lookbehind syntax but I couldn't make these work. Doubtless someone here with real regexp skills will offer a more elegant example, but for now the above method works fine.

I have had trouble getting the pre/post-match regexp stuff working. I don't think these syntax options even exist in Tinderbox's implementation, but I could be wrong on that. I've always just encapsulated things with triple back-references like you are doing here.

Pre-indent what? Paragraphs. Just the first? Only the first? all? Is this in the TB note or/both the HTML output?

Assuming it's for internal copy and each note is just one paragraph that you wish to start with a tab intent, I'd assumed this revised agent action might work - Name=$1;Text=\t+$3 - the '\t' being a tab character. But it doesn't work. Quoting it, "\t" doesn't work either as this make the tab placeholder into the text \t". I'm not sure what placeholder if any we can use here to insert a tab at the front of the paragraph text.

Also tried HTML/XML encoding of Tab character as &09; but that doesn't work either. you might do better to pass the text to a command line tool and concatenate there before setting the output to the Text attribute, but the latter's not my area of expertise.

In short, no, not in one pass. I suspect once you get into working out the N-level split delimiters in your source text it's probably quicker to do by drag drop once in Tinderbox, especially (as above) you can easily extract the tittle from each note.

You might, by seeding a nesting level code (1, 1.1, 1.1.1, etc.) into the source text be able to assign notes to containers using an action setting the Container attribute but not do that and remove such delimiters. Still, I've not tried this and I suspect it would be prone to unexpected results. I still think manual reordering would be faster/more accurate.

Of course you could do successive explodes based on different delimiters...but then you wanted to do this in one pass.