
Dave Girard's 101 Autodesk® Maya® Tips is now available in Kindle and EPUB/PDF editions.
Topics by tag:
Recently published articles by Dave G:
So here are the downloads for the multithreaded Python image converters and multithreaded rar/unrar scripts I made yesterday. You’ll need Python 3.2 to run them, since they rely on the concurrent.futures module from 3.2. Grab the installer here: http://www.python.org/getit/releases/3.2/. The Mac installer doesn’t overwrite your existing 2.7.1 Python install so you invoke the new python by typing “python3” in the Terminal.
The .py scripts:sips_PNG This uses sips in OS X for conversion, so if you’re looking to use it in Linux, you’ll probably want to rewrite the last line of def sipper to use Imagemagick’s convert or something built-in.
unrar_threaded This should work in Linux without modification.
rar_threaded This should work in Linux without modification.
How to run the scripts: these take a batch of paths to items from standard input and then process them, so the easiest way to run them is to type “find /path/to/images/ | python3 path/to/sips_threaded.py” or “find /path/to/whattocompress | python3 path/to/rar_threaded.py”
For OS X only – Automator workflows
First, the sips conversion workflow files (PNG, TIF, TGA, PSD, JPG). If you just want something to make image conversion fast and easy in OS X, I made Automator services for OS X 10.7 (might work in 10.6) that don’t depend on the terminal or the scripts:
Grab them here: Download here. The only catch is that these Automator workflows require that you make Python 3.2 the default version run when typing “python” in the terminal. That’s done by writing this in the terminal:
sudo cp /usr/local/bin/python3 /usr/bin/python
The good news is that this isn’t destructive since /usr/bin/python was just a duplicate of /usr/bin/python2.7. /usr/bin/ still has Python 2.7, 2.6, and 2.5 from the default OS X install, so I can still use older versions of those by typing “python2.7”.
rar/unrar multithreaded:
20 notes | Permalink