Matching date with spaces

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

Moderator: Mr_Noodle

Matching date with spaces Tue Jan 21, 2025 10:27 am • by benr
I have a "contains match" rule that sets a custom date token based on file content. Some of the content has spaces in the date (e.g. "1 2 / 1 5 / 2 0 2 4") because of less-than-optimal OCR and therefore Hazel doesn't recognize the string as a date. Is there a way I can set a date format that will match this, or some other way to handle this case?
benr
 
Posts: 1
Joined: Tue Jan 21, 2025 10:19 am

Re: Matching date with spaces Wed Jan 22, 2025 9:52 am • by Mr_Noodle
Have you tried Hazel's text recognition? You can set it to override (it won't overwrite the OCR in the file though).
Mr_Noodle
Site Admin
 
Posts: 11753
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Matching date with spaces Wed Jan 22, 2025 6:16 pm • by robbier1958
Funny, I have the same issue on a monthly statement. It has not always been an issue, but maybe it started a couple of months ago. I already OCR'd the paper document and trashed the paper. I changed the new text recognition feature to "always" for this rule, but that did not help the date issue. HOWEVER, now Rule Preview is reading and recognizing the date using the new text recognition feature!

I think the failure to recognize the date using "rule preview", after I first set text recognition to "always", was caused by not waiting long enough for Hazel to start using the new setting.

Rule Preview says that my the PDF file matches the rule. However, when Hazel processes the folder, no action to the PDF occurs.
Last edited by robbier1958 on Thu Jan 23, 2025 10:40 am, edited 1 time in total.
robbier1958
 
Posts: 4
Joined: Tue Nov 02, 2021 11:13 pm

Re: Matching date with spaces Thu Jan 23, 2025 9:45 am • by Mr_Noodle
Actually, it's a bug where changing the text recognition setting doesn't update the preview. You need to turn the preview off and on or do something else that would cause it to re-try the rule conditions.
Mr_Noodle
Site Admin
 
Posts: 11753
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Matching date with spaces Thu Jan 23, 2025 10:47 am • by robbier1958
Now Preview says the file matches the rule conditions.
However when Hazel processes the folder, this rule does not perform any action (rename the file using the date token, and move the file to a different folder).
robbier1958
 
Posts: 4
Joined: Tue Nov 02, 2021 11:13 pm

Re: Matching date with spaces Fri Jan 24, 2025 10:46 am • by Mr_Noodle
Try the troubleshooting guide here: https://www.noodlesoft.com/kb/hazel-tro ... ing-guide/
Mr_Noodle
Site Admin
 
Posts: 11753
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Matching date with spaces Mon Jan 27, 2025 12:24 pm • by robbier1958
benr wrote:I have a "contains match" rule that sets a custom date token based on file content. Some of the content has spaces in the date (e.g. "1 2 / 1 5 / 2 0 2 4") because of less-than-optimal OCR and therefore Hazel doesn't recognize the string as a date. Is there a way I can set a date format that will match this, or some other way to handle this case?


I have been using a ScanSnap S1300i scanner for a long time, and was using the ScanSnap Settings, File Option, check box "Convert to Searchable PDF" . I recently encountered the same problem that you described. As part of troubleshooting this issue, I have now Disabled File option "Convert to Searchable PDF", and created a new Profile that Sends the Scan to the ABBY FineReader app, which performs the Searchable OCR function, without the spaces in the dates. In my case ABBY FineReader was included with the ScanSnap software package, but I had never saw a need to use it.
robbier1958
 
Posts: 4
Joined: Tue Nov 02, 2021 11:13 pm


Return to Support