Managing a large number of rules

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

Moderator: Mr_Noodle

Managing a large number of rules Sun Mar 03, 2019 11:00 pm • by ngall
I have a lot of documents that get fed into a single folder on my Mac which unfortunately I can’t change.

Since I use Hazel I now have a lot of rules for this single folder. When I need to edit or change a rule it is getting tiresome to find the right rule in the big list. With Search, it’s OK if I remember/guess the name of the rule but often I am not sure and find myself scrolling down and down and down looking for it.

Is there a best practice way to separate groups of rules that act on a single folder?
ngall
 
Posts: 7
Joined: Sun Mar 03, 2019 10:52 pm

Re: Managing a large number of rules Mon Mar 04, 2019 11:27 am • by Mr_Noodle
Can you describe the rules? Is it possible to consolidate them using pattern matching?

Also, you can add notes to the rule to help searches.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Managing a large number of rules Mon Mar 04, 2019 5:02 pm • by Robert
ngall wrote:Is there a best practice way to separate groups of rules that act on a single folder?


To have notes attached is pretty good to widen the possible hits. But what I do is actually sorting into subfolders, and then have certain rules act on the subfolders. So first I sort PDFs to PDFs, .zip to a Zip folder etc. Then I have folders like receipts, payed, not payed etc. and in all of these subfolders different rules apply. This is a folder structure which I have in an automation directory I never have to look at, because in the end, when tagged properly, OCRed, made smaller, created a task in the ThingsApp etc. the files are sorted in the right archive folder.
That being said I think I could minimize the sorting into subfolders with tags and other rules, like “kind” but I find it more reliable that way and easier to see where a problem is, when a certain file gets stuck. So I have a rule on all the subfolders which checks if there is a file older than 1 day so I get a message when a file gets stuck somewhere —> and in none of the folders in this automation directory files should stay longer than one day... so they are just for the files passing through.
"Behind all the inhuman aspects of automation (...) its real possibilities appear: the genesis of a technological world in which man can finally withdraw from (...) the apparatus of his labor – in order to experiment freely with it." /Marcuse
Robert
 
Posts: 52
Joined: Sun Dec 16, 2018 8:05 am

Re: Managing a large number of rules Tue Mar 05, 2019 10:19 am • by Mr_Noodle
If each subfolder has its own set of rules, then it might be better to add those folders to Hazel with their own rulesets. That means possibly a lot of folders but it does spread things out.

Also, can you go into more specifics about how you determine which subfolder things go into? This is more for research purposes as I'm trying to come up with solutions to various cases which require repetitive rules which aren't covered by the pattern matching.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Managing a large number of rules Wed Mar 06, 2019 7:46 am • by Robert
Mr_Noodle wrote:If each subfolder has its own set of rules, then it might be better to add those folders to Hazel with their own rulesets. That means possibly a lot of folders but it does spread things out.

Yes – that is exactly what I did! Having an automation directory in which every folder is in Hazel for its own with its specific rulesets.

Mr_Noodle wrote:Also, can you go into more specifics about how you determine which subfolder things go into? This is more for research purposes as I'm trying to come up with solutions to various cases which require repetitive rules which aren't covered by the pattern matching.


This is more or less my setup – whereas all subfolders are within the INBOX HAZEL and all outputs in the end are outside of INBOX HAZEL... I am not sure if that helps you with the research because I do not have repetitive rules in that structure. But actually thinking about it, it would be fantastic if one could replicate (rather that copy) a rule so when you change it once it gets changed everywhere else... The replicant/copy difference is very useful in f.e. DevonThink.
Anyways here are some insides in my workflow. If I have more time I will continue filling out the blank spaces and if I can help any further I am glad to do so!

INBOX HAZEL
Sort PDF to PDF
Sort ZIP to ZIP
Sort DMG to DMG
Sort DOC and DOCX to DOC
Sort .epub and .mobi to Ebooks
Check if in Subfolders are Files older than one Day tag: "Stuck"

    1. PDF
    If file is Landscape move to NotOCRed
    If file is OCRed put it in Folder OCRed
    If file is not OCRed put it in Folder NotOCRed

      1A. OCRed
      Is the size over 30 MB and no tag "OCRed" move to 1b. NotOCRed
      Does it Contain my name move to myName and Tag accordingly
      Does it Contain names of newspapers I read move to Newspapers, rename and tag accordingly
      Does it Contain "wikipedia" move to Wikipedia, rename and tag accordingly
      Does it Contain scientific notions move to Philosophy, rename and tag accordingly

        1Aa. myName
        Check if it contains Receipt, PhoneCompany, OilCompany etc. move to Receipts
        Check if it Contains my University Number tag and move to Folder ➔ UniversityOfficial (outside of INBOX HAZEL)
        Check if it Contains scientific notions move to Folder ➔ OwnTexts (outside of INBOX HAZEL)

          1Aaa. Receipts
          Check Date and no tag "payed" make a ToDo in ThingsApp with link to the file and tag as "has to be payed"
          Check if tag contains "payed" if so, move to archive in DevonThink and delete file

        1Ab. Newspaper
        Rename, tag and Move to Folder outside of INBOX HAZEL to sync with my tablet.

        1Ac. Wikipedia
        Rename (Date in brackets, and name before the brackets), tag and Move to Folder outside of INBOX HAZEL to sync with my tablet.

        1Ad. Philosophy
        Tag (if certain Names are more than 10 times within the document), if the Name contains certain names etc. and afterwards import file into calibre and delete file.

      1B. NotOCRed
      All Files remove tag OCRed if it exists
      Use Abby FineReader to OCRe and split pages, move to 1. PDF and tag OCRed

    2. ZIP
    (... to be continued ...)
    3. DMG
    (... to be continued ...)
    4. DOC
    (... to be continued ...)
    5. Ebooks
    Convert to PDF and move to 1A. OCRed delete Ebook
"Behind all the inhuman aspects of automation (...) its real possibilities appear: the genesis of a technological world in which man can finally withdraw from (...) the apparatus of his labor – in order to experiment freely with it." /Marcuse
Robert
 
Posts: 52
Joined: Sun Dec 16, 2018 8:05 am

Re: Managing a large number of rules Wed Mar 06, 2019 11:21 am • by Mr_Noodle
I see. It seems you have very different logic in each place. Not sure what else can be done as there seems to be little repetition happening here though maybe something can be done for all the rules where it checks contains items from a list.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support