Friday, March 09, 2007

Torch

Coded a small torrentcast client of sorts. Mostly because I wanted to try out Growl. Anyway, it's called Torch and it is written in python and wants Growl and Feedparser. It looks for certain keywords ("inland empire" and "heroes" by default) in some rss feeds (rlslog, mininova and newtorrents) and sends a growl notification if found, you can also set an option to download the .torrent (this feature is pretty untested). Documentation is non-existant, look in the source. Supply -d for debug mode, -h should print out a useful help message some time in the future.

Here's the quite ugly AppleScript I use to auto open any new torrent files with my default BitTorrent client.

property type_list : {"torrent", "TORRENT", "Transmission", "BitTorrent Document", "BitTorrent", "BitTorrent document"}
property extension_list : {"torrent", "TORRENT"}

on adding folder items to my_folder after receiving the_files
repeat with i from 1 to number of items in the_files
tell application "Finder"
launch
try
set this_file to (item i of the_files)
set the this_file_info to info for this_file

if (the file type of the this_file_info is in the type_list) or (the name extension of the this_file_info is in the extension_list) then
open this_file
end if

end try
end tell
end repeat
end adding folder items to
Put it in Library/Scripts/Folder Action Scripts and then hook up a folder with it.

No comments: