by Matt Gemmell
It's an OS X command-line tool to generate a PNG of the icon of a specified file, or of files with a given file-extension.
A reasonably recent (as of early 2016) version of Mac OS X.
It generates a PNG file of the icon of the specified input file, folder, app, disk, or other file-system object. You can choose the dimensions of the icon, and where to save the resulting image file.
Alternatively, you can specify a file-extension and you'll get the icon for a generic file with that extension, which will depend on which app on your system is the default handler for those files.
Just do mgicon
on the command-line, specifying an input file and at least the -o
flag with the place you want to save the resulting image file.
mgicon ~/Desktop/my-input-file.txt -o ~/Pictures/my-new-icon-file.png
You can also:
-
Use the
-s
flag to specify the dimensions of the image. Just one parameter, which will be both the width and height:-s 512
-
Use the
-x
flag to specify a file-extension (without the period), and you'll get the icon for files with that extension instead:-x html
-
Use the
-v
flag to enable verbose output.
That's about it.
Yes.
Anything I've not explicitly said that it does do.
Matt Gemmell (that's me).
-
My website is at mattgemmell.com
-
I'm on Twitter as @mattgemmell
-
This code is on github at github.com/mattgemmell/mgicon
The MIT license.
If you need a difference license, feel free to ask. I'm flexible about this.
Partly for fun, and partly to use with Keyboard Maestro, which is an OS X macro utility.
Nope. If you find a bug, please fix it and submit a pull request via github.
Feel free to create an issue with your idea.
You can:
-
Check out my Amazon wishlist.
-
Say thanks on Twitter, I suppose.