Taking Hazel to the next level (feature requests)

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

Moderators: Mr_Noodle, Moderators

Thanks for the input.

There will definitely be editing of lists without the use of external files. My question was to the scope of those lists. If you edited a list for a rule, would it only be accessible to that rule or should it be available to other rules?

Regexes can be done via a shellscript. It doesn't seem worth the extra effort as any user that understands regex can write the script to access them, in whatever language they choose and using whatever flavor or regex they prefer.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Hello, I'll add a description of my partial scenario which I may benefit from lists/dictionaries/tables, depending on how they're implemented.

I'm trying to sort incoming pdf files based on their content and append them to the appropriate "master" output pdf file (I want a single file with all the electric bills for each property, etc). In abstract:
if file contains "NE Electric" and ["bill" or "statement"] and "78 Main St" then extract statement DATE, (rename file to "DATE - 78 Main - Electric Bills", save file to folder "OriginalScans", append file to "Properties/78 Main - Electric Bills.pdf"
if file contains "Penn Water" and ["bill" or "statement"] and "78 Main St" then extract DATE, (rename file to "DATE - 78 Main - Water Bills", save file to folder "OriginalScans", append file to "Properties/78 Main - Water Bills.pdf"
if file contains "Penn Water" and ["bill" or "statement"] and "34 Cherry" then extract DATE, (rename file to "DATE - 34 Cherry - Water Bills", save file to folder "OriginalScans", append file to "Properties/34 Cherry - Water Bills.pdf"
and so on..

I would like the tokens/variables "Penn Water", "NE Electric", "34 Cherry Ave", "78 Main St" etc to be definable by me and available in all rules. I would also like to be able to define a dictionary so that if "78 Main St" is matched in the file content then i can map that to "Properties/78 Main" and "NE Electric" maps to "Electric", and ["bill" or "statement"] maps to "Bills" that i can use in constructing the name of the destination file for append.

Today i have about 90 of these master files and I cannot come up with a solution to accomplish this within Hazel without writing many individual rules. Ideally this would be a single rule driven by a list/table/dictionary.
msijka
 
Posts: 2
Joined: Thu Oct 24, 2019 3:14 pm

Thanks for the example. The tables feature I'm working on should handle this.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Hi, I forgot to mention another example of something I'm currently struggling with. I love the ability to extract dates and use them in actions, for example to rename bills with their date. However, I'd like the ability to match multiple formats of a date in a single definition of a variable; "To: DATE", "Statement: DATE", "From: DATE" and finally "DATE" would all result in a single variable "BillDate" which I can then use to tag the file with. Thanks.
msijka
 
Posts: 2
Joined: Thu Oct 24, 2019 3:14 pm

You would need to either try the automatic date recognition or provide multiple conditions, reusing the same custom date attribute in each one.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Previous

Return to Open Discussion