Debug during rule creation - how? & a UI idea for noodlesoft

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators

Hello!

First - new user to Hazel (just got a scansnap) and as a coder and general power user… man, I love this program!

Now the question - I’ve converted a huge number of documents, mostly bills, and have a process to create and test rules. I'm able to do some really cool things with recognizing the biller, pulling out the statement date and amount due, putting that in the filename and sorting by biller. All within Hazel! Awesome!

But... I’m often finding that a rule that for all I can tell should work, just isn’t matching a file. Eventually, through a painstaking process of creating duplicate rules with a subset of match conditions I can usually figure out what condition isn’t working, and then figure out why. But definitely not always, and its definitely not easy. I still am often ending up with files that I just can't get a match with.

To other rule creators: is there already some way to watch a rule in action on a specific file and see what is or isn’t working? How do you debug your rule creations, especially the "contains match" conditions?

To the good folks at noodlesoft: Thinking about the problem, and as a tool designer myself, here’s a suggestion:
I’d love to be able to pick one (or even better, more than one) sample file while working on a rule.
Allow the user to open an extension panel on the rule edit window - say, on the right hand side.
- in parallel to the current “Name: “ input line, have a file picker to choose a sample file, and show its name while working.
- in parallel with each condition line in the current window, show a line with the number of matches in the sample file, and possibly one (or more) of the actual matches.
- in parallel with the “Do the following” section, show what will happen to the file assuming it matches

This would provide some real-time debugging during rule creation - even more so if its possible to show more than one sample file column at once. Especially in a case of processing a wide variety of OCR’d scanned bills, this would be a huge help during rule creation! Right now, its basically a black box with no debug environment.


What do folks think? Does this make sense?
VTTimC
 
Posts: 2
Joined: Wed Jan 27, 2016 11:34 am

(Re this... I just found info on the beta, and it sounds like this is already in progress! Can't wait for that. :) In the meantime... the question still stands for other users - how are you doing this now?)
VTTimC
 
Posts: 2
Joined: Wed Jan 27, 2016 11:34 am

As you've surmised, something like this is in the beta. That said, for doing content matches, it will show you the contents as Hazel sees them but not much else. The problem is that while you can highlight matches, you can't really highlight non-matches. There may be partial matches, but there may be a ton of them so as to make it not very useful to highlight. Some thought is needed on that part but at least for now you can view the contents as you are editing the rule.

Are you making use of the current preview function (the "eye" button)? That should go a ways to help you track down issues.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion