Tips on Debugging CONTENTS CONTAIN MATCH on PDF Files

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

I’m trying to run Hazel rules against PDF statements from a financial institution using CONTENTS CONTAIN MATCH.

How can I “see” what Hazel sees as it goes through the contents of a PDF file looking for a match?

Yes, I already tried the terminal command mdls which just returns file attributes. I’m looking for the file’s content, not its attributes.

I’ve tried running my cursor from left to right, top to bottom (while the PDF is open in Preview) in an attempt to identify the sequence of the content but the results are difficult to track since selected contents sometimes jumps block to block in different unintelligible columns.

There simply must be a better way to debug CONTENTS CONTAIN MATCH conditions on PDF files.

Thank you for your help.
nlucchesi
 
Posts: 35
Joined: Thu Jan 16, 2014 1:33 pm

Use Hazel's preview function. Check the manual for more details but you can preview the values for any attributes there.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Use Hazel's preview function.


Yes, thank you. After reading the manual’s preview entry carefully, I now see that I can click on the and to reveal the full text of the PDF:

Code: Select all
You can click either of these items to see a popover with the current value of the attribute in question as well as any  custom attributes  you’ve defined.


Thank you.
nlucchesi
 
Posts: 35
Joined: Thu Jan 16, 2014 1:33 pm

Mr_Noodle wrote:Use Hazel's preview function.


Yes, preview does show the PDF’s text very clearly.

But it is very tedious to use:
  1. I have to resize the small viewport every time that I open it.
  2. Preview window closes every time I edit the Rule, so I have to re-size again.

It would be nice to see the the Elements that do match even though the Rule as a whole does not match. As it is now, if a Rule doesn’t match, then I have to re-type it from the beginning and watch to see when it stops matching.
nlucchesi
 
Posts: 35
Joined: Thu Jan 16, 2014 1:33 pm

You can "tear off" that popover so that it stays on screen.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support

cron