Syncing rules (.Mac or similar)

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

Moderators: Mr_Noodle, Moderators

Syncing rules (.Mac or similar) Mon Oct 22, 2007 10:19 am • by ng5forums
Do you have any plans to sync Hazel rules across two or more Macs?

I would love to be able to keep all my Macs up to date using .Mac.


:D
ng5forums
 
Posts: 5
Joined: Wed Apr 11, 2007 5:28 am

Mon Oct 22, 2007 10:57 am • by Mr_Noodle
It's in the feature database though I'm not sure when it will get done but I'll consider your post as a another vote for it.

Thanks.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Any update on .Mac syncing Tue Jan 29, 2008 6:23 am • by ng5forums
Hi again

Just wondering if you have any thoughts on .Mac syncing for rules. Is it still in the feature database? Do you have any idea of possible rollout date?

Not hassling you, but it is the single biggest feature that would enhance my usage of Hazel.

Cheers
ng5forums
 
Posts: 5
Joined: Wed Apr 11, 2007 5:28 am

Wed Jan 30, 2008 2:22 pm • by Mr_Noodle
It's still on the list but I still can't say when it will go in. It's a significant undertaking so it may be a little while. And don't worry about reminding me. It shows that there's still interest in the feature.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Syncing rules (.Mac or similar) Wed Mar 05, 2008 9:17 pm • by pete
Here's a second on .Mac syncing and, possibly, some help.
TextExpander uses a preference pane. TextExpander does sync through .Mac. Perhaps you can look at get some hints from looking at their code, if possible.

pete
pete
 
Posts: 1
Joined: Wed Mar 05, 2008 9:14 pm

Re: Syncing rules (.Mac or similar) Thu Mar 06, 2008 11:47 pm • by Mr_Noodle
Thanks for the tip though it's not necessary. Apple has a framework for it and I'm sure I can figure it out. Besides, TextExpander is a closed source commercial product. As much as a lot of us devs know each other, it's usually not customary to let us browse one another's code.

There are issues to work out (for instance, what if the folder structure is different between the two machines?). The coding mechanics aren't the barrier so much as prioritizing and setting aside the time to do it as well as figuring out the interaction. It is in the list though it's not clear when it will happen but I am taking your vote into account.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Syncing rules (.Mac or similar) Mon Mar 10, 2008 3:22 pm • by ng5forums
Its good to hear its still on the agenda. I can confirm that after a horrendous start, the 10.5.2 update seemed to have resolved the Preference syncing via .Mac, at least for me it has.

In the interim I made sure that my work and home macs have the same username and folder structure so I could use Automator scripts to copy relevant folders and preferences, so again personally speaking, the rules when synced should be able to find the correct source & destination folders.

Maybe you could introduce a mapping function, where by if the rule from computer 1 doesn't find a corresponding folder on computer 2 you are prompted to specify a folder. This is then held against the corresponding computer.

eg.

RULE 1
Computer 1
Input folder = /volumes/username/downloads/SAFARI
Output folder = /volumes/username/TO SORT

Computer 2
Input folder = /volumes/username/downloads/SAFARI
Output folder = /volumes/username/SORTED

This would make the rule name and rule actions the constant, with variable paths.

I don't know how feasible this is or how much work would be entailed, but the rule syncing is still a big wish on my wish list.

Cheers
ng5forums
 
Posts: 5
Joined: Wed Apr 11, 2007 5:28 am

Re: Syncing rules (.Mac or similar) Wed Mar 12, 2008 11:44 am • by Mr_Noodle
Yes, some sort of mapping would have to take place. Not sure if I'd have to add an extra ".Mac" tab just for this or if I can hide the interface somehow.

As for the roadmap now, I've been sidetracked from development as I've been dealing with site issues. There was a recent host move (actually 2 of them) and I'm currently revamping the store. After that, I'll be releasing 2.2 which probably not have syncing but I'll look into having it as a main feature of 2.3. Unfortunately, I don't have a timetable but it is on the horizon.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Syncing rules (.Mac or similar) Tue Apr 07, 2009 9:59 am • by ckwmoore
Can I add my voice to those asking for syncing. If it's not possible to do it via MobileMe is there a prefs file which can be synced using a program like ChronoSync?
ckwmoore
 
Posts: 1
Joined: Tue Apr 07, 2009 9:56 am

Re: Syncing rules (.Mac or similar) Tue Apr 07, 2009 11:16 am • by Mr_Noodle
I think the current thinking (though this may change) is that if syncing is going to be done, it won't happen until 3.0. It's a big undertaking from every dev I've spoken to that has done it.

If you look in your Library/Application Support/Hazel folder, there are a bunch of .hazelrules files. These are where your rules are stored. The problem is you can't just copy them to the same folder on the other machine. The filename itself is an identifier to a local folder so you would have to rename it to whatever that identifier is on the other machine. Also, the rules will most likely reference local folders so depending on the folder layout on the other machine, those may break.

If you can figure out the folder identifiers and get ChronoSync to rename the files when backing up, then it may work. You would also have to make sure that System Preferences is not running as you are changing the data out from underneath it and it may end up overwriting the rules with the old version if you fiddle with it.

If you play with it, I advise you do a backup of everything first.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Syncing rules (.Mac or similar) Tue Apr 14, 2009 11:29 pm • by masonk
Hi there, me again. I have a laptop and a desktop and I want to keep my hazel settings synced across both computers. I want to report my success with keeping my laptop and desktop Hazel rules synced using Unison.
I'm syncing

~/Library/Preferences/com.noodlesoft.HazelHelper.plist
~/Library/Preferences/com.noodlesoft.Hazel.plist
~/Library/Application Support/Hazel/*.hazelrules

.hazeldb files do not play nice with file sync, as they seem to change every few seconds. I assumed that these files are housekeeping info that hazel needs to keep in order to track the last time it tried to apply rules. I don't sync those, and let Hazel apply the rules at different times on the two systems.

Caveats

1. My user is the same on both machines. Therefore the absolute path to ~ is the same on both. This would be an issue if Hazel does not use path names relative to ~ (which it should, for files in a user directory, if it doesn't).

2. I use Unison to make my ~ folders nearly identical. I have to be very careful to ensure that the folders I'm applying Hazel rules on exist on both systems. For rules that apply to folders that only exist on one system or the other, I created the rule, tracked the resulting hazeldb file that was created using FSEventer, and ignored that file in the Unison profile, so that it would not propagate.

3. Having Hazel on both systems is technically redundant. If you have two systems with file systems that are kept in sync well enough to have Hazel rules apply to them, you probably don't need your Hazel rules on both computers. For instance, before I was syncing Hazel rules,the laptop files would be synced to the desktop in their disordered state, cleaned up by Hazel, and then propagated back to the laptop in the changed state on the following sync. I didn't have to do anything extra to set this up. I just found it more convenient to immediately apply the rules (mainly because of less network chatter involved).
masonk
 
Posts: 3
Joined: Mon Mar 09, 2009 12:09 pm

Re: Syncing rules (.Mac or similar) Wed Apr 15, 2009 2:28 pm • by Mr_Noodle
Thanks for posting this. Yes, the .hazeldb files are filesystem specific and wouldn't make sense if transfered. Also, Hazel does use relative pathnames to ~ when rules are exported but not when you manipulate the internal rule files directly as you are doing.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Syncing rules (.Mac or similar) Wed Dec 15, 2010 6:34 am • by brab
Thanks a lot for this Unison tip, this was exactly what I was searching for!

I have a quick question: why do you also synchronize the Hazel Helper preferences? I quickly looked at them, and they don't seem to be crucial.

Thanks,

Alan
brab
 
Posts: 1
Joined: Wed Dec 15, 2010 6:30 am

Re: Syncing rules (.Mac or similar) Sun Jul 01, 2012 11:05 pm • by zusername
Hi,

I was just wondering if syncing rules between mac devices (i.e. laptop and desktop) is now possible?
zusername
 
Posts: 1
Joined: Sun Jul 01, 2012 11:03 pm

Re: Syncing rules (.Mac or similar) Mon Jul 02, 2012 2:37 pm • by Mr_Noodle
No, no syncing at this point. While it's been on the feature list for some time, I can't say if/when it will be implemented. There are several issues (beyond just the fact that syncing is hard) which make it troublesome, the main one being that I can't assume people use the exact same folder layout on all machines, and that creates a ton of complications. Also, it doesn't help that (a) Apple retired the whole MobileMe syncing framework and (b) provided a new one (iCould) which isn't so great to use from what I've heard from other devs and also is only available to MAS apps.

Right now, I suggest exporting and importing when you need to get rules from different machines.
Mr_Noodle
Site Admin
 
Posts: 11193
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Open Discussion