|
|
|
Create aliases to icons via a Perl script
Wow. 227 lines of code? Perl code at that? Perl the most cryptic and spartanic of all scripting languages? You can make an entire OS in 227 lines of Perl. But the task at hand could be done a lot better with ordinary shell scripting I think. Or you could just use a utility like this.
http://rixstep.com/xscan Coupled with this. http://rixstep.com/xshelf It's finished before you know it. My Leopard box has three Xcode SDKs so it's got a lot of files and directories. It took less than three minutes to find over 1,800 ICNS files and transfer them to a shelf. And if I save the shelf file I get a single file added to the system. Everything - the 1,800+ "aliases" - are all in one file. You're making too much of a project out of this. It's commendable but it's simply too much work!
Too much code?
> Perl the most cryptic and spartanic of all scripting languages?
Cite: "Wenn man keine Ahnung hat: Einfach mal Fresse halten"" Dieter Nuhr (Translation: "If you don't have a clue, just keep your trap shut.") Of course this is just 95 lines of Code (uncompressed and indented for legibility). The rest is documentation and explanation. > But the task at hand could be done a lot better with ordinary shell scripting I think. In which sense of "better". "Better documented"? "Better understandable"? I don't think so! No! I'm sure not! Hey! I'm not here to win a perl golf contest, I'm here to give the people something they can use and, if they want to, learn from. > It's finished before you know it. My Leopard box has three Xcode > SDKs so it's got a lot of files and directories. It took less than three > minutes to find over 1,800 ICNS files and transfer them to a shelf. > And if I save the shelf file I get a single file added to the system. > Everything - the 1,800+ "aliases" - are all in one file. You're such a hero! BTW: May I ask how many lines of code those 2 programs need? And does it give you the same structured result? > You're making too much of a project out of this. Maybe. But that's a) none of your business b) a script I (and hopefully others) will still understand 2 years from now |
SearchFrom our Sponsor...What's New:HintsNo new hintsComments last 2 days
Links last 2 weeksNo recent new linksWhat's New in the Forums?
The Editor's Corner...Here are some of my (robg) other projects...
Hints by TopicNews from Macworld
The macosxhints PollWhat version of OS X are you running as your main OS?
Other polls | 11,513 votes | 42 comments
|
|
Copyright © 2009 Mac Publishing LLC (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Powered by Geeklog Created this page in 0.03 seconds |
|