Adium
Dock Icons Emoticons Contact List Styles Message Styles Sound Sets AppleScripts Status Icons Service Icons Menu Bar Icons Plugins Miscellaneous All
Adium Xtra Updater

Adium Xtra Updater

Submitted By Spencer Alves (impiaa)

Description

This is a script that I wrote that automatically scans all installed Xtras and searches the Xtras site for updates, if there are any. It tells you what version it thinks you have installed for each extra, as well as the version of the same Xtra it found online. It also gives you a link for the Xtra, where you can find a version history (if the author of the extra provides it) and a download link.
To use the script, first unzip the download and drop "adium updater.cfg" into your user folder. Launch Terminal (Applications/Utilities) and type "python " (with the space after), then drag and drop the script ("adium updater.py") into the window.
This script will not work on 10.2 or earlier. If you have 10.2, then you can, if you want, download and install Python, then it should work.
No accuracy guaranties. This program looks specific data inside the each Xtra. However, the author of the extra may have chosen to provide a false version number, if not none at all. If this is the case, the script may direct you to an extra that is not really newer than your copy. It is also possible that the Xtra author may have written an Xtra page that can't be parsed by the script, in which case the script will ignore that extra. These problems are not my fault. Contact the Xtra author to have it fixed.

Changes

  • 1.0 - Initial release.
  • 1.1 - Now doesn't check for extras in missing folders. (link)

Comments

You can reply to individual comments by clicking the "Reply" link next to each.

# by jonahan on 08/26/08 at 21:53:46

If you don't have extras installed this doesn't work.

python /Users/jonahan/Downloads/adium_xtra_updater_8_13508_5837/adium updater.py
Traceback (most recent call last):
File "/Users/jonahan/Downloads/adium_xtra_updater_8_13508_5837/adium updater.py", line 20, in
for f in os.listdir(os.path.expanduser(line[:-1])):
OSError: [Errno 2] No such file or directory: '/Users/jonahan/Library/Application Support/Adium 2.0/Menu Bar Icons'
Jonahans-Computer:~ jonahan$ python /Users/jonahan/Downloads/adium_xtra_updater_8_13508_5837/adium updater.py
Traceback (most recent call last):
File "/Users/jonahan/Downloads/adium_xtra_updater_8_13508_5837/adium updater.py", line 20, in
for f in os.listdir(os.path.expanduser(line[:-1])):
OSError: [Errno 2] No such file or directory: '/Users/jonahan/Library/Application Support/Adium 2.0/Service Icons'

You have to just create the folders but it's a bit annoying.

# by impiaa on 08/26/08 at 23:05:05

Good catch! I'll fix it.

# by papst on 08/27/08 at 18:36:24

works fine. Good job!

# by yogibimbi on 08/28/08 at 06:52:25

mmm, does not work on my machine (10.4.11). When I try to run it from terminal, I am getting the following error message

> python /Applications/adium_xtra_updater_8_13508_5837/adium updater.py
Traceback (most recent call last):
File "/Applications/adium_xtra_updater_8_13508_5837/adium updater.py", line 19, in ?
for line in open(config).readlines():
IOError: [Errno 2] No such file or directory: 'adium updater.cfg'


note: the config file is right next to the script file in the same directory.

# by impiaa on 08/28/08 at 12:03:53

Read the directions again. You can either put the cfg file in your user folder, or, if you know how, cd to the directory with the script and then issue the command.

# by yogibimbi on 08/28/08 at 12:24:40

ooops,

# by biglittledragoon on 08/29/08 at 08:52:44

Nicely done. Works well with good Xtras. (Only…)

# by luluy on 09/01/08 at 13:57:07

Hi guys,

I get the following message, when I run the script:

Traceback (most recent call last):
File "/Users/chief/adium updater.py", line 77, in
url = "http://www.adiumxtras.com/index.php?a..._id=%i&s=%s" % (cat, urllib.quote_plus(name))
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 1211, in quote_plus
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 1205, in quote
KeyError: u'u2013'

Where is my mistake?

Cheers

# by impiaa on 09/01/08 at 17:42:14

I'm not sure, but I don't think it's your mistake. Probably an Xtra is causing the problem, it looks like one with international characters in it. I'll see if I can fix the problem.

# by coerul on 09/05/08 at 11:02:50

Nice concept. I'm not too happy with the execution though. It's a bit clunky.
This would be great as an actual application, though.

# by gradster1 on 09/05/08 at 20:51:22

Yes. I would use it if it was automated, but it's not... :/ Not too pleased. Good idea, anyway.

/gradster(1)/

# by Liberty on 09/07/08 at 09:40:45

But it would be nice if you could release an app or maybe there could an official built-in plugin for adium which checks xtras automatically.

# by thegcat on 09/09/08 at 03:18:02

Hello,

You'll find the lists in python don't have a find (no pun intended...) method, but one called index, so sys.argv.find('-config') and sys.argv.find('-c') become sys.argv.index('-config') and sys.argv.index('-c'). Didn't look at the rest, but this came up as I didn't want to have the config in my home directory :-)

Anyway, thanks for the good work, and I +1 the integration into Adium or standalone App :-)

# by impiaa on 09/10/08 at 00:01:23

I agree with all of you that this would be extraordinarily cool if it was built into Adium, but I am now only a beginner at Cocoa, and plus I am having trouble finding an up-to-date documentation on how to make an Adium plug-in. Really, this was only to satisfy me and my trac ticket. But as soon as I am able, I will work on making a Cocoa port.

# by ralts00 on 09/18/08 at 01:45:31

alguien podria explicar como usar el xta updater en español. muchusisimas gracias

# by impiaa on 09/18/08 at 20:46:22

Sorry, I don't speak Spanish, but this might help: http://translate.google.com/translate...sl=en&tl=es

# by Yoctabyte on 08/01/09 at 18:23:29

Hablo un poquito español. Descomprime el fichero zip que bajó. Mueve "adium updater.cfg" y "adium updater.py" a su carpeta (por ejemplo /Usuario/[Su Nombre], o otro similar). Abre Terminal.app, y escribe a máquina "python /Usuario/[Su Nombre]/adium updater.py" sin comillas. Si tiene un problema, nos diga.

impiaa dijo que http://translate.google.com/translate...sl=en&tl=es puede ayudarle a Ud.

# by LeRued on 10/15/08 at 23:46:20

Can somebody explain step-by-step how to use this script? I'm kinda new to macs and stuff. Is the "Userfolder" mine ot the one in Adium?
"Launch Terminal (Applications/Utilities) and type "python " (with the space after), then drag and drop the script ("adium updater.py") into the window." Launch Terminal? = cmd + space?

# by impiaa on 10/16/08 at 00:11:21

Terminal is a program that you can find in your Utilities folder, which is inside your Applications folder. Your user folder is the one that holds your music, documents, movies, and other folders like it. To get there, go to the Users folder on your hard drive, then open the folder with the icon of a house.

# by LeRued on 10/16/08 at 13:27:33

Ok thanks, i found my userfolder. Can I use com + space to find the "Terminal" if i do that window pops up "Terminal -bash - 80x24
Last login: Thu Oct 16..." is that correct?

# by impiaa on 10/16/08 at 18:26:43

Yes, that is the correct program.

# by LeRued on 10/16/08 at 20:48:33

ok one last question.. what do i do then? type python? and then? drag and drop the file in and close the window?

# by impiaa on 10/16/08 at 22:09:51

Follow the directions: open terminal, type "python ", drag and drop the file, then press return. It should tell you what updates can be found where.

# by ANK on 11/09/08 at 07:42:52

This is the screenshot from the error's output:

Traceback (most recent call last):
File "/Users/Shared/adium updater.py", line 82, in
doc = minidom.parseString(urllib.urlopen(url).read().decode('iso-8859-1').encode('ascii', 'xmlcharrefreplace').replace('& ', ' ').replace('', ''))
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 82, in urlopen
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 185, in open
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib.py", line 204, in open_unknown_proxy
IOError: [Errno url error] invalid proxy for http: '127.0.0.1:8118'

Maybe a python configuration error because I'm using a Vidalia/Tor proxy? What's the solution?

# by impiaa on 11/09/08 at 11:46:02

Yeah, it looks to me like you have an odd network setup that Python can't figure out. Unfortunately, I'm no network whiz, so I don't have a solution. Sorry. :-(

# by Yoctabyte on 08/01/09 at 18:28:55

I also use Tor. It doesn't seem to be Tor's problem. Unless you figured how to run Adium networking through Tor, Adium runs without a proxy.

# by Yoctabyte on 08/01/09 at 18:33:15

# Shortcut for basic usage
_urlopener = None
def urlopen(url, data=None, proxies=None):
"""urlopen(url [, data]) -> open file-like object"""
global _urlopener
if proxies is not None:
opener = FancyURLopener(proxies=proxies)
elif not _urlopener:
opener = FancyURLopener()
_urlopener = opener
else:
opener = _urlopener
if data is None:
return opener.open(url)

# by Yoctabyte on 08/01/09 at 18:34:37

Uh.. My message got cut off... Lemme just show the lines:
82: return opener.open(url)
185: return self.open_unknown_proxy(proxy, fullurl, data)
204: raise IOError, ('url error', 'invalid proxy for %s' % type, proxy)

# by harisankarh on 08/06/09 at 16:31:25

@ANK, I had the same problem. But luckily it was solved when I put proxy as 'http//127.0.0.1:port' where port is the local listening port , 5865 in my case (ntlmaps).

Post a New Comment

You must be logged in to post comments.

Download
2.44kb (13318 downloads)

12345
3.50 / 56 votes
Current Version: 1.1
Last Updated: 08/26/08