Page 1 of 1

Exclude URL [newbie]

PostPosted: Tue Jul 01, 2008 8:17 pm
by eN0ch
Hi,

I'm trying to set up a rule to move all .webloc files from the desktop to a folder in my ~/Documents. But I don't want it to happen with weblocs I've created from MacUpdate. I've tried adding a condition: "Source URL/Address does not contain macupdate"; but Hazel still seems to send them to the folder. What am I doing wrong?

Thanks.

Re: Exclude URL [newbie]

PostPosted: Wed Jul 02, 2008 11:02 am
by Mr_Noodle
It seems that webloc files do not get a source address applied to them when created nor does Spotlight index any useful information out of it. So, unfortunately, you won't be able to do it based on URL.

It's not ideal, but you can try filtering on .webloc files that have "MacUpdate" in the name. If MU puts its name in all its page titles, it may work. Not as reliable as getting at the URL but it may be good enough.

Re: Exclude URL [newbie]

PostPosted: Wed Jul 02, 2008 6:35 pm
by sjk
Maybe Spotlight ignores resource forks, where webloc files store all their data.

If you drop a webloc file in plain text input area (e.g. this forum reply box) it conveniently extracts the URL. There's probably a way to do that from a script that Hazel could use but I can't think of how right now.

Re: Exclude URL [newbie]

PostPosted: Wed Jul 02, 2008 8:05 pm
by Mr_Noodle
Actually, doing some poking around I found this:

http://toxicsoftware.com/spotlight-importer-collection/

It appears to have a webloc Spotlight importer. I'm not sure what metadata field it populates but I say give it a whirl.

Re: Exclude URL [newbie]

PostPosted: Wed Jul 02, 2008 10:56 pm
by eN0ch
Thanks Paul. Filtering on name did it.

That other link is dead, and I can't find a way to access the file.

Re: Exclude URL [newbie]

PostPosted: Thu Jul 03, 2008 10:49 am
by Mr_Noodle
Ah well. If you want to try that route, email the developer. He may not be aware that the link is broken.

Re: Exclude URL [newbie]

PostPosted: Thu Jul 03, 2008 6:11 pm
by sjk
Try this link: here

Re: Exclude URL [newbie]

PostPosted: Thu Jul 03, 2008 7:32 pm
by eN0ch
I did try that one. But that leads to http://code.google.com/p/toxic-public/source/browse/archives/SpotlightImporterCollection.dmg which doesn't have any link that I at least can recognise as a download link ...

Re: Exclude URL [newbie]

PostPosted: Thu Jul 03, 2008 8:31 pm
by sjk
When I clicked SpotlightImporterCollection.dmg on the page of the link I posted it landed at another page that says This file is too large to display. with a View raw file link under it that downloaded the file. Definitely messy, but eventually successful.

Re: Exclude URL [newbie]

PostPosted: Thu Jul 03, 2008 9:40 pm
by eN0ch
OK got it, thanks.

Next problem ... Tried to install URL importer - failed. Error message:
The following install step failed: run postflight script for Toxic URL importer. Contact the software manufacturer for assistance.


I'm guessing that's the end of the line, since the manufacturer has taken his hands off and released it to open source?

Not that important really .. The filename approach solved this particular problem anyway.

Re: Exclude URL [newbie]

PostPosted: Thu Jul 03, 2008 11:17 pm
by sjk
Now you're definitely in "contact the developer" territory.

I haven't tried installing it but the last update was before Leopard's release so maybe it only works on Tiger?

Can someone fix this Spotlight importer for webloc files?

PostPosted: Sat Nov 07, 2009 9:46 am
by PhilMac
Well, just to save any others further searching, the code has moved from Google to BitBucket. The Spotlight Importer Collection includes a few components, of which the URL Importer is one.

It turns out that it is not just webloc files that it is designed to import, but others, too — afploc, fileloc, ftploc, inetloc, mailloc, urlloc and webloc.

So that's handy, but the problem is that it won't build on Snow Leopard. The developer, Jonathan Wight, has posted a message to that effect about the lot of it; and when I tried just the URL Importer alone, it also would not build.

However, though I happen to have the Developer Tools installed, I have not the slightest idea what I am doing — so if someone else wants to take a crack at it, that would be great!

As things stand now, this is quite frustrating: I have a pile of webloc files from a site that all have the same name because of the site's irritating design. This makes them quite useless, of course; but information useful for naming purposes could be gleaned from the URLs — if I had a way to get at them in Hazel!

Re: Exclude URL [newbie]

PostPosted: Mon Nov 09, 2009 10:28 am
by Mr_Noodle
Looking at it, there may be an issue with the whole project on SL (which includes a bunch more software than the URL Importer) but if you just open the project file for the URL Importer and work on that, you can get it to build with one tweak. Go to "Project->Edit Project Settings". Click on the "Build" tab. Look for "C/C++ Compiler Version" in the list and select "GCC 4.0". Close that window and build. It compiles with some warnings but it does build. I haven't actually tested whether it works. You'll have to consult with the developer on that.