This might be clearly described somewhere and I just can’t find it. I apologize in advance if that is the case.
I have started to use smart rules to organize my databases and it works very good. However, I’m starting to have a lot of rules and it would be great if the rules could be grouped and collapsed. That way it would be easier to find and modify the rules that I have. Is this possible?
Another question about organization of a larger number of rules. Will it be possible to search for them? Or will it be possible to have annotation files, that can be searched, linked to rules or groups of rules?
I like to organize into groups by website. Therefore I have many rules like this:
If URL matches “website”, move to group and then rename “name”+“sortable creation name”.
It would be good for me if I could have one rule per database with
many conditions of the type: If URL matches “website”,
then move to group named “matched website” and then rename “name”+“sortable creation name”.
I suspect that this is doable using some scripts but I don’t really know any scripting language.
Yes, I understand that this is probably the best way in the long run. However, as I said, I don’t know scripting all that well. Do you have a good pointer where to learn scripting of DT?
The forum provides many examples. Most of them are written in AppleScript, which I would not encourage to learn – it has no usage outside macOS and lacks plenty of modern concepts like regular expressions, string handling, array methods etc. Instead, I’d encourage using JavaScript, which is available on all current platforms and used in many places, notably web pages. I provide a website that explains the usage of JavaScript for scripting macOS apps. It does not, however, teach the language itself. But the web is full of sources for that.
The preference of JavaScript is a personal opinion, others opt for AppleScript citing a perceived ease of learning There are also sources to learn that online, though I have the impressions that most of them are pretty dated.
The basic idea of a script would be
define a mapping of URLs to database/group
for each record
append the sortable creation date to its name
move the record to the database/group as determined by the mapping defined at the start