Run multiple rules per item even if some don’t fail

A few recent topics seem to tackle the very problem I have with understanding Hazels inner structure. The order of rules is important, as I understood. But what if I want to run more than one rule on a file but cannot write a convenient condition which checks for past rule matching (to fail and go down one step in the rule hierarchy)?
Situation
I’m currently monitoring a digital archive folder, which contains various notes, reflections even important e-mail copies. My naming conventions enable me to distinguish between a few categories to which I apply color labels accordingly.
Now, there will be another dimension added to the flat, chronological order. Whenever a file’s sub-category or tag (think of OpenMeta tags, as in Tags.app, Yep, Leap, …) match a certain pattern, a shell script will be executed to create a hard link in a subfolder of my archive. This adds zero functionality but enables me to browse these category-independent "notebooks" (collection of the aforementioned tagged/sub-categorized items) from the file system.
One item can have multiple "notebook"-tags and should be linked from all of those subfolders. As soon as one rule matched, further matching is omitted. I can’t just insert a condition which checks against existence of a hard-linked entry in the corresponding subfolder and, if there’s already a link with the same file name, skip that rule. That’s because I check agaist "any" conditions, not "all", to be able to both check for tags and a specific file naming pattern.
Example matches
A possible file name:
The category is "T2-1-nix" which shall be linked to the "nix" subfolder because it indicates this file’s a Mac/Linux/*nix script I wrote. Now an e-mail from my old pal Foo Bar concerning scripting ideas might be filed as
This entry shall belong to a person-based "foobar" subfolder, but content-wise, it’s tagged something similar to "notebook:nix". So my "*nix notebook" rule checks for a file name pattern like "(...)-nix_(...)" or for tags containing "notebook:nix".
Situation
I’m currently monitoring a digital archive folder, which contains various notes, reflections even important e-mail copies. My naming conventions enable me to distinguish between a few categories to which I apply color labels accordingly.
Now, there will be another dimension added to the flat, chronological order. Whenever a file’s sub-category or tag (think of OpenMeta tags, as in Tags.app, Yep, Leap, …) match a certain pattern, a shell script will be executed to create a hard link in a subfolder of my archive. This adds zero functionality but enables me to browse these category-independent "notebooks" (collection of the aforementioned tagged/sub-categorized items) from the file system.
One item can have multiple "notebook"-tags and should be linked from all of those subfolders. As soon as one rule matched, further matching is omitted. I can’t just insert a condition which checks against existence of a hard-linked entry in the corresponding subfolder and, if there’s already a link with the same file name, skip that rule. That’s because I check agaist "any" conditions, not "all", to be able to both check for tags and a specific file naming pattern.
Example matches
A possible file name:
- Code: Select all
2010-04-22_0931_T2-1-nix_Some Shell script idea.md
The category is "T2-1-nix" which shall be linked to the "nix" subfolder because it indicates this file’s a Mac/Linux/*nix script I wrote. Now an e-mail from my old pal Foo Bar concerning scripting ideas might be filed as
- Code: Select all
2010-02-05_0123_M1-2-foobar_Fancy technique.md
This entry shall belong to a person-based "foobar" subfolder, but content-wise, it’s tagged something similar to "notebook:nix". So my "*nix notebook" rule checks for a file name pattern like "(...)-nix_(...)" or for tags containing "notebook:nix".