Recently I found another way to use SubDownloader on Macs. Instead of resolving the dependency issues on Macs, I just gave upon using the graphical interface of SubDowloader and made it work for the command line only; then I used Automator to build a service so that it could download subtitles by right clicking a file or folder from Finder and choose Download Subtitles in the popup menu. It turned out to work very well.
Procedures to install SubDownloader on a Mac:
- Download SubDownloader source tarball and decompress it.
- Open terminal and patch a bug in subdownloader-2.0.14
- $ sed -i.bak 's/subtitle = video\.getOneSubtitle()/subtitles = video.getOnlineSubtitles()[0]/' ~/Downloads/subdownloader-2.0.14/modules/filter.py
- Download kaa-base and kaa-metadata from http://sourceforge.net/projects/freevo/files/ and decompress them.
- Install Xcode if you haven't done that.
- Open terminal and type the following commands.
- $ sudo python setup.py install
- $ cd Downloads/
- $ sudo python setup.py install
- $ cd ../kaa-medata-0.7.7/src/disc/
- $ curl -O http://cddb-py.sourceforge.net/CDDB/unix/cdrommodule.c
- $ cd ../..
- $ sudo python setup.py install
- Create a service using Automator
- Open Automator.
- Click the "Service" icon and then click "Choose" button on the bottom.
- Choose "files and Folders" and "Finder" on the list boxes right of the text "Service receives selected".
- Drag "Run Shell Script" from the list of actions into the workflow window.
- Select "/usr/bin/python" and paste the following script into script window; change the text "/Users/myname/Downloads/subdownloader-2.0.14" in the script to the folder which you place the subdownloader files.
- Save the workflow with the name "Download Subtitles"
import os,sys if __name__ == '__main__': paths = [] for i in range(1,len(sys.argv)): paths.append(os.path.realpath(sys.argv[i])) os.chdir("%s/Downloads/subdownloader-2.0.14" %(os.environ["HOME"])) for x in paths: os.system("./run.py -c -D -l en --rename-subs -V \"%s\"" % x)