|
|
Use old style NeXTSTEP icons in Mail
Maybe something like this would work? I think "curl" also will do the directory creation stuff:
function mailfav()
{
EMAIL=$1;
DOMAIN=${EMAIL#*@}
curl http://$DOMAIN/favicon.ico --output ~/Library/Images/People/$EMAIL.tiff --create-dirs
}
Unfortunately, for the example given ("mailfav apps-noreply@google.com") google.com seems to store its favicon at www.google.com, so the curl as listed gives a http file with a 301 - "moved" error in it. Anyone know how to get it to follow 301?Edited on Nov 15, '11 11:15:51AM by j-beda
Use old style NeXTSTEP icons in Mail
just add the -L option to your curl command to follow redirects.
Use old style NeXTSTEP icons in Mail
Add the "-L" parameter to curl to have it follow redirects, at least for instances like this one, anyway (read the man page for full details) — e.g.:
curl http://$DOMAIN/favicon.ico -L --output ~/Library/Images/People/$EMAIL.tiff --create-dirs
Use old style NeXTSTEP icons in Mail
How about this (NOTE: Untested and I don't know if it'll work! I'm hoping from a little 'free' guru help here! ;-):
function mailfav()
{
EMAIL=$1;
DOMAIN=${EMAIL#*@}
curl http://www.$DOMAIN/favicon.ico --output ~/Library/Images/People/$EMAIL.tiff --create-dirs
}
It's inelegant, and if the site re-directs to a domain *without* www. we have the same problem.
function mailfav()
{
EMAIL=$1;
DOMAIN=${EMAIL#*@}
curl -L http://$DOMAIN/favicon.ico --output ~/Library/Images/People/$EMAIL.tiff --create-dirs
}
By default the limit is set to 50 re-directions, but you can improve on that by adding the --max-redirs flag. ---
Happy Dad
Use old style NeXTSTEP icons in Mail
That last one seems to work, at least with google.com |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.33 seconds |
|