Topic: https://brettterpstra.com/2010/05/25/delicious-spotlight-and-openmeta-tags-revisited/
hide preview

What's next? verify your email address for reply notifications!

Irfan Hafiz 13y, 342d ago

Very cool script. It solves an ongoing problem that has been bugging me for some time.
I tried to run the script after editing my user name, password and creating the target folder directory but keep coming up with the following error

error "curl: (3) [globbing] error: bad range specification after pos 27
" number 3

I am not a programmer and am not sure what to make of the error.

Thanks

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 13y, 342d ago

I'm afraid I have no idea, offhand, what that error would be caused by. It may be failing on some strange characters… unfortunately, I've stopped directly supporting this script and have moved on to the (far more advanced) Pinboard version. I may make that one backwards-compatible with Delicious eventually.

hide preview

What's next? verify your email address for reply notifications!

Grant 14y, 66d ago

Hi Brett,

I've been running your script once a week for a couple months now, but for whatever, the last week's of bookmarks were created (webLocs) but the tags weren't applied. I'm not sure if this is a result of the most recent Mac update (which has broken a couple other, totally unrelated things on my system).

Anyone else encountering this issue?

Grant

remark link
hide preview

What's next? verify your email address for reply notifications!

Brett 14y, 66d ago

I made a full switch to Pinboard recently. I had to stop running this script because Pinboard doesn't honor the fromdt parameter (so it sends everything every time) and I haven't had a chance to add a full XML parser to the script yet. So, long story short, I don't know. I'll do some testing and post back here if I find anything similar.

hide preview

What's next? verify your email address for reply notifications!

i-blis 14y, 68d ago

In Snow Leopard there is a major issue with extended attributes. User space extended attributes are wiped out on save with standart Cocoa applications like TextEdit, Preview etc. OpenMeta apprently circumvent this by copying back the information from Apple domain space to its own user space.

The situation is pretty sad. I had a couple of tools adding metadata to PDF and text files. But these are delete whenever the file is edited with a Cocoa application.

So beware, xattr are broken on 10.6.

hide preview

What's next? verify your email address for reply notifications!

dvessel 14y, 75d ago

This is exactly what I wanted. Thanks for posting this Brett.

I had a few issues though so I modified it quite a bit. Mainly issues with non-roman characters. It lets through more characters only concerning itself with colons, slashes and leading dots and it cleans up the spacing all done with sed. Did a lot of Googling since I'm not an AppleScript/shell expert.

Other improvements/changes:

<ul>
<li>

Creates a log file into ~/Library/Logs with the option to show general messages and/or errors.

</li>
<li>

Uses openmeta from the command line instead of Tags. I own a copy of Tags but I preferred this approach. Tags will pickup whatever you set through the shell environment.

</li>
<li>

When setWeblocThumb retrieves a thumbnail it will flag the Finder when the server can't be reached (dead links) by setting a color label index of 7 which is Gray by default.

</li>
<li>

Option to prefix the tags when carried over from Delicious. I like to keep them separated from my local tags so I set in this option. Defaults to "delicious:".

</li>
<li>

Saves the notes from Delicious bookmarks into the Finder comments for the .webloc file. Can be switched on/off.

</li>
<li>

Fixes how the date of last scan is stored. It think there was a bug in there.

</li>
</ul>

Zip file containing an Automator .workflow file & .applescript. Hope you find it useful.

hide preview

What's next? verify your email address for reply notifications!

Ottoe 14y, 97d ago

This looks awesome. I'd like to adapt it for Pinboard, but I'm a bit shy about modding scripts; any clues about how to do that most efficiently would be welcome ;)

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 14y, 95d ago

It looks like the Pinboard API is identical to Delicious, so you can just replace "api.del.icio.us/" in the line:

 set bookmarks to do shell script...

with "api.pinboard.in/" and adjust your username/password accordingly. Haven't tested it, but this page indicates that should work: http://pinboard.in/howto/#api

remark link parent
hide preview

What's next? verify your email address for reply notifications!

Brett 14y, 66d ago

Follow-up to the above response: the Pinboard API doesn't honor the fromdt parameter, so this script doesn't work very well when flipped over to that endpoint. I'll try to put together an alternative soon, though the Pinboard devs promised they'd add the parameter. We'll see which happens first :).

hide preview

What's next? verify your email address for reply notifications!

Paul 14y, 192d ago

I too, look for elegant solutions to complex problems.

the problem: using spotlight to find tagged files found in afp shared servers.

I have been up all night and I have to tell you. I'am beat.

So... I'am looking for the 'elegant solution'

(btw I have tried all flavors of mdutil, mdimport - mounting drives all kinds of ways, etc...)

ideas... I thinking about writing an app to search tags in afp folders

Aloha
p

hide preview

What's next? verify your email address for reply notifications!

Carl Axel Petersson 14y, 298d ago

Hi
Everything worked out fine except that extended characters in the bookmark title did not survive the download. It worked with all tags.
For example: the text väder < vder, the tag väder < väder

remark link
hide preview

What's next? verify your email address for reply notifications!

ttscoff 14y, 298d ago

Ah… I have a regular expression in there that just strips out all non-alphanumeric characters to avoid problems, but it's not unicode-aware. I'll see if I can modify that easily to handle some more interesting characters :).

hide preview

What's next? verify your email address for reply notifications!