| Project: | Mori |
| Version: | 1.1.3 |
| Component: | Code |
| Category: | feature |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
The Finder has support for folder actions, AppleScript scripts that run when a folder changes. I'd like to have something like this in Mori, where I can have a script triggered by a change in a folder.
This was inspired by the use of AppleScript with Mail to create entries out of mail messages. I'd like the folder I put these entries in to change labels when it has messages in it (to show that it's unprocessed) and then have it change back when its empty. I could do the first part with the script triggered by Mail, but I have to do the second part manually, which I shouldn't have to do.
Updates
I would also like to see something like this added, but I'm not sure what kind of implementation would be the best. For example, could you add them to smart folders? If you could, then you could have something closer to an active agent (vis a vis Tinderbox) that would not only gather items but be able to alter their content or form. e.g. a smart folder for all items due today, and action attached to it that would label it red. Rather than just attach a script to a folder (like Finder folder actions) there could be something closer to Mail Rules (like you mentioned) that have both a list of predefined actions which could be chosen from dropdown menus (label, duplicate, etc) and then an option for an applescript.
Jeff's (BMEguy's) idea sounds very powerful.
Yeah I really like this idea to. But at the moment I CAN'T (i'm yelling at myself here because i was distracted for about an hour thinking about it :) ) think about it. I'm still got a good few weeks to implement custom columns. Once that works is done then we'll have a really good foundation to build these sorts of ideas on. In general I don't think folder actions will be hard to implement once I'm done with the model layer.
I like the idea of a "folder actions", but if I'm reading your description right the problem really is, you'd like to distinguish "read" from "unread" notes.
Would it make more sense to add in an accessed count as an attribute to every note? Ordinary notes which are created via the interface would be set to have a count of 1. But notes created programmatically (or the user wants to set it) it could set this to 0.
In my own workflow, I tend to do this as well though I hadn't really thought about it. If I come across some largish article I want to read but can't right then I'll just add it to the notebook and highlight the entry yellow. Then when I have time I'll go back and read it, and turn off the yellow highlighting. And if it wasn't all that great I'll probably just delete it.
Phil, good idea. I think folder actions still have merit on their own, but someway to easily distinguish between read and unread notes would also be very useful. I've just added this feature request, take a look and see if it makes sense.
Harkening back to BMEguy's suggestions in the first response above, Hazel (product page) may provide a nice model, as ars technica puts it, of a "rules system for files and folders. The system is pretty familiar: you can add a number of search rules to help Hazel narrow down the files or folders, and then add actions to be taken."
In a Mori implementation, the search criteria would obviously derived from Mori's columns. But the actions Hazel allows are interesting:
1. Move file to
2. Copy file to
3. Set color label to
4. Add keywords
5. Add comment
6. Create archive
7. Open file with
8. Import into iTunes
9. Import into iPhoto
10. Run Applescript
11. Run Automator workflow
12. Run shell script
13. Run rules on folder contents
14. Ignore file
Ars technica also observes, "Those options are just for individual rules. You can have lots of rules for a folder, or one or two multipart rules, or any combination thereof. The rules process in order, so if you want to give everything blue labels, and then move pictures to a folder, and then move everything else to your desktop, Hazel can do that."
Of course we also have Apple Mail's 'rules' as a model, but Hazel appears to be more sophisticated -- and may be worth watching as it improves.