Storing Explode Note Settings

I’m developing a new workflow for my blog and using explode on notes for the first time. I’m archiving daily journal posts in DEVONthink. At this point I’m dragging them over to Tinderbox for further processing.

I’ve got the explode dialog working well to break the markdown text up into notes based on headings and breaks, and now I’m figuring what kind of action I want on explode to prototype the notes in the exploded notes child.

As far as I can see from searching the forum and aTbRef, this is only available through the menu and dialog. How do folks store the regex and actions? Once I save and close, my inputs are gone.
Can explode be a stamp or on add action to use saved parameters here?

This isn’t immediately helpful, but we’re exploring a new, experimental approach to this sort of task.

To that end, it would be useful to use if you could email an example of the data you’re exploding, and the sort of actions you have in mind.

Noting the earlier reply above, but looking to the shorter term, action code stamp() allows you to run code stored in a stamp. It gets harder if you want to use input, as if with a function.

The explode regex are harder to store as the UI holds a literal string of the regex (if used). IIRC it remembers the last-used regex (though possibly only for the current session).

In the past if I really need to save some code in case I want it again, I add the built-in ‘Code’ prototype and then make notes using the prototype to hold code, often with a short text note explaining what/why. From experience, i add the latter at the end after several blank lines. the makes it easier to open the note and drag select the code without picking up the comment. Of course, action code can now have comments.

Mark

It’s simple. I’m writing blog posts in Markdown where a post has one level of headers using # and a few horizontal rules with ***.

So using ***|# as delimiter works fine. My workaround for now is to use text expander to store the regex and the action I’m working on. Right now I"m working on just renaming the exploded notes containerl. Working in outline view and manually processing may end up being just as easy.

Frustratingly, you don’t say what you are working around, which makes it hard to help.

It stikes me you may have overlooked the built-in ‘Exploded Notes’ prototype—which is applied automatically to any exploded notes created by explode (notice different case of naming [sic]). You can add this, before using Explode and customise it, e.g. the OnAdd, so the code is in place before running your automation.

Just turning in here , but I can miaging the prototype having a code like with steps like:

*set $Container of child notes (i.e. new exploded notes) to the parent (i.e siblings of exploded notes or a level higher (i.e. siblings of the source note) or some other location).

  • test there are now no children
  • delete the exploded notes that is the child of the source notes (moot if you know only ione such container exists at the time)

So, what is the real problem we are trying to solve here?

Remember: explode’s delimiters are regular expressions. So you likely need to search for horizontal rules via ***

Sorry not to make myself clear. My regex and all work fine. I use
***|#
and that divides by headline or horizontal rule in a markdown post.

The pain point is that exploding is a menu choice that leads to a default dialog box. It holds the last regex until the app is closed. Then it goes back to the default behavior.

I really was just asking whether it’s true that the only path to explode is through the menu and that dialog box. I saw in aTBXref that actions and stamps never create and never delete notes, so I figured that it was why Explode is not available as an action in any way.

So I have to type the regex in every time I use it. So my workaround is using the app TextExpander to input the regex and the action codes when I type a shortcut. but it would be nicer if I could drop the markdown note onto a container and and action of that container would be to explode the notes without my every time having to do a menu, dialog click, fill out two fields and explode

It’s been discussed and I’m sure it is on the ‘feature request spike’. But you are correct, Explode can’t be called directly via action code. If really needed, action code can call run command that could invoke Keyboard Maestro, or AppleScript, or such to ‘press’ the menu item for you, though I suspect it might just be easier to invoke things manually like you describe above.

I note the inference that were an explode() action to be added, it would be useful if per-invocation settings could be passed in. Now we have Dictionary data types, that might be a nice way to input the (non-default0 choices for the explode.

Lastly, the is (or was!) a shortcut for Explode. My current page for the Note menu is out of date (noted, for repair). The ⌥⌘E shortcut now cycles the text pane tabs. The new shortcut allocated to Explode is ⇧⌘E but as at v9.0.0 it appears to not be connected in the app (doubtless it will return).

†. If I recall, there were concerns about users accidentally creating a runaway situation the where the app keeps dong explodes in some recursing matter. IOW, the ‘work’ of implementation is more about fencing of predictable but unwanted effects more than ‘just’ calling an existing function.

1 Like

Note menu page now updated.

1 Like